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@noaa.gov
VOICE: 937-383-0528
FAX: 937-383-0033
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@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@noaa.gov
VOICE: 937-383-0528
FAX: 937-383-0033
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
All:
I apologize if this is not the correct place to post this question and
will gladly redirect this to the appropriate place if prompted.
I have sample sites located in UTM/NAD83 zones 16 and 17 in the United
States. As I understand UTM I can't use the raw coordinates to
calculate distances from pairs of coordinates among zones. What is the
most accurate way of calculating distance between these two points to
investigate spatial auto-correlation. What coordinate system,
projection, etc. should I use? What distance formula(s) should I use?
Thanks for all of your help in advance.
Stephen Sefick