[Scilab-users] HDF5 write data to file
Lester Anderson
arctica1963 at gmail.com
Wed May 25 16:17:06 CEST 2022
Hi all,
I just found a useful way of getting netCDF files into Scilab via HDF5
(just found this!):
a=h5open('Test_10-FAA.grd');
h5ls(a)
// "lat" "dataset" // "lon"
"dataset" // "z" "dataset" // "Conventions"
"attribute"// "GMT_version" "attribute"// "_NCProperties"
"attribute"// "description" "attribute"// "history"
"attribute"// "node_offset" "attribute"// "title"
"attribute"
lon=h5read(a, 'lon');lat=h5read(a, 'lat');data=h5read(a, 'z');
h5close(a);
The data plots fine via Sgrayplot(lon,lat,data,zminmax=[-25,25]) . I need
to know how to write data out to essentially replicate the input netCDF
file, so any pointers/examples would be helpful. It would be good to output
a file in a format that GMT (Generic Mapping Tools) would recognise.
The use of HDF5 seems to solve the issues of working with netCDF-4 files.
Lester
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20220525/7f93b218/attachment.htm>
More information about the users
mailing list