[Dart-dev] DART/branches Revision: 13076
dart at ucar.edu
dart at ucar.edu
Tue Mar 26 09:38:10 MDT 2019
nancy at ucar.edu
2019-03-26 09:38:10 -0600 (Tue, 26 Mar 2019)
125
restore changes from the recam branch that need to
be code reviewed and tested carefully before being
put on the rma_trunk.
Modified: DART/branches/models_dev/models/mpas_atm/model_mod.f90
===================================================================
--- DART/branches/models_dev/models/mpas_atm/model_mod.f90 2019-03-26 15:24:45 UTC (rev 13075)
+++ DART/branches/models_dev/models/mpas_atm/model_mod.f90 2019-03-26 15:38:10 UTC (rev 13076)
@@ -35,9 +35,15 @@
loc_get_close_state => get_close_state, &
is_vertical, set_vertical_localization_coord
-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
+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_open_file_readonly, nc_close_file, &
+ nc_add_attribute_to_variable, nc_define_dimension, &
+ nc_define_unlimited_dimension, nc_define_character_variable, &
+ nc_define_double_variable, nc_get_variable, nc_put_variable, &
+ nc_get_dimension_size, nc_variable_exists, nc_dimension_exists, &
+ nc_define_integer_variable
use location_io_mod, only : nc_write_location_atts, nc_write_location
@@ -47,7 +53,7 @@
use xyz_location_mod, only : xyz_location_type, xyz_set_location, xyz_get_location, &
xyz_get_close_type, xyz_get_close_init, xyz_get_close_destroy, &
- xyz_find_nearest
+ xyz_find_nearest, xyz_use_great_circle_dist
use utilities_mod, only : register_module, error_handler, &
E_ERR, E_WARN, E_MSG, logfileunit, get_unit, &
@@ -142,8 +148,7 @@
! generally useful routines for various support purposes.
! the interfaces here can be changed as appropriate.
-public :: get_model_analysis_filename, &
- get_grid_definition_filename, &
+public :: get_init_template_filename, &
analysis_file_to_statevector, &
statevector_to_analysis_file, &
get_analysis_time, &
@@ -166,23 +171,28 @@
character(len=256) :: string1, string2, string3, locstring
logical, save :: module_initialized = .false.
+! length of an mpas (also wrf) time string: YYYY-MM-DD_hh:mm:ss
+integer, parameter :: TIMELEN = 19
+
! Real (physical) constants as defined exactly in MPAS.
! redefined here for consistency with the model.
real(r8), parameter :: rgas = 287.0_r8
+real(r8), parameter :: rv = 461.6_r8
real(r8), parameter :: cp = 1003.0_r8
real(r8), parameter :: cv = 716.0_r8
real(r8), parameter :: p0 = 100000.0_r8
real(r8), parameter :: rcv = rgas/(cp-rgas)
+real(r8), parameter :: rvord = rv/rgas
! earth radius; needed to convert lat/lon to x,y,z cartesian coords.
! FIXME: one of the example ocean files had a global attr with 6371220.0
-! instead of 1229. ??
+! instead of 6371229.0 ??
real(r8), parameter :: radius = 6371229.0 ! meters
-! roundoff error for single precision
+! roundoff error for single precision and double
+! r8 == r4
!real(r8), parameter :: roundoff = 1.0e-5_r8
-
-! r8 r4
+! full r8
real(r8), parameter :: roundoff = 1.0e-12_r8
! Storage for a random sequence for perturbing a single initial state
@@ -203,18 +213,18 @@
logical :: add_static_data_to_diags = .false.
! variables which are in the module namelist
+character(len=256) :: init_template_filename = 'mpas_init.nc'
integer :: vert_localization_coord = VERTISHEIGHT
integer :: assimilation_period_days = 0
integer :: assimilation_period_seconds = 21600
real(r8) :: model_perturbation_amplitude = 0.0001 ! tiny amounts
+logical :: log_p_vert_interp = .true. ! if true, interpolate vertical pressure in log space
+character(len=32) :: calendar = 'Gregorian'
real(r8) :: highest_obs_pressure_mb = 100.0_r8 ! do not assimilate obs higher than this level.
real(r8) :: sfc_elev_max_diff = -1.0_r8 ! do not assimilate if |model - station| height is larger than this [m].
-logical :: log_p_vert_interp = .true. ! if true, interpolate vertical pressure in log space
+logical :: always_assim_surf_altimeters = .false.
+integer :: xyzdebug = 0
integer :: debug = 0 ! turn up for more and more debug messages
-integer :: xyzdebug = 0
-character(len=32) :: calendar = 'Gregorian'
-character(len=256) :: model_analysis_filename = 'mpas_init.nc'
-character(len=256) :: grid_definition_filename = 'mpas_init.nc'
integer :: domid ! For state_structure_mod access
@@ -243,9 +253,21 @@
real(r8) :: outside_grid_level_tolerance = -1.0_r8
More information about the Dart-dev
mailing list