[Dart-dev] DART/branches Revision: 12509
dart at ucar.edu
dart at ucar.edu
Thu Apr 12 07:38:52 MDT 2018
thoar at ucar.edu
2018-04-12 07:38:51 -0600 (Thu, 12 Apr 2018)
523
The observations are actually soil water content, which is a percentage.
To get soil moisture, you have to multiply by porosity.
Worse ... the Intel compiler and gfortran interpret the NaN value _very_ differently.
The Intel compiler (with debug options) simply core dumps uselessly when it reads the NaN.
The Intel compiler (with moderate optimization) blows past this and converts TWICE as
many observations as the gfortran compiler.
gfortran with debug on or off seems to not blow up ... who knows what is right ...
Modified: DART/branches/lanai_terrsysmp/obs_def/obs_def_tower_mod.f90
===================================================================
--- DART/branches/lanai_terrsysmp/obs_def/obs_def_tower_mod.f90 2018-04-11 20:49:27 UTC (rev 12508)
+++ DART/branches/lanai_terrsysmp/obs_def/obs_def_tower_mod.f90 2018-04-12 13:38:51 UTC (rev 12509)
@@ -8,6 +8,7 @@
!WATER_TABLE_DEPTH, KIND_WATER_TABLE_DEPTH, COMMON_CODE
!SOIL_TEMPERATURE, KIND_SOIL_TEMPERATURE, COMMON_CODE
!SOIL_MOISTURE, KIND_SOIL_MOISTURE, COMMON_CODE
+!SOIL_WATER_CONTENT, KIND_SOIL_WATER_CONTENT, COMMON_CODE ! a percentage
!LAYER_LIQUID_WATER, KIND_LIQUID_WATER, COMMON_CODE
!LAYER_ICE, KIND_ICE, COMMON_CODE
!SNOW_THICKNESS, KIND_SNOW_THICKNESS, COMMON_CODE
Modified: DART/branches/lanai_terrsysmp/obs_kind/DEFAULT_obs_kind_mod.F90
===================================================================
--- DART/branches/lanai_terrsysmp/obs_kind/DEFAULT_obs_kind_mod.F90 2018-04-11 20:49:27 UTC (rev 12508)
+++ DART/branches/lanai_terrsysmp/obs_kind/DEFAULT_obs_kind_mod.F90 2018-04-12 13:38:51 UTC (rev 12509)
@@ -375,12 +375,14 @@
KIND_LIVE_ROOT_NITROGEN = 325, &
KIND_DEAD_ROOT_CARBON = 326, &
KIND_DEAD_ROOT_NITROGEN = 327, &
- KIND_STEM_AREA_INDEX = 328
+ KIND_STEM_AREA_INDEX = 328, &
+ KIND_SOIL_WATER_CONTENT = 329, & ! percentage
+ KIND_SOIL_SATURATION = 330 ! fraction
!! PRIVATE ONLY TO THIS MODULE. see comment below near the max_obs_specific
!! declaration.
-integer, parameter :: max_obs_generic = 328
+integer, parameter :: max_obs_generic = 330
!----------------------------------------------------------------------------
! This list is autogenerated by the 'preprocess' program. To add new
@@ -721,6 +723,8 @@
obs_kind_names(326) = obs_kind_type(KIND_DEAD_ROOT_CARBON, 'KIND_DEAD_ROOT_CARBON')
obs_kind_names(327) = obs_kind_type(KIND_DEAD_ROOT_NITROGEN, 'KIND_DEAD_ROOT_NITROGEN')
obs_kind_names(328) = obs_kind_type(KIND_STEM_AREA_INDEX, 'KIND_STEM_AREA_INDEX')
+obs_kind_names(329) = obs_kind_type(KIND_SOIL_WATER_CONTENT, 'KIND_SOIL_WATER_CONTENT')
+obs_kind_names(330) = obs_kind_type(KIND_SOIL_SATURATION, 'KIND_SOIL_SATURATION')
! count here, then output below
Modified: DART/branches/lanai_terrsysmp/observations/TERENO/convert_soil_moisture.f90
===================================================================
--- DART/branches/lanai_terrsysmp/observations/TERENO/convert_soil_moisture.f90 2018-04-11 20:49:27 UTC (rev 12508)
+++ DART/branches/lanai_terrsysmp/observations/TERENO/convert_soil_moisture.f90 2018-04-12 13:38:51 UTC (rev 12509)
@@ -40,7 +40,7 @@
init_obs_sequence, get_num_obs, &
set_copy_meta_data, set_qc_meta_data
-use obs_kind_mod, only : SOIL_MOISTURE
+use obs_kind_mod, only : SOIL_WATER_CONTENT ! as a percentage
use obs_utilities_mod, only : getvar_real, getvar_real_2d, getvar_int_3d, &
getdimlen, create_3d_obs, add_obs_to_seq
@@ -120,8 +120,8 @@
! These values came from a dump of 'processing_status,quality_flag'
!>@todo determine these from the string instead of the presumed index
-integer, parameter :: processing_status = 4 ! processing_status == 'approved upload'
-integer, parameter :: quality_flag = 2 ! quality_flag == 'ok: ok'
+integer, parameter :: GOOD_STATUS = 4 ! processing_status == 'approved upload'
+integer, parameter :: GOOD_QUALITY = 2 ! quality_flag == 'ok: ok'
!-----------------------------------------------------------------------
! start of executable code
@@ -253,20 +253,19 @@
! If both sensors have good quality, average them.
! If only one sensor has good quality, only use it.
- ! processing_status and quality_flag came from the netCDF metadata
- if ( qcsensor1(idepth,1,itime,istation) == processing_status .and. &
- qcsensor1(idepth,2,itime,istation) == quality_flag .and. &
- qcsensor2(idepth,1,itime,istation) == processing_status .and. &
- qcsensor2(idepth,2,itime,istation) == quality_flag ) then
+ if ( qcsensor1(idepth,1,itime,istation) == GOOD_STATUS .and. &
+ qcsensor1(idepth,2,itime,istation) == GOOD_QUALITY .and. &
+ qcsensor2(idepth,1,itime,istation) == GOOD_STATUS .and. &
+ qcsensor2(idepth,2,itime,istation) == GOOD_QUALITY ) then
obs_val = 0.5_r8*sensor1(idepth,itime,istation) + &
0.5_r8*sensor2(idepth,itime,istation)
qc = 0
- elseif ( qcsensor1(idepth,1,itime,istation) == processing_status .and. &
- qcsensor1(idepth,2,itime,istation) == quality_flag .and. &
+ elseif ( qcsensor1(idepth,1,itime,istation) == GOOD_STATUS .and. &
+ qcsensor1(idepth,2,itime,istation) == GOOD_QUALITY ) then
obs_val = sensor1(idepth,itime,istation)
qc = 0
- elseif ( qcsensor2(idepth,1,itime,istation) == processing_status .and. &
- qcsensor2(idepth,2,itime,istation) == quality_flag ) then
+ elseif ( qcsensor2(idepth,1,itime,istation) == GOOD_STATUS .and. &
+ qcsensor2(idepth,2,itime,istation) == GOOD_QUALITY ) then
obs_val = sensor2(idepth,itime,istation)
qc = 0
else
@@ -273,15 +272,13 @@
cycle DEPTHLOOP
endif
More information about the Dart-dev
mailing list