Skip to content
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

Support for choosing the precision mode of MPAS dycore via CIME #347

Closed
kuanchihwang opened this issue Jan 4, 2025 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@kuanchihwang
Copy link
Collaborator

What is the feature/what would you like to discuss?

Since CAM-SIMA PR #327, the capability of running MPAS dycore in single precision mode has been introduced. However, to enable it, users have to manually uncomment the line # export CPPFLAGS += -DSINGLE_PRECISION in the Makefile at src/dynamics/mpas/assets/Makefile.in.CESM.

The ConfigCAM Python class can already parse the dyn_kind argument, which can be specified via the CAM_CONFIG_OPTS variable. Therefore, for better usability, we should allow users to choose the Fortran real kind in MPAS dycore by the usual CIME method:

./xmlchange --append CAM_CONFIG_OPTS="--dyn_kind REAL32" # For single precision
./xmlchange --append CAM_CONFIG_OPTS="--dyn_kind REAL64" # For double precision

Is there anyone in particular you want to be part of this conversation?

No response

Will this change (regression test) answers?

No

Will you be implementing this enhancement yourself?

Yes

@kuanchihwang kuanchihwang added the enhancement New feature or request label Jan 4, 2025
@kuanchihwang kuanchihwang self-assigned this Jan 4, 2025
kuanchihwang added a commit that referenced this issue Feb 20, 2025
### Tag name (required for release branches):

None

### Originator(s):

kuanchihwang

### Descriptions (include the issue title, and the keyword ['closes',
'fixes', 'resolves'] followed by the issue number):

This PR refactors the build system of MPAS dycore. Build performance has
been improved. PIO version selection is now more robust. The
availability of optional MPAS features is now determined by querying
relevant configuration options from CIME rather than being hard-coded.

MPAS dycore is in double precision mode by default. Users can choose to
enable single precision mode by running:

```bash
./xmlchange --append CAM_CONFIG_OPTS="--dyn-kind REAL32"
```

Closes #347.

### Describe any changes made to the build system:

See above.

### Describe any changes made to the namelist:

None

### List any changes to the defaults for the input datasets (e.g.,
boundary datasets):

None

### List all files eliminated and why:

None

### List all files added and what they do:

None

### List all existing files that have been modified, and describe the
changes:

* `M       cime_config/buildlib`
  * Support for enabling optional MPAS features through CIME
  * Remove trailing spaces
* `M       src/dynamics/mpas/assets/Makefile.in.CESM`
  * Avoid using recursively expanded variables
  * Make PIO version selection more robust
  * Support for enabling optional MPAS features through CIME

### Regression tests:

No changes to any existing tests with respect to the last baseline,
`sima0_03_000`.

*
SMS_Ln9.ne5pg3_ne5pg3_mg37.FCAM7.derecho_gnu.cam-outfrq_se_cslam_analy_ic
(Overall: FAIL)
*
SMS_Ln9.ne5pg3_ne5pg3_mg37.FCAM7.derecho_intel.cam-outfrq_se_cslam_analy_ic
(Overall: FAIL)
  * Existing test failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants