[Scilab-users] Using Scinetcdf module

Lester Anderson arctica1963 at gmail.com
Fri Feb 5 10:48:05 CET 2016


Hello all

I am looking to use the sciNetCDF module to work with GMT grid files
but have some issues.

Reading a GMT grid is not a problem as far as I can tell, so the
following does read the file (and z variable), storing the values in
the grav array:

source = fullfile('Q:\geophys\Gz.grd')
grav = ncread(source,'z')
Hy = hilbert(grav); // write Hy variable to new file

I am having problems with writing out the processed data e.g write a
new grid (Gz_Hy.grd) with the Hilbert transform solution

filename = fullfile('Q:\geophys\Gz_Hy.grd')
ncwrite(filename, 'Hy') // does not work

Error return:

ncwrite(filename, 'Hy')
                       !--error 77
ncwrite: Wrong number of input argument(s): 3 to 5 expected.
at line       5 of exec file called by :
exec('Q:\geophys\Lester\SCILAB_work\netcdf1.sce', -1)

Any advice would be appreciated.

Thanks
Lester



More information about the users mailing list