bug-fix: adds check to ensure attribute values that are NaNs are consistent across restarts #984
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Previously, the check_attribute_value_r4/r8 subroutines simply returned if the attribute (i.e FillValue, add_offset, scale_factor) in the given netcdf file was a NaN (
ret_spvalR4 /= ret_spvalR4)DART/assimilation_code/modules/io/io_filenames_mod.f90
Lines 720 to 729 in e5cfb8b
They did not check that the attribute value in the state was also a NaN and therefore matched, which is the purpose of these subroutines
This PR adds an check to see if the attribute value in the state is also a NaN, and if it isn't, errors out with the appropriate message
Fixes issue
Partial fix for issue #970
Updated fix for old, closed issue #323
Types of changes
Documentation changes needed?
Tests
Please describe any tests you ran to verify your changes.
Ran ROMS_Rutgers with and without debugging flags (gfort and intel)
When output_priorinf_sd.nc has NaN as the FillValue, it errors out in the new error check
When output_priorinf_sd.nc does not have NaN as the FillValue, runs successfully as expected
Checklist for merging
Checklist for release
Testing Datasets
3 member test case at /glade/work/masmith/DART11.14.2/DART/models/ROMS_rutgers/bug_test
This dir has output_priorinf_sd.nc.NAN that uses NaN as FillValue