This PR implements the model_grid_init subroutine, which is responsible for initializing various model grids (e.g., dynamics, physics) in terms of dynamics decomposition. Additionally, MPAS framework initialization and reading time-invariant (e.g., grid/mesh) variables are also being done in this PR.
Implement a generic mechanism (dyn_mpas_read_write_stream) for CAM-SIMA to input/output data to/from MPAS dynamical core. This mechanism is the consolidation and generalization of the cam_mpas_read_static[1], cam_mpas_setup_restart[2], cam_mpas_read_restart[3] and cam_mpas_write_restart[4] subroutines in current CAM. Hundreds of lines of code are reduced as a result.
Implement a generic mechanism (dyn_mpas_exchange_halo) for CAM-SIMA to exchange the halo layers of an arbitrary decomposed variable in MPAS dynamical core.
Implement accessor subroutines (dyn_mpas_get_variable_pointer_* and dyn_mpas_get_variable_value_* families) for users to access the internal states of MPAS dynamical core.
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
# Edit `env_build.xml`:
# * Change `CAM_LINKED_LIBS` to only `-lmpas`.
# * Change `DEBUG` to `TRUE`.
# Edit `env_run.xml`:
# * Change `DOUT_S` to `FALSE`.
# Add the following to `user_nl_cam`:
# * `config_block_decomp_file_prefix = '${DIN_LOC_ROOT}/atm/cam/inic/mpas/mpasa480.graph.info.part.'`.
./case.build
./case.submit
Observe log entries similar to the following in atm.log.<job-id>.<date>-<time>:
This PR implements the
model_grid_init
subroutine, which is responsible for initializing various model grids (e.g., dynamics, physics) in terms of dynamics decomposition. Additionally, MPAS framework initialization and reading time-invariant (e.g., grid/mesh) variables are also being done in this PR.Implementation notes:
dyn_mpas_init_phase3
).dyn_mpas_read_write_stream
) for CAM-SIMA to input/output data to/from MPAS dynamical core. This mechanism is the consolidation and generalization of thecam_mpas_read_static
[1],cam_mpas_setup_restart
[2],cam_mpas_read_restart
[3] andcam_mpas_write_restart
[4] subroutines in current CAM. Hundreds of lines of code are reduced as a result.dyn_mpas_exchange_halo
) for CAM-SIMA to exchange the halo layers of an arbitrary decomposed variable in MPAS dynamical core.dyn_mpas_get_variable_pointer_*
anddyn_mpas_get_variable_value_*
families) for users to access the internal states of MPAS dynamical core.Test steps:
Observe log entries similar to the following in
atm.log.<job-id>.<date>-<time>
: