[GRASS-user] Question about r.out.gdal (netcdf format)

Jonah Duckles jonahd at gmail.com
Wed Aug 10 18:04:10 EDT 2011


Thomas,

You may have to use GDAL to add the metadata back as r.out.gdal doesn't let
you pass metadata.  GDAL Python bindings are the easiest way to do this,
look at the SetMetadata() method.

Jonah

On Fri, Aug 5, 2011 at 5:36 PM, Thomas Adams <Thomas.Adams at noaa.gov> wrote:

>  All:
>
> I'm successfully able to export a netcdf file from GRASS 6.4.1 using
> r.out.gdal. Using ncdump shows a reasonable result. The problem I'm having
> is that the netcdf file contains neither the data type (2-m temperature) nor
> the units (degrees Kelvin). The software I need to use to import the
> resulting netcdf file must know the data type and units in order to import
> it. How can I add these attributes to the netcdf file?
>
> One thought I had was to use ncdump to export a cdl file and then have a
> script add the attributes I need and then use ncgen to re-generate the
> netcdf file with the data type and units attributes added.
>
> Before I embarked on this path I thought there may be a simpler way? I know
> there are tools such as cdo and ncl, but it may be more work to sort-out
> using these than using the brute force method I'm proposing…
>
> Regards,
> Tom
>
> --
> Thomas E Adams
> National Weather Service
> Ohio River Forecast Center
> 1901 South State Route 134
> Wilmington, OH 45177
>
> EMAIL:  thomas.adams at noaa.gov
>
> VOICE:  937-383-0528
> FAX:    937-383-0033
>
> ______________________________**_________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/grass-user<http://lists.osgeo.org/mailman/listinfo/grass-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110810/014d77ce/attachment.html


More information about the grass-user mailing list