[Dart-dev] DART/branches Revision: 12304
dart at ucar.edu
dart at ucar.edu
Wed Jan 10 11:45:32 MST 2018
nancy at ucar.edu
2018-01-10 11:45:29 -0700 (Wed, 10 Jan 2018)
415
try to clean up and streamline some routines now that
we are more sure of what we need. remove unused vars,
combine small routines that are never used independently,
add more error checking and early returns.
in all the places we test an ensemble sized error array
we should be using track_status() instead.
has the start of damping at the top, but not working yet.
does reject obs above the given threshold.
Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90 2018-01-09 22:16:01 UTC (rev 12303)
+++ DART/branches/recam/models/cam-fv/model_mod.f90 2018-01-10 18:45:29 UTC (rev 12304)
@@ -25,7 +25,7 @@
use utilities_mod, only : find_namelist_in_file, check_namelist_read, &
string_to_logical, string_to_real,&
logfileunit, do_nml_file, do_nml_term, &
- register_module, error_handler, do_output,&
+ register_module, error_handler, &
file_exist, to_upper, E_ERR, E_MSG
use obs_kind_mod, only : QTY_SURFACE_ELEVATION, QTY_PRESSURE, &
QTY_GEOMETRIC_HEIGHT, QTY_VERTLEVEL, &
@@ -32,7 +32,8 @@
QTY_SURFACE_PRESSURE, QTY_PRECIPITABLE_WATER, &
QTY_TEMPERATURE, QTY_SPECIFIC_HUMIDITY, &
QTY_GEOPOTENTIAL_HEIGHT, &
- get_index_for_quantity, get_num_quantities
+ get_index_for_quantity, get_num_quantities, &
+ get_name_for_quantity
use mpi_utilities_mod, only : my_task_id
use random_seq_mod, only : random_seq_type, init_random_seq, random_gaussian
use ensemble_manager_mod, only : ensemble_type, get_my_num_vars, get_my_vars
@@ -51,7 +52,8 @@
nc_synchronize_file, nc_end_define_mode, &
nc_begin_define_mode, nc_open_file_readonly, &
nc_close_file, nc_variable_exists
-use chem_tables_mod, only : init_chem_tables, finalize_chem_tables, chem_convert_factor
+use chem_tables_mod, only : init_chem_tables, finalize_chem_tables, &
+ chem_convert_factor
use quad_utils_mod, only : quad_interp_handle, init_quad_interp, &
set_quad_coords, finalize_quad_interp, &
quad_lon_lat_locate, quad_lon_lat_evaluate, &
@@ -159,7 +161,6 @@
type cam_1d_array
integer :: nsize
real(r8), allocatable :: vals(:)
- !>@todo FIXME do we need a string name here anymore? (no, so far)
end type
type cam_grid
@@ -195,6 +196,11 @@
! Surface potential; used for calculation of geometric heights.
real(r8), allocatable :: phis(:, :)
+! default to localizing in pressure. override with namelist
+integer :: vertical_localization_type = VERTISPRESSURE
+real(r8) :: global_model_top
+integer :: global_nlevels
+
! 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
@@ -258,27 +264,27 @@
call read_grid_info(cam_template_filename, grid_data)
-! parse var_names, kind_list, clamp_vals, update_list
-! from the &model_mod_nml state_variables namelist item
-! and call add_domain() to tell DART how to read in
-! variables from the input netcdf file to fill the state.
-! (this happens after static_init_model() returns.)
+! read the namelist &model_nml :: state_variables
+! to set up what will be read into the cam state vector
call set_cam_variable_info(state_variables, nfields)
-!> convert from string in namelist to integer (e.g. VERTISxxx)
-!> and tell the dart code which vertical type we want to localize in.
+! initialize global values that are used frequently
+call init_globals()
+
+! convert from string in namelist to integer (e.g. VERTISxxx)
+! and tell the dart code which vertical type we want to localize in.
call set_vert_localization(vertical_localization_coord)
-! if you are going to have chemistry variables in the model state, set
+! if you have chemistry variables in the model state, set
! this namelist variable so we can initialize the proper tables
if (using_chemistry) call init_chem_tables()
-!>@todo we need to set the model top related stuff here
+! set top limit where obs impacts start to be diminished
if (start_damping_ramp_at_pressure > 0.0_r8) then
- print*, '"start_damping_ramp_at_pressure" not implemented yet'
+ call init_damping_ramp_info()
endif
-!>@todo we need to set the model top related stuff here
+! set top limit where obs are discarded
if (no_assim_above_pressure > 0.0_r8) then
write(string1, *) 'discarding observations above a pressure level of ', &
no_assim_above_pressure, ' Pascals' !>@todo FIXME units???
@@ -289,6 +295,7 @@
call store_generic_columns()
endif
+
end subroutine static_init_model
@@ -440,6 +447,7 @@
More information about the Dart-dev
mailing list