This PR implements the dyn_init subroutine, which is responsible for initializing MPAS dynamical core by one of the following methods:
Setting analytic initial condition.
Reading initial condition from a file.
Restarting from a file.
This should be the last step of MPAS dynamical core initialization. After this PR, MPAS dynamical core is ready for time integration.
Implementation notes:
More elaborate error checking for the allocation of constituents.
Support for deferring the definition of constituents until run-time. There are no longer assumptions about the index order or position of constituents.
Accessor functions/subroutines for querying:
Local mesh dimensions.
Constituent names and indexes.
Mapping between constituent indexes and MPAS scalar indexes.
Enhancements that enable constructing an arbitrary list of variables to input/output data to/from MPAS dynamical core.
Enhancements and fixes for handling ordinary variables and variable arrays during input.
Finish MPAS dynamical core initialization.
Test steps:
"<path-to>/CAM-SIMA/cime/scripts/create_newcase" --case "<case-name>" --compset FKESSLER --project "<project-id>" --res mpasa480_mpasa480 --run-unsupported
cd "<case-name>"
./case.setup
./xmlchange CAM_LINKED_LIBS="-lmpas"
./xmlchange DEBUG="TRUE"
./xmlchange DOUT_S="FALSE"
# Add the following to `user_nl_cam`:
# * `config_block_decomp_file_prefix = '${DIN_LOC_ROOT}/atm/cam/inic/mpas/mpasa480.graph.info.part.'`.
# * `config_dt = 1800.0`.
./case.build
./case.submit
Observe log entries similar to the following in atm.log.<job-id>.<date>-<time>:
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_define_scalar entered
dyn_mpas_debug_print (0): Constituent index 1
dyn_mpas_debug_print (0): Constituent name: cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water
dyn_mpas_debug_print (0): Is water species: T
dyn_mpas_debug_print (0): Index mapping from constituent to MPAS scalar: 1 -> 1
dyn_mpas_debug_print (0): Constituent index 2
dyn_mpas_debug_print (0): Constituent name: rain_mixing_ratio_wrt_moist_air_and_condensed_water
dyn_mpas_debug_print (0): Is water species: T
dyn_mpas_debug_print (0): Index mapping from constituent to MPAS scalar: 2 -> 2
dyn_mpas_debug_print (0): Constituent index 3
dyn_mpas_debug_print (0): Constituent name: water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
dyn_mpas_debug_print (0): Is water species: T
dyn_mpas_debug_print (0): Index mapping from constituent to MPAS scalar: 3 -> 3
dyn_mpas_debug_print (0): MPAS scalar index 1
dyn_mpas_debug_print (0): MPAS scalar name: cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water
dyn_mpas_debug_print (0): Is water species: T
dyn_mpas_debug_print (0): Index mapping from MPAS scalar to constituent: 1 -> 1
dyn_mpas_debug_print (0): MPAS scalar index 2
dyn_mpas_debug_print (0): MPAS scalar name: rain_mixing_ratio_wrt_moist_air_and_condensed_water
dyn_mpas_debug_print (0): Is water species: T
dyn_mpas_debug_print (0): Index mapping from MPAS scalar to constituent: 2 -> 2
dyn_mpas_debug_print (0): MPAS scalar index 3
dyn_mpas_debug_print (0): MPAS scalar name: water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
dyn_mpas_debug_print (0): Is water species: T
dyn_mpas_debug_print (0): Index mapping from MPAS scalar to constituent: 3 -> 3
dyn_mpas_debug_print (0): index_qv = 3
dyn_mpas_debug_print (0): moist_start = 1
dyn_mpas_debug_print (0): moist_end = 3
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_define_scalar completed
dyn_debug_print (0): Calling check_topography_data
dyn_debug_print (0): Topography file is not used
dyn_debug_print (0): Calling set_analytic_initial_condition
dyn_debug_print (0): Preparing to set analytic initial condition
dyn_debug_print (0): Setting MPAS state "u"
U initialized by "BC_WAV_SET_IC"
V initialized by "BC_WAV_SET_IC"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_compute_edge_wind entered
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "uReconstructZonal"
dyn_mpas_debug_print (0): Exchanging halo layers for "uReconstructZonal"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "uReconstructMeridional"
dyn_mpas_debug_print (0): Exchanging halo layers for "uReconstructMeridional"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "u"
dyn_mpas_debug_print (0): Exchanging halo layers for "u"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_compute_edge_wind completed
dyn_debug_print (0): Setting MPAS state "w"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "w"
dyn_mpas_debug_print (0): Exchanging halo layers for "w"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_debug_print (0): Setting MPAS state "scalars"
dyn_debug_print (0): Conversion is needed and applied for water vapor mixing ratio
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "scalars"
dyn_mpas_debug_print (0): Exchanging halo layers for "scalars"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_debug_print (0): Setting MPAS state "rho" and "theta"
BC_WAV_SET_IC: Model top (in km) is at z= 41.426919000000005
PS initialized by "BC_WAV_SET_IC"
T initialized by "BC_WAV_SET_IC"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "rho"
dyn_mpas_debug_print (0): Exchanging halo layers for "rho"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "theta"
dyn_mpas_debug_print (0): Exchanging halo layers for "theta"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_debug_print (0): Setting MPAS state "rho_base" and "theta_base"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "rho_base"
dyn_mpas_debug_print (0): Exchanging halo layers for "rho_base"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo entered
dyn_mpas_debug_print (0): Inquiring field information for "theta_base"
dyn_mpas_debug_print (0): Exchanging halo layers for "theta_base"
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_exchange_halo completed
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_init_phase4 entered
dyn_mpas_debug_print (0): Coupling time interval is 1800.000000 seconds
dyn_mpas_debug_print (0): Time step is 1800.000000 seconds
dyn_mpas_debug_print (0): Setting up OpenMP threading
dyn_mpas_debug_print (0): Setting up dimensions
dyn_mpas_debug_print (0): Initializing time levels
dyn_mpas_debug_print (0): Initializing atmospheric variables
dyn_mpas_debug_print (0): Initializing dynamics
dyn_mpas_debug_print (0): dyn_mpas_subdriver::dyn_mpas_init_phase4 completed
dyn_mpas_debug_print (0): Successful initialization of MPAS dynamical core
This PR implements the
dyn_init
subroutine, which is responsible for initializing MPAS dynamical core by one of the following methods:This should be the last step of MPAS dynamical core initialization. After this PR, MPAS dynamical core is ready for time integration.
Implementation notes:
Test steps:
Observe log entries similar to the following in
atm.log.<job-id>.<date>-<time>
: