[GRASS-dev] success with NetCDF

Michael Barton Michael.Barton at asu.edu
Wed Feb 15 13:21:22 EST 2012


I was able to directly import our test NetCDF file into GRASS using r.in.gdal.

The trick is to properly specify the file and data subset name. Here is the command version, though I did it through the GUI too.

r.in.gdal -o -e input=NETCDF:"/Users/cmbarton/Desktop/ppt_SRESA2_mid_annual_down_anomaly.nc":ppt output=netcdftest band=1 title=globalppt

I'm not sure that the -o and -e flags are needed. Note the way I specified the input. It has a NETCDF prefix, the file name (in quotes), and the relevant variable name--all separated by colons (:). I had to get this info using gdalinfo first. My guess is that you can directly import multiple bands this way and not just one at at time.

Michael
_____________________
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20120215/41e1b81c/attachment.html


More information about the grass-dev mailing list