Skip to content

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

Open
@croachutas

Description

@croachutas

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions