-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script to create namelist_definition_mpas_dycore.xml from MPAS-A Registry.xml #252
Labels
enhancement
New feature or request
Comments
kuanchihwang
added a commit
that referenced
this issue
Jan 14, 2025
…re (#327) ### Tag name (required for release branches): sima0_01_001 ### Originator(s): kuanchihwang ### Descriptions (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number): This PR implements finalization for MPAS dynamical core. This PR also implements various enhancements for MPAS dynamical core: * Comply with CAM(-SIMA) coding standards by moving `use` statements to the smallest scope possible. * Support MPAS dynamical core in single precision mode. Running in single precision mode improves performance and reduces memory usage at the cost of accuracy. * Reorganize directory structure for better clarity. Files that are not source code are now placed in the `assets` directory. * Prefix all MPAS namelist group and option names with `mpas_`. They are now easily distinguishable from CAM-SIMA ones. The possibility of name collisions with CAM-SIMA ones is also resolved once and for all. * Add Python script for generating namelist definition. Closes #252. * Update namelist definition so that MPAS dynamical core should now be able to run analytic cases out of the box. * Various code improvements. ### Describe any changes made to the build system: Due to the slight reorganization of directory structure, `cime_config/buildlib` is updated with the new paths. ### Describe any changes made to the namelist: The namelist options for running analytic cases with MPAS dynamical core are updated to match CAM. ### List any changes to the defaults for the input datasets (e.g., boundary datasets): The input files for running analytic cases with MPAS dynamical core are updated to match CAM. The supported resolutions are: * Horizontal resolutions of `mpasa480`, `mpasa120`, `mpasa60`, and `mpasa30` with 32 vertical layers. * Horizontal resolutions of `mpasa480`, `mpasa120`, and `mpasa60` with 58 vertical layers. * Horizontal resolutions of `mpasa480`, `mpasa120`, and `mpasa60` with 93 vertical layers. ### List all files eliminated and why: None ### List all files added and what they do: * `A src/dynamics/mpas/assets/0001-Prefix-all-MPAS-namelist-group-and-option-names.patch` * Patch that prefixes all MPAS namelist group and option names * `A src/dynamics/mpas/assets/0002-Disable-physics-for-MPAS-dycore-only-build.patch` * Patch that disables physics for MPAS dycore-only build * `A src/dynamics/mpas/assets/0003-Declare-constants-at-the-native-precision-of-MPAS.patch` * Patch that declares constants at the native precision of MPAS * `A src/dynamics/mpas/assets/generate_namelist_definition.py` * Add Python script for generating namelist definition ### List all existing files that have been modified, and describe the changes: * `M cime_config/buildlib` * Reorganize directory structure for better clarity * `M cime_config/namelist_definition_cam.xml` * Update namelist definition for CAM-SIMA * `M src/dynamics/mpas/driver/dyn_mpas_subdriver.F90` * Add support for MPAS output stream * Relax restrictions on mixed precision * Use existing functionality to access MPAS configuration * Implement finalization for MPAS dynamical core * Move `use` statements to the smallest scope possible * Support MPAS dynamical core in single precision mode * `M src/dynamics/mpas/dyn_comp.F90` * Implement `dyn_final` * Move `use` statements to the smallest scope possible * Support MPAS dynamical core in single precision mode * Add `protected` attribute to grid/mesh variables * Change some wording to plural * Include argument keyword for better clarity * `M src/dynamics/mpas/dyn_coupling.F90` * Move `use` statements to the smallest scope possible * Support MPAS dynamical core in single precision mode * Change some wording to plural * Include argument keyword for better clarity * `M src/dynamics/mpas/dyn_grid.F90` * Move `use` statements to the smallest scope possible * Support MPAS dynamical core in single precision mode * Nullify pointers that are no longer needed * Add `protected` attribute to grid/mesh variables * `M src/dynamics/mpas/namelist_definition_mpas_dycore.xml` * Update namelist definition for MPAS dynamical core * `M src/dynamics/mpas/stepon.F90` * Wire up `dyn_final` * Move `use` statements to the smallest scope possible * `R src/dynamics/mpas/assets/Makefile.in.CESM` * Reorganize directory structure for better clarity * Remove hacky `sed` commands from `Makefile` * Apply patches before building * `R src/dynamics/mpas/assets/Makefile` * Reorganize directory structure for better clarity ### Regression tests: New baseline for MPAS dynamical core. ``` SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho (Overall: DIFF) details: FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho NLCOMP FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho BASELINE SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho (Overall: DIFF) details: FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho NLCOMP FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho BASELINE ``` No changes to other existing tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the feature/what would you like to discuss?
The
namelist_definition_mpas_dycore.xml
file being discussed in #248 was generated by a Python script using a MPAS-A Registry.xml as input. To ensure consistency and enable other developers to easily update the namelist definition for MPAS-A as a dycore, this script should be added to CAM-SIMA.Original version of the script: https://github.com/gdicker1/TranslateXML_MPAStoCAMSIMA
Is there anyone in particular you want to be part of this conversation?
@nusbaume @mgduda @kuanchihwang
Will this change (regression test) answers?
No
Will you be implementing this enhancement yourself?
Yes
The text was updated successfully, but these errors were encountered: