Gpt Write NetCDF vs NetCDF4


#1

Hi,
Conversion into NetCDF4-BEAM is very useful to save some memory when storing processed images.
I am able to convert (or export) into NetCDF4-BEAM or NetCDF4-CF from the snap gui.
I would like to do the same thing with gpt:

ifile=img.dim
ofile=img.nc
oformat=NetCDF4-BEAM
gpt Write -PformatName=$oformat -Pfile=$ofile -Ssource=$ifile

If I set oformat as NetCDF-CF or NetCDF-BEAM, it is working perfectly!
But, when oformat = NetCDF4-CF or NetCDF4-BEAM (enabling image compression), I do get img.nc, but it is unreadable:

ncdump -h img.nc
ncdump: img.nc: NetCDF: Unknown file format

Any idea?
Thanks
Tristan


S3 OLCI reprojected to netcdf4-CF does not always work
#2

Is it possible that the ncdump is outdated?
Maybe it can only read NetCDF3 and not yet NetCDF4?


#3

Thanks for your reply.
After some tests on several machines, neither gdalinfo, ncinfo nor snap software can open the img.nc generated by gpt in netcdf4.
(img.nc generated via snap gui is all right)


#4

Can you provide me both files, the input and the output?
I’ll send you a PM with a location where you can upload it.


#5

Hello Tristan,

Unfortunately I hadn’t the time to investigate your problem in more detail. As there has been a similar report now, the priority rises.