It has been nearly 16 years since I used Grass and now coming back. I have
GRASS up and running on my Mac PowerBook G4 with OS X 10.4.6
Now I am trying to install the r.out.netcdf module and am at a loss as to
how to go about it. Any help would be appreciated.
Thanks,
Barry
_________________________
Barry Baker, Ph.D.
Global Climate Change Initiative
The Nature Conservancy
2424 Spruce St., Suite 100
Boulder, CO 80302
It has been nearly 16 years since I used Grass and now coming back.
I have GRASS up and running on my Mac PowerBook G4 with OS X 10.4.6
!!
Now I am trying to install the r.out.netcdf module and am at a loss as
to how to go about it. Any help would be appreciated.
Unless r.out.netcdf is packaged for the new GRASS 6.1 Extension Manager
(GEM), and I'm pretty sure it isn't, you will need the full grass source
code to compile it.
after ./configure, make of source code,
mkdir raster/r.out.netcdf/
cd raster/r.out.netcdf/
cp r.out.netcdf_source_files/* .
make
alternatively and probably simpler, use r.out.gdal for NetCDF output:
GRASS> gdalinfo --formats
GMT (rw): GMT NetCDF Grid Format
netCDF (ro): network Common Data Format
In my old version of GDAL, the GMT version is only one which it can
write to. I'm not sure what the latest version can do.
another indirect way is to use r.out.mat to make a Matlab array and
to save a NetCDF file from there. (r.out.mat is untested on big-endian
AFAIK, if that doesn't work use raw r.out.bin -> Matlab)
Copy the r.out.netcdf module into the ~/grass-6.0.0/raster/ source directory
Create a Makefile in the r.out.netcdf directory if there doesnt exist one, and then run
"make" . If the Makefile already exist, make sure -lnetcdf is added to the LIBES
The following is the Makefile:
It has been nearly 16 years since I used Grass and now coming back. I have GRASS up and running on my Mac PowerBook G4 with OS X 10.4.6
!!
Now I am trying to install the r.out.netcdf module and am at a loss as
to how to go about it. Any help would be appreciated.
Unless r.out.netcdf is packaged for the new GRASS 6.1 Extension Manager
(GEM), and I'm pretty sure it isn't, you will need the full grass source
code to compile it.
after ./configure, make of source code,
mkdir raster/r.out.netcdf/
cd raster/r.out.netcdf/
cp r.out.netcdf_source_files/* .
make
alternatively and probably simpler, use r.out.gdal for NetCDF output:
GRASS> gdalinfo --formats
GMT (rw): GMT NetCDF Grid Format
netCDF (ro): network Common Data Format
In my old version of GDAL, the GMT version is only one which it can
write to. I'm not sure what the latest version can do.
another indirect way is to use r.out.mat to make a Matlab array and
to save a NetCDF file from there. (r.out.mat is untested on big-endian
AFAIK, if that doesn't work use raw r.out.bin -> Matlab)
Another route that does not involve recompiling GRASS is to write a Python script to export the data from GRASS into an ASCII format, read the data into a numeric python array (NumPy) and then use the included netCDF module in NumPy to create your netCDF:
Copy the r.out.netcdf module into the ~/grass-6.0.0/raster/ source directory
Create a Makefile in the r.out.netcdf directory if there doesnt exist
one, and then run
“make” . If the Makefile already exist, make sure -lnetcdf is added to
the LIBES
The following is the Makefile:
It has been nearly 16 years since I used Grass and now coming back.
I have GRASS up and running on my Mac PowerBook G4 with OS X 10.4.6
!!
Now I am trying to install the r.out.netcdf module and am at a loss as
to how to go about it. Any help would be appreciated.
Unless r.out.netcdf is packaged for the new GRASS 6.1 Extension Manager
(GEM), and I’m pretty sure it isn’t, you will need the full grass source
code to compile it.
after ./configure, make of source code,
mkdir raster/r.out.netcdf/
cd raster/r.out.netcdf/
cp r.out.netcdf_source_files/* .
make
alternatively and probably simpler, use r.out.gdal for NetCDF output:
GRASS> gdalinfo --formats
GMT (rw): GMT NetCDF Grid Format
netCDF (ro): network Common Data Format
In my old version of GDAL, the GMT version is only one which it can
write to. I’m not sure what the latest version can do.
another indirect way is to use r.out.mat to make a Matlab array and
to save a NetCDF file from there. (r.out.mat is untested on big-endian
AFAIK, if that doesn’t work use raw r.out.bin → Matlab)
Thank you Hamish, David and Nagesh for your prompt suggestions on how to fix
my problem with outputting Netcdf files.
Best,
Barry
On 6/26/06 10:20 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:
Barry Baker wrote:
It has been nearly 16 years since I used Grass and now coming back.
I have GRASS up and running on my Mac PowerBook G4 with OS X 10.4.6
!!
Now I am trying to install the r.out.netcdf module and am at a loss as
to how to go about it. Any help would be appreciated.
Unless r.out.netcdf is packaged for the new GRASS 6.1 Extension Manager
(GEM), and I'm pretty sure it isn't, you will need the full grass source
code to compile it.
after ./configure, make of source code,
mkdir raster/r.out.netcdf/
cd raster/r.out.netcdf/
cp r.out.netcdf_source_files/* .
make
alternatively and probably simpler, use r.out.gdal for NetCDF output:
GRASS> gdalinfo --formats
GMT (rw): GMT NetCDF Grid Format
netCDF (ro): network Common Data Format
In my old version of GDAL, the GMT version is only one which it can
write to. I'm not sure what the latest version can do.
another indirect way is to use r.out.mat to make a Matlab array and
to save a NetCDF file from there. (r.out.mat is untested on big-endian
AFAIK, if that doesn't work use raw r.out.bin -> Matlab)