[GRASS-user] trouble with r.in.gdal to georeference a NetCDF file

Hamish hamish_b at yahoo.com
Wed Nov 13 02:24:34 PST 2013


Lee wrote:
> I'm trying to import a NetCDF file from the WRF weather forecast model
> with r.in.gdal, but I can't get it to georeference.  Instead I end
> up with a x,y coordinate system of rows and columns.  The file
> georeferences fine in a number of other weather graphics programs.

Hi Lee,

see  http://grasswiki.osgeo.org/wiki/NetCDF
     http://www.gdal.org/frmt_netcdf.html

can you get the WRF data in GRIB format instead of NetCDF? I'm doing
that and it is working well. (note for GRIB you should have GDAL version
1.9 or newer to avoid a bug)

if not, try using gdal_translate to extract the subband to a geotiff
or other intermediate format before loading into grass.
if you can get r.in.gdal working directly, also consider r.external
to avoid a zillion maps everywhere on the disk.


see also ncdump and I've got a small program here called ncreformat.c that
extracts wrf NetCDF to an ascii file. It might be from an old WRF code
distribution?



Hamish

ps- see also the d.barb addon module for GRASS 6. Also there might be
some discussion in the mailing list archive about smoothing isobar
lines created with r.contour using the v.generalize module: you need
to be careful that the tight inner lines don't pinch closed and that
the fine eye of a storm doesn't get discarded with discarded small
noise loops. if it's not online maybe I'll have some private notes
somewhere I could try to dig out.


More information about the grass-user mailing list