[Dart-dev] DART/branches Revision: 12489

dart at ucar.edu dart at ucar.edu
Tue Apr 3 14:49:03 MDT 2018


nancy at ucar.edu
2018-04-03 14:49:03 -0600 (Tue, 03 Apr 2018)
1118
commit to branch.  lots of changes; many (most) should be migrated
to the rma_trunk after testing.

- add a namelist-controlled option to compute vertical distance in scale height
  without normalizing the value with the surface pressure.
- add option to allow vertical conversion on obs which are marked as vertical
  of pressure but are slightly lower than the surface pressure.  also allow
  vert convert on obs which are lower than P level 1 but above PS.
- add an alternate way to compute pressure profiles; i don't know where
  this code came from but both versions are there for comparison.
- remove some older commented out code which has been replaced by get_state()
  for years already.
- remove the deprecated namelist items for number of moist levels, etc which
  haven't been supported for years.
- use the new netcdf utils to write out the wrf diagnostic info.
- add an option to not write the grid info in the diag files (saves space).
- refactor the different vertical level code into 2 subroutines so it's
  not replicated.
- move single column code tests into subroutine to avoid code replication.





Modified: DART/branches/nsc_updates/models/wrf/model_mod.f90
===================================================================
--- DART/branches/nsc_updates/models/wrf/model_mod.f90	2018-04-03 20:37:51 UTC (rev 12488)
+++ DART/branches/nsc_updates/models/wrf/model_mod.f90	2018-04-03 20:49:03 UTC (rev 12489)
@@ -36,7 +36,7 @@
 !---------------- m o d u l e   i n f o r m a t i o n ------------------
 !-----------------------------------------------------------------------
 
-use         types_mod,   only : r8, i8, deg2rad, missing_r8, ps0, earth_radius, &
+use         types_mod,   only : r8, r4, i8, deg2rad, missing_r8, ps0, earth_radius, &
                                 gas_constant, gas_constant_v, gravity, pi,      &
                                 digits12
 
@@ -60,7 +60,11 @@
 
 use netcdf_utilities_mod, only : nc_add_global_attribute, nc_synchronize_file, &
                                  nc_add_global_creation_time, nc_check, &
-                                 nc_begin_define_mode, nc_end_define_mode
+                                 nc_begin_define_mode, nc_end_define_mode, &
+                                 nc_define_dimension, nc_dimension_exists, &
+                                 nc_put_variable, nc_open_file_readonly, nc_close_file, &
+                                 nc_add_attribute_to_variable, nc_define_real_variable, &
+                                 nc_define_unlimited_dimension
 
 use  mpi_utilities_mod,  only : my_task_id, task_count
 
@@ -104,7 +108,7 @@
                                 get_index_start, get_index_end, &
                                 get_dart_vector_index
 
-use mpi_utilities_mod,   only : all_reduce_min_max
+use mpi_utilities_mod,   only : broadcast_minmax
 
 ! FIXME:
 ! the kinds QTY_CLOUD_LIQUID_WATER should be QTY_CLOUDWATER_MIXING_RATIO, 
@@ -203,6 +207,9 @@
 integer, parameter :: num_state_table_columns = 5
 integer, parameter :: num_bounds_table_columns = 4
 
+! date strings have this format:  YYYY-MM-DD_HH:mm:SS
+integer, parameter :: DATELEN = 19
+
 !-----------------------------------------------------------------------
 ! Model namelist parameters with default values.
 !
@@ -240,22 +247,19 @@
 !JPH -- single column model flag 
 logical :: scm        = .false.    ! using the single column model
 logical :: allow_perturbed_ics = .false.  ! should spin the model up for a while after
+logical :: write_diag_grid_info = .true.  ! add grid info to diagnostic files or not
+! i believe the new code is more correct, but make it easy to
+! compare to the original code which built pressure profiles.
+logical :: orig_pressure_profile_code  = .true.  
 
-! obsolete items; ignored by this code. 
-! non-backwards-compatible change. should be removed, 
-! but see note below about namelist.
-integer :: num_moist_vars
-logical :: surf_obs, soil_data, h_diab
+logical :: normalize_scale_height_by_surface_pressure = .true.    ! CSS added
+logical :: allow_surface_pressure_slightly_too_low    = .false.   ! CSS added
+real(r8) :: surface_pressure_tolerance                = 1000.0_r8 ! pascals
 
 ! adv_mod_command moved to dart_to_wrf namelist; ignored here.
 character(len = 72) :: adv_mod_command = ''
 
-! num_moist_vars, surf_obs, soil_data, h_diab, and adv_mod_command
-! are IGNORED no matter what their settings in the namelist are.
-! they are obsolete, but removing them here will cause a fatal error
-! until users remove them from their input.nml files as well.
-namelist /model_nml/ num_moist_vars, &
-                     num_domains, calendar_type, surf_obs, soil_data, h_diab, &
+namelist /model_nml/ num_domains, calendar_type, &
                      default_state_variables, wrf_state_variables, &
                      wrf_state_bounds, sfc_elev_max_diff, &
                      adv_mod_command, assimilation_period_seconds, &
@@ -262,7 +266,11 @@
                      allow_obs_below_vol, vert_localization_coord, &
                      center_search_half_length, center_spline_grid_scale, &
                      circulation_pres_level, circulation_radius, polar, &
-                     periodic_x, periodic_y, scm, allow_perturbed_ics
+                     periodic_x, periodic_y, scm, allow_perturbed_ics, &
+                     normalize_scale_height_by_surface_pressure, & ! CSS added
+                     allow_surface_pressure_slightly_too_low, &    ! CSS added
+                     surface_pressure_tolerance, write_diag_grid_info, &
+                     orig_pressure_profile_code
 
 ! if you need to check backwards compatibility, set this to .true.
 ! otherwise, leave it as false to use the more correct geometric height
@@ -384,6 +392,7 @@
 real(r8)              :: var_bounds_table(max_state_variables,2)
 ! holds the variable names for a domain when calling add_domain
 character(len=129)    :: netcdf_variable_names(max_state_variables)
+character(len=*), parameter :: routine = 'static_init_model'
 
 !----------------------------------------------------------------------
 
@@ -402,7 +411,7 @@
 ! Temporary warning until this namelist item is removed.
 if (adv_mod_command /= '') then
    msgstring2 = "Set the model advance command in the &dart_to_wrf_nml namelist"


More information about the Dart-dev mailing list