<div>Thomas,</div><div><br></div>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.<div>
<br></div><div>Jonah<div><br><div class="gmail_quote">On Fri, Aug 5, 2011 at 5:36 PM, Thomas Adams <span dir="ltr"><<a href="mailto:Thomas.Adams@noaa.gov">Thomas.Adams@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
All:<br>
<br>
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?<br>
<br>
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.<br>
<br>
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…<br>
<br>
Regards,<br>
Tom<br>
<br>
-- <br>
Thomas E Adams<br>
National Weather Service<br>
Ohio River Forecast Center<br>
1901 South State Route 134<br>
Wilmington, OH 45177<br>
<br>
EMAIL: <a href="mailto:thomas.adams@noaa.gov" target="_blank">thomas.adams@noaa.gov</a><br>
<br>
VOICE: <a href="tel:937-383-0528" value="+19373830528" target="_blank">937-383-0528</a><br>
FAX: <a href="tel:937-383-0033" value="+19373830033" target="_blank">937-383-0033</a><br>
<br>
______________________________<u></u>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/grass-user</a><br>
</blockquote></div><br></div></div>