Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetCDF Error. NetCDF: Not a valid data type or _FillValue mismatch #38

Open
croachutas opened this issue Nov 15, 2019 · 3 comments
Open

Comments

@croachutas
Copy link

I've recently installed CMS on a 'new' workstation (actually second hand hardware but a fresh install of Ubuntu 18.04.3). I compiled the various dependencies (HDF5, szip, zlib, netcdf C and netcdf fortran) from their source codes following instructions on the HDF5 and NetCDF websites before building CMS.

The test case works when set to ASCII output but switching it to netcdf output (mostly since I'd prefer less post-processing when running several million particles in my actual experiment) I get an error:
Error in the netCDF file: expt_example/SCRATCH/traj_file_1.nc
NetCDF: Not a valid data type or _FillValue type mismatch.

The same error occurs when running CMS with velocity fields converted to CMS format locally rather than downloaded remotely.

There are no issues when converting netCDF files to the CMS setup using getData, so this error seems to be exclusively related to how CMS writes NetCDF files out.

I'm currently using HDF5 v1.10.5, NetCDF C v4.7.2 and NetCDF Fortran v4.5.2

Doing a little googling the same error output has been reported with recent versions of netcdf-4python (Unidata/netcdf4-python#929), and is apparently related to NetCDF-C 4.6.2 and onward being stricter than earlier versions about FillValue and Variable types matching.

I suspect it'd be possible to downgrade to an older version of NetCDF as a short term work around (or put up with the extra post-processing and HD-space demands from going with ASCII). However, for future compatibility you probably should double check the types you're assigning to the FIllValue...

@croachutas
Copy link
Author

Can confirm downgrading to NetCDF C 4.6.1 and NetCDF Fortran 4.4.5 fixes this issue on my machine. Still, probably do wanna fix it properly in the CMS code to avoid it reoccurring for other people.

@beatrixparis
Copy link
Owner

beatrixparis commented Dec 3, 2019 via email

@benfarmer05
Copy link

I am still receiving this error today, using an HPC with netcdf-c/4.7.3 and netcdf-fortran/4.5.2 installed. Outputting to ASCII solved the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants