NetCDF to Brick

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NetCDF to Brick

JacobF
I'm having an issue with creating a raster brick from a NetCDF. Normally this works fine but for a file I recently downloaded the time and X dimensions are getting swapped so I get a brick with dimensions 72, 7300, 525600, 110  (nrow, ncol, ncell, nlayers), when it should be 72, 110, 7920, 7300  (nrow, ncol, ncell, nlayers). I haven't seen any documentation for setting the x, y and z variables when creating a brick, only when outputting one as a NetCDF.
Reply | Threaded
Open this post in threaded view
|

Re: NetCDF to Brick

Michael Sumner-2
this is hard to generalize for something like raster (though no doubt
the authors will get to it eventually), I would suggest just using
ncdf4, RNetCDF, or ncdf packages to open, read and manipulate this
more directly in R. It's not difficult and you could report back your
pathway to raster objects to inspire others.

(I prefer RNetCDF only because I'm more familiar with it, but since
raster uses ncdf or preferentially ncdf4 it's probably best to start
there).





On Wed, Jun 26, 2013 at 3:53 AM, JacobF <[hidden email]> wrote:

> I'm having an issue with creating a raster brick from a NetCDF. Normally this
> works fine but for a file I recently downloaded the time and X dimensions
> are getting swapped so I get a brick with dimensions 72, 7300, 525600, 110
> (nrow, ncol, ncell, nlayers), when it should be 72, 110, 7920, 7300  (nrow,
> ncol, ncell, nlayers). I haven't seen any documentation for setting the x, y
> and z variables when creating a brick, only when outputting one as a NetCDF.
>
>
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/NetCDF-to-Brick-tp7583910.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



--
Michael Sumner
Hobart, Australia
e-mail: [hidden email]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo