[Dart-dev] DART/trunk Revision: 12135
dart at ucar.edu
dart at ucar.edu
Tue Nov 21 08:38:15 MST 2017
nancy at ucar.edu
2017-11-21 08:38:14 -0700 (Tue, 21 Nov 2017)
144
minor fixes to the obs_utilities_mod.f90 for the obs
converters - if asking for missing values and they aren't
in the file, return MISSING_R8.
Modified: DART/trunk/index.html
===================================================================
--- DART/trunk/index.html 2017-11-20 23:51:41 UTC (rev 12134)
+++ DART/trunk/index.html 2017-11-21 15:38:14 UTC (rev 12135)
@@ -195,7 +195,7 @@
</TR>
-->
-<TR><TD> 20 Nov 2017 </TD>
+<TR><TD> 21 Nov 2017 </TD>
<TD> 12130 </TD>
<TD> Added AVISO observation converter. Added a forward operator
for 1D models that raises observation values to powers.
@@ -205,7 +205,7 @@
Updates to the Cosmic Ionosphere observation converter for
electron density observations. Updates to the ROMS model_mod to support
a Mean Dynamic Topography field. Fix for CAM CESM 1.2.1 scripts
-when more than a single SourceMod file is present.
+when more than a single SourceMod file is present in a directory.
</TD>
</TR>
Modified: DART/trunk/observations/utilities/obs_utilities_mod.f90
===================================================================
--- DART/trunk/observations/utilities/obs_utilities_mod.f90 2017-11-20 23:51:41 UTC (rev 12134)
+++ DART/trunk/observations/utilities/obs_utilities_mod.f90 2017-11-21 15:38:14 UTC (rev 12135)
@@ -429,6 +429,7 @@
darray = real(shortarray,r8)
+
if (fill_exists == NF90_NOERR) then ! FillValue exists
if ( (offset_exists == NF90_NOERR) .and. (scaling_exists == NF90_NOERR) ) then
@@ -451,6 +452,8 @@
darray = darray + add_offset
endif
+ if (present(dmiss)) dmiss = MISSING_R8
+
endif
end subroutine get_short_as_r8
@@ -514,6 +517,8 @@
darray = darray + add_offset
endif
+ if (present(dmiss)) dmiss = MISSING_R8
+
endif
end subroutine get_int_as_r8
@@ -885,7 +890,7 @@
real(r8), intent(out) :: dout
real(r8), optional, intent(out) :: dmiss
-integer :: varid
+integer :: varid, ret
! read the data for the requested array, and get the fill value
call nc_check( nf90_inq_varid(ncid, varname, varid), &
@@ -893,9 +898,10 @@
call nc_check( nf90_get_var(ncid, varid, dout, start = (/ start /) ), &
'getvar_real_1d_val', 'getting var '// trim(varname))
-if (present(dmiss)) &
- call nc_check( nf90_get_att(ncid, varid, '_FillValue', dmiss), &
- 'getvar_real_1d_val', 'getting attr "_FillValue" for '//trim(varname))
+if (present(dmiss)) then
+ ret = nf90_get_att(ncid, varid, '_FillValue', dmiss)
+ if (ret /= NF90_NOERR) dmiss = MISSING_R8
+endif
end subroutine getvar_real_1d_1val
@@ -921,7 +927,7 @@
integer, intent(out) :: dout
integer, optional, intent(out) :: dmiss
-integer :: varid
+integer :: varid, ret
! read the data for the requested array, and get the fill value
call nc_check( nf90_inq_varid(ncid, varname, varid), &
@@ -929,9 +935,10 @@
call nc_check( nf90_get_var(ncid, varid, dout, start = (/ start /) ), &
'getvar_int_1d_1val', 'getting var '// trim(varname))
-if (present(dmiss)) &
- call nc_check( nf90_get_att(ncid, varid, '_FillValue', dmiss), &
- 'getvar_int_1d_1val', 'getting attr "_FillValue" for '//trim(varname))
+if (present(dmiss)) then
+ ret = nf90_get_att(ncid, varid, '_FillValue', dmiss)
+ if (ret /= NF90_NOERR) dmiss = MISSING_I
+endif
end subroutine getvar_int_1d_1val
@@ -961,7 +968,7 @@
real(r8), intent(out) :: darray(:)
More information about the Dart-dev
mailing list