[GRASS-user] NetCDF Data in GRASS?

Hello all,

Does anybody have any experience with integrating NetCDF data into GRASS?
That's a ton of great data and I'm wondering if there's a direct way of
importing such files into a GRASS database. I've seen scripts that convert
them to ArcGRID format, but that's not a very elegant solution, especially
if you're dealing with long time series.

Thanks a bunch!
Daniel
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/NetCDF-Data-in-GRASS-tp5506213p5506213.html
Sent from the Grass - Users mailing list archive at Nabble.com.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/09/10 14:29, LeeDaniel wrote:

Hello all,

Does anybody have any experience with integrating NetCDF data into GRASS?

No experience myself, but gdal can read them, so you should be able to
get them into grass.

Cheers,

Rainer

That's a ton of great data and I'm wondering if there's a direct way of
importing such files into a GRASS database. I've seen scripts that convert
them to ArcGRID format, but that's not a very elegant solution, especially
if you're dealing with long time series.

Thanks a bunch!
Daniel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyGSFkACgkQoYgNqgF2egqYsQCfXy4eA/NYCPR9Dw9bFQrMY2kv
UEIAn3DBAI3Prexv3uP9a5B1ec5ma7tA
=KE2L
-----END PGP SIGNATURE-----

LeeDaniel wrote:

> Does anybody have any experience with integrating NetCDF
> data into GRASS?

Rainer wrote:

No experience myself, but gdal can read them, so you should
be able to get them into grass.

right, see http://grass.osgeo.org/wiki/NetCDF

(feel free to expand that page)

pre-processing into a GeoTiff with gdal_translate is a
possibility, and "gdalinfo" should generally be the first thing
you do anyway.

Hamish

Please note a recent discussion on OSGEO discuss:
http://thread.gmane.org/gmane.comp.gis.osgeo.discuss/7458/focus=7459

Great, thanks a bunch! Dumb mistake on my part that I missed that :stuck_out_tongue:
--
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.

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,
Vishal

#!/bin/bash
yr=1963
month=0
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
done

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

Great, thanks a bunch! Dumb mistake on my part that I missed that :stuck_out_tongue:

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Vishal K. Mehta, PhD
Scientist
Stockholm Environment Institute - US
133 D St Suite F
Davis CA 95616
www.sei-us.org

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.

To my opinion QGIS or GRASS should have a similar interface to as JGrass
to time dependant modelled data sets.

Maybe a idea for next year's GSoC?