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 Fill Value Type Mismatch in IO module #382

Closed
hellkite500 opened this issue Oct 10, 2019 · 1 comment · Fixed by #459
Closed

NetCDF Fill Value Type Mismatch in IO module #382

hellkite500 opened this issue Oct 10, 2019 · 1 comment · Fixed by #459
Assignees
Labels
bug Something isn't working

Comments

@hellkite500
Copy link
Contributor

Expected Behavior

Program executes normally using netcdf fortran (4.5.2) and netcdf C (4.7.1)

Current Behavior

Using latest netcdf fortran (4.5.2) and netcdf C (4.7.1) the program crashes with the following error:
The job is stopped due to the fatal error. ERROR: Unable to place Fill value attribute into variable zwattablrt!

Possible Solution

Two possible solutions (will try to submit PR later) exist. One is to replace netcdf variable types
for definitions of compressed variables, i.e. replace nf90_int in lines like this with nf90_int64.

iret = nf90_def_var(ftn,trim(fileMeta%varNames(iTmp)),nf90_int,dimId(1),varId)

There are at least 7 palces in module_NWM_io where this exists, may also be other places in the I/O code affected by netcdf_int types. I have tested this using the described netcdf libraries, and it works.

This may not work with netcdf fortran 4.4.4 (see issue linked below). If it doesn't then the fileMeta%fillComp variable should be a 4 byte instead of 8 byte int that it currently is. I think that netcdf fortran 4.4.4 is doing this conversion, but when full support for 64 bit ints was added, the behavior in the library changed and this became an explicit error.

Also, the nwmcheck function that reports the errors should report the netcdf error number and/or the string message from nf90_strerror which would give information like this: NetCDF: Not a valid data type or _FillValue type mismatch

Steps to Reproduce (for bugs)

  1. Link against netcdf fortran 4.5.2 (I think anything over 4.4.4 will reproduce, but not confirmed)
  2. Turn on i/o compression option in hydro.namelist
  3. Run model

Your Environment

@hellkite500 hellkite500 changed the title NetCDF FIll Value Type Mismatch in IO module NetCDF FIill Value Type Mismatch in IO module Dec 23, 2019
@hellkite500 hellkite500 changed the title NetCDF FIill Value Type Mismatch in IO module NetCDF Fill Value Type Mismatch in IO module Dec 23, 2019
@rcabell
Copy link
Collaborator

rcabell commented Jan 27, 2020

NetCDF 4.7.3 is now the default version on Cheyenne, and users are seeing model crashes with it. That may be related to this issue, and/or additional places in the code where it's crashing due to incompatibilities. Adding this here now to bubble up the priority.

@rcabell rcabell added the bug Something isn't working label Jan 27, 2020
@rcabell rcabell self-assigned this Jan 27, 2020
@rcabell rcabell linked a pull request Feb 20, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants