[Dart-dev] DART/branches Revision: 11098

dart at ucar.edu dart at ucar.edu
Mon Feb 13 11:03:33 MST 2017


nancy at ucar.edu
2017-02-13 11:03:32 -0700 (Mon, 13 Feb 2017)
470
added more debugging to the model interpolate routine, and a clean
return if being asked to interpolate a kind that isn't in the state vector.
this wasn't handled before - it called abort in a confusing spot without
indicating what the problem actually was.

also committed a slightly updated input.nml - it may not have all the
fields yet that are required.  for example, the test case has humidity
observations but i can't see any humidity fields in the input files.




Modified: DART/branches/rma_single_file/models/cm1/model_mod.f90
===================================================================
--- DART/branches/rma_single_file/models/cm1/model_mod.f90	2017-02-11 00:38:10 UTC (rev 11097)
+++ DART/branches/rma_single_file/models/cm1/model_mod.f90	2017-02-13 18:03:32 UTC (rev 11098)
@@ -1015,7 +1015,7 @@
 
 if (debug > 0) then
    call write_location(0,location,charstring=string1)
-   write(string1, *) my_task_id(), 'kind, loc ', obs_kind, trim(string1)
+   write(string1, *) 'task ', my_task_id(), ' kind, loc ', obs_kind, ' ', trim(string1)
    call say(string1)
 endif
 
@@ -1022,13 +1022,41 @@
 obs_loc_array = get_location(location)
 
 varid = get_varid_from_kind(domid, obs_kind)
+if (varid < 0) then
+   if (debug > 0) then
+      call write_location(0,location,charstring=string1)
+      write(string1, *) 'obs kind not found in state.  kind ', obs_kind, ' (', &
+                                 trim(get_raw_obs_kind_name(obs_kind)), ')  loc: ', trim(string1)
+
+      call say(string1)
+   endif
+   istatus(:) = 11
+   return ! this kind isn't found in the state vector
+endif
+
 nlevs = get_z_axis_length(varid)
 ndims = get_num_dims(domid, varid)
+if (debug > 0) then
+   write(string1, *) 'varid, nlevs, ndims = ', varid, nlevs, ndims
+   call say(string1)
+endif
 ! 2d vs. 3d variable test
 if (ndims == 3) then
    nlevs = 2
-else ! 2D, surface obs
+else if (ndims == 2) then ! 2D, surface obs
    nlevs = 1
+else
+   ! should this be an error?
+   write(string1, *) 'ndims not 3 or 2, unexpected? is ', ndims
+   call say(string1)
+   nlevs = 1  !? just a guess
+   call write_location(0,location,charstring=string1)
+   write(string1, *) 'task ', my_task_id(), ' kind ', obs_kind, ' (', &
+                             trim(get_raw_obs_kind_name(obs_kind)), ')  loc: ', trim(string1)
+
+   call say(string1)
+   write(string1, *) 'varid, nlevs, ndims = ', varid, nlevs, ndims
+   call say(string1)
 endif
 
 
@@ -1038,7 +1066,10 @@
    return ! exit early
 endif
 
-if (debug > 0) print*, 'nlevs', nlevs
+if (debug > 0) then
+   write(string1, *) 'nlevs', nlevs
+   call say(string1)
+endif
 
 ! Interpolate the height field (z) to get the height at each level at 
 ! the observation location. This allows us to find which level an observation 

Modified: DART/branches/rma_single_file/models/cm1/work/input.nml
===================================================================
--- DART/branches/rma_single_file/models/cm1/work/input.nml	2017-02-11 00:38:10 UTC (rev 11097)
+++ DART/branches/rma_single_file/models/cm1/work/input.nml	2017-02-13 18:03:32 UTC (rev 11098)
@@ -1,4 +1,7 @@
+&assim_model_nml
+/
 
+
 &assim_tools_nml
   adaptive_localization_threshold = -1
   cutoff                          = 100
@@ -20,7 +23,6 @@
 
 
 &ensemble_manager_nml
-  single_restart_file_in = .true.
 /
 
 
@@ -27,7 +29,7 @@
 &filter_nml
   adv_ens_command             = "../shell_scripts/advance_model.csh"
   async                       = 2
-  ens_size                    = 20
+  ens_size                    = 3
   first_obs_days              = -1
   first_obs_seconds           = -1
   inf_damping                 = 0.9,                     1.0
@@ -36,7 +38,6 @@
   inf_initial                 = 1.0,                     1.0
   inf_initial_from_restart    = .false.,                 .false.


More information about the Dart-dev mailing list