-
Couldn't load subscription status.
- Fork 164
Description
π π π
Describe the bug
Checking equality of _FillValues that are NaNs in io_filenames_mod causes DART to exit.
check_attribute_value is called to check _FillValue and missing_value with the following code (r4 and r8) versions:
if ( nf90_get_att(ncFile, ncVarID, att_string, ret_spvalR4) == NF90_NOERR ) then
if (spvalR4 /= ret_spvalR4) then
write(msgstring,*) ' variable attribute, ', trim(att_string), ' in state', spvalR4, &
' does not match ', trim(att_string), ' ', ret_spvalR4, ' in ', trim(filename)
call error_handler(E_ERR, 'check_attribute_value_r4', msgstring, source)
endif
endif
If _FillValue is NaN then (spvalR4 /= ret_spvalR4) is always true.
Error Message
ERROR FROM:
source : io_filenames_mod.f90
routine: check_attribute_value_r4
message: variable attribute, _FillValue in state NaN does not match _FillValue NaN in /glade/work/gharamti/wrfhydro_dart/florence/initial_ens/hybrid/init_ens/member_000/HYDRO_RST.2018-08-01_00:00_DOMAIN1
Which model(s) are you working with?
Found with wrf-hydro, will effect any netcdf variable that has a missing or fill value attribute that is NaN.
Version of DART
9.12 (been there since at least 2016 though)
Have you modified the DART code?
No
Note to myself: You can test for NaNs before testing /=, but why do we even have to check the missing/fill value attribute is the same? State vs. netcdf file. Input vs. Output. Query the missing/fill value before you write?