diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 10c0af119c..cf2e558e0e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,10 @@ individual files. The changes are now listed with the most recent at the top. +**April 5 2022 :: Bug-fix for NetCDF variables with NaN attributes. Tag: v9.16.2** + +- Fix for checking attributes of NetCDF variables that have a NaN as the missing or _FillValue. + **April 1 2022 :: Per-obs-type localization for 3D Cartesian location_mod. Tag: v9.16.1** - Optional per-obs-type localization for 3D Cartesian location diff --git a/assimilation_code/modules/io/io_filenames_mod.f90 b/assimilation_code/modules/io/io_filenames_mod.f90 index 7ce75698fa..c91bafac17 100644 --- a/assimilation_code/modules/io/io_filenames_mod.f90 +++ b/assimilation_code/modules/io/io_filenames_mod.f90 @@ -717,6 +717,9 @@ subroutine check_attribute_value_r4(ncFile, filename, ncVarID, att_string, spval real(r4) :: ret_spvalR4 if ( nf90_get_att(ncFile, ncVarID, att_string, ret_spvalR4) == NF90_NOERR ) then + if (ret_spvalR4 /= ret_spvalR4) then + return + endif 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) @@ -742,6 +745,9 @@ subroutine check_attribute_value_r8(ncFile, filename, ncVarID, att_string, spval real(r8) :: ret_spvalR8 if ( nf90_get_att(ncFile, ncVarID, att_string, ret_spvalR8) == NF90_NOERR ) then + if (ret_spvalR8 /= ret_spvalR8) then + return + endif if (spvalR8 /= ret_spvalR8) then write(msgstring,*) ' variable attribute, ', trim(att_string), ' in state', spvalR8, & ' does not match ', trim(att_string), ' ', ret_spvalR8, ' in ', trim(filename) diff --git a/build_templates/mkmf.template.pgi.linux b/build_templates/mkmf.template.pgi.linux index 730ce9cf83..df2e002773 100644 --- a/build_templates/mkmf.template.pgi.linux +++ b/build_templates/mkmf.template.pgi.linux @@ -87,13 +87,13 @@ LD = pgf90 INCS = -I$(NETCDF)/include LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf -FFLAGS = -O -Mbackslash $(INCS) +FFLAGS = -O -Mbackslash -Kieee $(INCS) LDFLAGS = $(FFLAGS) $(LIBS) # for development or debugging, use this for flags: # FFLAGS = -g -gopt -Mbounds -Mchkfpstk -Mchkptr -Mchkstk -Mpgicoff \ # -Mdclchk -Meh_frame -traceback -Minform=inform \ -# -Mflushz -Ktrap=fp -pc 64 -Mbackslash $(INCS) +# -Mflushz -Ktrap=fp -pc 64 -Mbackslash -Kieee $(INCS) # # $URL$ diff --git a/build_templates/mkmf.template.pgi.osx b/build_templates/mkmf.template.pgi.osx index 4cb33f2d92..77791720eb 100644 --- a/build_templates/mkmf.template.pgi.osx +++ b/build_templates/mkmf.template.pgi.osx @@ -68,11 +68,11 @@ LD = pgf90 INCS = -I$(NETCDF)/include LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf -FFLAGS = -O -Mbackslash $(INCS) +FFLAGS = -O -Mbackslash -Kieee $(INCS) LDFLAGS = $(FFLAGS) $(LIBS) # for development or debugging, use this for flags: -#FFLAGS = -g -Mbackslash -Ktrap=fp -pc 64 $(INCS) +#FFLAGS = -g -Mbackslash -Kieee -Ktrap=fp -pc 64 $(INCS) # # $URL$ diff --git a/conf.py b/conf.py index db800e96cc..ca2e659a17 100644 --- a/conf.py +++ b/conf.py @@ -21,7 +21,7 @@ author = 'Data Assimilation Research Section' # The full version, including alpha/beta/rc tags -release = '9.16.1' +release = '9.16.2' master_doc = 'README' # -- General configuration ---------------------------------------------------