[Dart-dev] DART/branches Revision: 12325

dart at ucar.edu dart at ucar.edu
Fri Jan 12 14:36:53 MST 2018


nancy at ucar.edu
2018-01-12 14:36:51 -0700 (Fri, 12 Jan 2018)
334
added support for get_close() routines including converting
vertical on demand.  also added support for damping the
assimilation increments at the model top.

at this point i think all the functionality for cam
is here, although still needs testing.  some support
for cam-chem and waccm-x is there, but i'm sure more
will be needed.




Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90	2018-01-12 19:12:49 UTC (rev 12324)
+++ DART/branches/recam/models/cam-fv/model_mod.f90	2018-01-12 21:36:51 UTC (rev 12325)
@@ -17,11 +17,14 @@
 use      time_manager_mod,  only : set_time, time_type, set_date, &
                                    set_calendar_type, get_date
 use          location_mod,  only : location_type, set_vertical, set_location, &
-                                   get_location,get_close_obs, get_close_state, & 
+                                   get_location, &
                                    VERTISUNDEF, VERTISSURFACE, VERTISLEVEL, &
                                    VERTISPRESSURE, VERTISHEIGHT, &
                                    VERTISSCALEHEIGHT, query_location, &
-                                   set_vertical_localization_coord
+                                   set_vertical_localization_coord, get_dist, &
+                                   loc_get_close_obs => get_close_obs, &
+                                   loc_get_close_state => get_close_state, &
+                                   vertical_localization_on, get_close_type
 use         utilities_mod,  only : find_namelist_in_file, check_namelist_read, &
                                    string_to_logical, string_to_real,& 
                                    logfileunit, do_nml_file, do_nml_term, &
@@ -107,8 +110,8 @@
 integer            :: assimilation_period_days        = 0
 integer            :: assimilation_period_seconds     = 21600
 logical            :: use_log_vertical_scale          = .false.
-real(r8)           :: no_assim_above_pressure         = -1.0      ! in pascals or mb/hPa?
-real(r8)           :: start_damping_ramp_at_pressure  = -1.0
+real(r8)           :: no_assim_above_pressure         = -1.0      ! in pascals 
+real(r8)           :: start_damping_ramp_at_pressure  = -1.0      ! pascals??
 integer            :: debug_level                     = 0
 logical            :: suppress_grid_info_in_output    = .false.
 logical            :: custom_routine_to_generate_ensemble = .false.
@@ -146,7 +149,7 @@
    debug_level
 
 ! global variables
-character(len=512) :: string1, string2
+character(len=512) :: string1, string2, string3
 logical, save      :: module_initialized = .false.
 
 ! domain id for the cam model.  this allows us access to all of the state structure
@@ -199,8 +202,15 @@
 ! default to localizing in pressure.  override with namelist
 integer :: vertical_localization_type = VERTISPRESSURE
 real(r8) :: global_model_top 
-integer :: global_nlevels
+real(r8) :: global_ref_pressure
+integer  :: global_nlevels
 
+! things related to damping at the model top
+logical  :: are_damping = .false.
+real(r8) :: damp_weight = 1.0_r8
+real(r8) :: ramp_start
+type(location_type) :: ramp_start_loc 
+
 ! Precompute pressure -> height map once based on 1010mb surface pressure.
 ! Used only to discard obs on heights above the user-defined top threshold.
 integer, parameter :: generic_nlevels = 17
@@ -280,8 +290,10 @@
 if (using_chemistry) call init_chem_tables()
 
 ! set top limit where obs impacts start to be diminished
-if (start_damping_ramp_at_pressure > 0.0_r8) then
+! only useful if doing vertical localization.
+if (start_damping_ramp_at_pressure > 0.0_r8 .and. vertical_localization_on()) then
    call init_damping_ramp_info()
+   are_damping = .true.
 endif
 
 ! set top limit where obs are discarded
@@ -871,13 +883,9 @@
 
 if (which_vert == VERTISHEIGHT) then
 
-   call height_to_level(generic_nlevels, generic_height_column, vert_value, &
-                        bot_lev, top_lev, fract, my_status)
+   this_pressure = generic_height_to_pressure(vert_value, my_status)
    if (my_status /= 0) return
 
-   this_pressure = generic_pressure_column(bot_lev) * fract + &
-                   generic_pressure_column(top_lev) * (1.0_r8-fract)
-
    if (this_pressure < no_assim_above_pressure) my_status = 14
    return
 endif
@@ -1325,7 +1333,8 @@
 
       do imember=1, ens_size
          call height_to_level(nlevels, height_array(:, imember), vert_val, &
-                              bot_levs(imember), top_levs(imember), vert_fracts(imember), my_status(imember))
+                              bot_levs(imember), top_levs(imember), vert_fracts(imember), &
+                              my_status(imember))
       enddo
 
       if (debug_level > 100) then
@@ -1454,7 +1463,7 @@
 end subroutine cam_height_levels
 
 !-----------------------------------------------------------------------
-!> Compute the pressures at the layer midpoints
+!> Compute the pressures at the layer midpoints for multiple columns


More information about the Dart-dev mailing list