Working with GMT (netCDF) grids

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Working with GMT (netCDF) grids

Lester Anderson
Hello,

I am looking to work with netCDF grid data as generated from GMT. Now
I have seen how to read the data and assign variables from the
contained  values (e.g. x, y, z); the test below is where I am at the
moment:

pkg load netcdf
pkg load ncarray
ncdisp('Profile-crop_eq.grd')
fid=netcdf_open('Profile-crop_eq.grd','NC_NOWRITE');
x=netcdf_getVar(fid,0);
y=netcdf_getVar(fid,1);
z=netcdf_getVar(fid,2);
netcdf_close(fid)
A = ncArray('Profile-crop_eq.grd','z');

What I would like to do is to apply processes to the input netCDF data
and generate both a plot of the grid and output to a new netCDF file.
I have looked at both the netCDF and ncarray packages for dealing with
the data.

If anyone has some pointers on how to proceed that would be great.

Lester


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------