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

Bug fix - Fixes issue if FillValue is NaN #341

Merged
merged 6 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions assimilation_code/modules/io/io_filenames_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions build_templates/mkmf.template.pgi.linux
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# <next few lines under version control, do not edit>
# $URL$
Expand Down
4 changes: 2 additions & 2 deletions build_templates/mkmf.template.pgi.osx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# <next few lines under version control, do not edit>
# $URL$
Expand Down
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down