[Dart-dev] DART/branches Revision: 11980

dart at ucar.edu dart at ucar.edu
Fri Oct 13 09:57:43 MDT 2017


thoar at ucar.edu
2017-10-13 09:57:41 -0600 (Fri, 13 Oct 2017)
211
Adding a namelist to specify the fraction of the observation value to be used
to help describe the observation error variance. There is a parameter in the
code to define the minimum observation error variance.




Modified: DART/branches/wrfHydro/observations/USGS/convert_streamflow.f90
===================================================================
--- DART/branches/wrfHydro/observations/USGS/convert_streamflow.f90	2017-10-13 15:44:57 UTC (rev 11979)
+++ DART/branches/wrfHydro/observations/USGS/convert_streamflow.f90	2017-10-13 15:57:41 UTC (rev 11980)
@@ -50,8 +50,9 @@
 
 ! input file has data quality control fields, whether to use or ignore them.
 
-integer, parameter :: NUM_COPIES = 1     ! number of copies in sequence
-integer, parameter :: NUM_QC     = 1     ! number of QC entries
+integer,  parameter :: NUM_COPIES      = 1      ! number of copies in sequence
+integer,  parameter :: NUM_QC          = 1      ! number of QC entries
+real(r8), parameter :: MIN_OBS_ERR_STD = 0.5_r8 ! m^3/sec
 
 integer :: nobs, n, i, nlinks, iunit, io, indx
 integer :: ncid_d, ncid_l, varid
@@ -88,11 +89,11 @@
 character(len=256) :: input_file    = 'input.nc'
 character(len=256) :: location_file = 'location.nc'
 character(len=256) :: output_file   = 'obs_seq.out'
-real(r8)           :: obs_err_var_fraction = 0.01
+real(r8)           :: obs_fraction_for_error = 0.01
 integer            :: verbose = 0
 
 namelist / convert_streamflow_nml / input_file, output_file, location_file, &
-                                    obs_err_var_fraction, verbose
+                                    obs_fraction_for_error, verbose
 
 ! Get going
 
@@ -196,7 +197,10 @@
 
    if ( discharge(n) < 0.0_r8 ) cycle
 
-   oerr = min(discharge(n)*0.01, 1.0) ! some hypothetical observation error
+   ! oerr is the observation error standard deviation in this application.
+   ! The observation error variance encoded in the observation file
+   ! will be oerr*oerr
+   oerr = max(discharge(n)*obs_fraction_for_error, MIN_OBS_ERR_STD)
 
    call convert_time_string(time_string(n),oday,osec)
 

Modified: DART/branches/wrfHydro/observations/USGS/work/input.nml
===================================================================
--- DART/branches/wrfHydro/observations/USGS/work/input.nml	2017-10-13 15:44:57 UTC (rev 11979)
+++ DART/branches/wrfHydro/observations/USGS/work/input.nml	2017-10-13 15:57:41 UTC (rev 11980)
@@ -10,6 +10,7 @@
 &convert_streamflow_nml
    input_file = '/glade/p/work/jamesmcc/DART/04233300_VM/nudgingTimeSliceObs/2013-09-30_22:30:00.15min.usgsTimeSlice.ncdf'
    location_file = '/glade/p/work/jamesmcc/DART/04233300_VM/DOMAIN/RouteLink.nc'
+   obs_fraction_for_error = 0.01
    verbose = 0
  /
 
@@ -24,6 +25,6 @@
  /
 
 &obs_sequence_nml
-   write_binary_obs_sequence = .false.  
+   write_binary_obs_sequence = .false.
  /
 


More information about the Dart-dev mailing list