[GRASS-user] question about gdal

Daniel Victoria daniel.victoria at gmail.com
Wed Jun 13 05:31:25 PDT 2012


Michael,

>From what I remember about NetCDF files the band number for each time
step can be calculated by looking at the metadata. You need to see if
your timestep is in days or hours, and the first timestep in the file.
Then it's supposed o be a linear transformation relating time to band
number.
>From there you can use gdal translate to extract the bands you are
interested in. A quick shell script can be made for extracting more
then one band or you can use r.in.gdal.

Another option that I used some time ago, before GDAL supported
NetCDF, was to export the data using GrADS, a good data viewer and
software for manipulating NetCDF data.

Cheers
Daniel

On Wed, Jun 13, 2012 at 1:45 AM, Hamish <hamish_b at yahoo.com> wrote:
> Michael wrote:
>> I'm working with reading NetCDF files. gdal does an
>> admirable job of this.
>> Many of the NetCDF climate data files have many bands and I'd
>> like import only some of them. Specifying a particular NetCDF
>> SUBSET will allow gdal to read the data for a particular
>> variable.
>
>
> fyi, see also the GRASS wiki & gdal help:
>
> http://grass.osgeo.org/wiki/NetCDF
> http://www.gdal.org/frmt_netcdf.html
>
>
> the HDF format usage may be similar(?) some examples of that:
>  http://grass.osgeo.org/wiki/AVHRR
>  http://grass.osgeo.org/wiki/MODIS
>
>
> good luck,
> Hamish
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list