ESCOMP / ESCOMP/CTSM

Have the FATES parameter file created at runtime in the buildnml

Open
#2,126 23 comments 1 reaction 2 assignees Claimed by @ekluzek View on GitHub
enhancement
Dominant language
Fortran
Stars
352
Forks
361
Avg merge
6d 6h
Merged PRs (30d)
8

Description

This was an idea talked about here:

https://github.com/NGEET/fates/issues/1073

We think a better way to handle FATES parameter files is to have the buildnml use the FATES tools to create them from the CDL files in FATES. A shorter way to do this would be for that to happen in a testmod in the shell_commands file. But, longer term we probably want it as part of the configure process for a CESM case. This also gets people in the habit of using the tools to make FATES parameter files themselves which sets them up to configure their files for their situation from the get go. That's a more FATES like way to run, and sets people up for doing things like PPE work, or site specific changes.

Definition of done: FATES parameter files are created from the CDL file stored in FATES

NOTE: The longer term solution that is desired is to store the default parameter file in FATES as XML. With this python tools that modify the file will just have standard python packages and NOT also require an extended Python environment using conda and activating ctsm_pylib as we require now.

Steps to get there:
- [x] #2151
- [x] #2888 get the shell_commands working with error checking and in one place
- [x] ctsm5.3.014 -- brings in a testmod include dir for graceful management of ctsm_pylib for tests
- [x] Move switches to namelist #2904
- [x] Get approval from CESM for the preferred approach (they just don't want custom conda environments for CESM testing)
- [ ] #3570 move FATES to a JSON file
- [ ] Finalize document https://docs.google.com/document/d/1XUjOGcBVbW8dY_0F2kmK8QJaB2nJn1th_474lpQPS_Q/edit?tab=t.0#heading=h.9ifrjra9jr1h
- [ ] Implement just the new XML variable, and the DEFAULT and COPY option for it (DEFAULT is the default option until the step further down) COPY , copies the parameter file to the case directory, CaseDocs, and RUNDIR (this goes in buildnml)
- [ ] - [ ] Make the COPY option the default, but still allow the DEFAULT option
- [ ] Have that testmod include directory used for ALL FATES tests?
- [ ] #2336?
- [ ] Add the MODIFY_PATCH option that runs the modify_params script
- [ ] Add the BATCH_PATCH option, that runs the COPY option and then runs batch_patch on top of it. This will require checking the python environment.
- [ ] Convert the tests to use the BATCH_PATCH option

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.