[Dart-dev] DART/branches Revision: 12363

dart at ucar.edu dart at ucar.edu
Thu Jan 18 11:03:43 MST 2018


nancy at ucar.edu
2018-01-18 11:03:43 -0700 (Thu, 18 Jan 2018)
153
this doesn't compile yet.  it needs some constants defined.
the array operations at the end also need a where() which i added
but i'm not sure it's ok.




Modified: DART/branches/recam/observations/forward_operators/obs_def_upper_atm_mod.f90
===================================================================
--- DART/branches/recam/observations/forward_operators/obs_def_upper_atm_mod.f90	2018-01-18 17:56:57 UTC (rev 12362)
+++ DART/branches/recam/observations/forward_operators/obs_def_upper_atm_mod.f90	2018-01-18 18:03:43 UTC (rev 12363)
@@ -75,7 +75,7 @@
 !      call get_expected_gnd_gps_vtec(state_handle, ens_size, location, expected_obs, istatus)
 ! case(SSUSI_O_N2_RATIO)
 !      call get_expected_O_N2_ratio(state_handle, ens_size, location, expected_obs, istatus)
-! case(SABER_TEMPERATURE, AURAMLS_TEMPERATURE)
+! case(3000)   ! what obs types need this routine?  replace -2 with an obs type
 !      call get_expected_oxygen_ion_density(state_handle, ens_size, location, expected_obs, istatus)
 ! END DART PREPROCESS GET_EXPECTED_OBS_FROM_DEF
 
@@ -90,6 +90,8 @@
 !      continue
 ! case(SSUSI_O_N2_RATIO)
 !      continue
+! case(3000)
+!      continue
 ! END DART PREPROCESS READ_OBS_DEF
 
 ! BEGIN DART PREPROCESS WRITE_OBS_DEF
@@ -103,6 +105,8 @@
 !      continue
 ! case(SSUSI_O_N2_RATIO)
 !      continue
+! case(3000)
+!      continue
 ! END DART PREPROCESS WRITE_OBS_DEF
 
 ! BEGIN DART PREPROCESS INTERACTIVE_OBS_DEF
@@ -116,6 +120,8 @@
 !      continue
 ! case(SSUSI_O_N2_RATIO)
 !      continue
+! case(3000)
+!      continue
 ! END DART PREPROCESS INTERACTIVE_OBS_DEF
 
 ! BEGIN DART PREPROCESS MODULE CODE
@@ -282,9 +288,8 @@
    if (iAlt > size(ALT)) then
       write(string1,'(''more than '',i4,'' levels in the model.'')') MAXLEVELS
       string2='increase MAXLEVELS in obs_def_upper_atm_mod.f90, rerun preprocess and recompile.'
-      string3='increase ALT, IDensityS_ie array sizes in code and recompile'
       call error_handler(E_ERR, 'get_expected_gnd_gps_vtec', string1, &
-           source, revision, revdate, text2=string2, text3=string3)
+           source, revision, revdate, text2=string2)
    endif
 
    ! At each altitude interpolate the 2D IDensityS_ie to the lon-lat where data 
@@ -303,8 +308,14 @@
    nAlts = nAlts+1
 enddo LEVELS
 
-if (nAlts == 0) return
+! failed first time through loop - no values to return.
+if (nAlts == 0) then
+   obs_val(:) = MISSING_R8
+   return
+endif
 
+! clear the error from the last level and start again?
+istatus(:) = 0
 tec=0.0_r8 !start with zero for the summation
 
 do iAlt = 1, nAlts-1 !approximate the integral over the altitude as a sum of trapezoids
@@ -315,7 +326,6 @@
 where (istatus == 0) &
    obs_val = tec * 10.0**(-16) !units of TEC are "10^16" #electron/m^2 instead of just "1" #electron/m^2
 
-! return code set by track_status
 
 end subroutine get_expected_gnd_gps_vtec
 
@@ -410,6 +420,10 @@
 nilevels = 0
 heights = 0.0_r8
 
+!>@todo FIXME: this is setting the same location for VERTISLEVEL
+!> as the loop below, so one can *not* be filling the interfaces and 
+!> the other filling the midpoints.
+
 FILLINTERFACES : do ilayer = 1,MAXLEVELS
 
    loc = set_location(loc_lon, loc_lat, real(ilayer,r8), VERTISLEVEL)
@@ -422,7 +436,10 @@
 enddo FILLINTERFACES
 
 
-if (nilevels == 0) return
+if (nilevels == 0) then
+   obs_val(:) = missing_r8
+   return
+endif
 
 istatus(:) = 0
 thickness = 0.0_r8
@@ -432,7 +449,8 @@
 
 nlevels = 0


More information about the Dart-dev mailing list