[GRASS-user] Re: NetCDF Data in GRASS?

Vishal Mehta vishalm1975 at gmail.com
Wed Sep 8 21:01:43 EDT 2010

Hello Lee,

I dug out this script i used a few years ago, using gdal_translate to go
from netcdf to multiband GTiff, then r.in.gdal to bring into GRASS. This
example extracts monthly rainfall for 1963,
I think there were (and believe still are) problems with gdal when
configured for both hdf and netcdf formats - I believe you cant have both
which (if still true) is too bad, because lots of climate related data come
in both of these 2 formats.

hope this helps,

echo "yr is $yr Working on map Rain$yr"
gdal_translate -of GTiff -b $((month+1)) -b $((month+2)) -b $((month+3)) -b
$((month+4)) -b $((month+5)) -b $((month+6)) -b $((month+7)) -b $((month+8))
-b $((month+9)) -b $((month+10)) -b $((month+11)) -b $((month+12)) -a_ullr
22.5 6 42 -12.5 rainafrica.nc Rain$yr
echo "converting Rain$yr from Gtiff to Grass"
r.in.gdal -ok input=Rain$yr output=Rain$yr

On Wed, Sep 8, 2010 at 4:30 PM, LeeDaniel <Lee.Daniel.1986 at gmail.com> wrote:

> Great, thanks a bunch! Dumb mistake on my part that I missed that :P
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/NetCDF-Data-in-GRASS-tp5506213p5512700.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

Vishal K. Mehta, PhD
Stockholm Environment Institute - US
133 D St Suite F
Davis CA 95616
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100908/abcb9de5/attachment-0001.html

More information about the grass-user mailing list