The netcdf package has not been ported to Scilab 6 family !
I requested to be added as a maintainer for this package to be able to update it.
Thanks Vincent ! I managed to build the package under macOS with a conda environment but the netcdf thirdparty library had to be rebuilt. I still need to run all the tests.
Regarding the netCDF package, it should really be utilizing the latest version (4.9.2) to access the modern structures.
The latest versions are always available at:
netCDF Downloads (ucar.edu)
Reading a netcdf file can be done via hdf5 in Scilab, but a proper implementation is required to write the files. HDF5 can get close to this but currently seems to lack the options for building compound and reference H5 objects (unless someone has figured this out?).
We definitely need a function for reading and writing netCDF4 files given the widespread use of the data format in science.
Lester
Hello Lester,
You should ping the authors, as rebuilding this toolbox is not a trivial task. First, it has been created for netcdf 4.1.1 (likely) in 2016, which is now incompatible with Scilab’s version of hdf5 library. In order to work with current netcdf 4.9.2 all the swig interface has to be regenerated, and maybe also modified for the 4.9.2 netcdf API which has probably evolved since 4.1.1 version. This is not a small task and it needs skills (swig) that I do not have, sorry.
S.
Hi Stephane,
I have popped a few queries to the maintainers (at present), and it would be good to get this one resolved. As you say, it is not a simple problem to solve!
I do not have the skills to work on the coding and compiling.
You can download and install netcdf 4.9.2 and add the /bin folder to the Windows path.
A quick test to display the contents of a netcdf file:
// netcdf functions
// assumes netcdf4 is installed in the system path
function [result, bOK]=dos_win(x)
[result, bOK] = dos('exit |'+ x);
endfunction
function ncinfo = ncdisp(filename)
// Display structure of netcdf file
nc_path = strcat('ncdump -h '+filename)
[ncinfo, bOK] = dos_win(nc_path)
endfunction
// ncgen to create netcdf file
// netcdf file compatible with HDF5 structure
Lester