Skip to content

Namelist Refactor#58

Closed
jjuyeonkim wants to merge 10 commits into
NOAA-GFDL:developfrom
jjuyeonkim:20250908_namelist_2
Closed

Namelist Refactor#58
jjuyeonkim wants to merge 10 commits into
NOAA-GFDL:developfrom
jjuyeonkim:20250908_namelist_2

Conversation

@jjuyeonkim

@jjuyeonkim jjuyeonkim commented Sep 10, 2025

Copy link
Copy Markdown
Collaborator

Description
This is one of multiple PRs to refactor the NDSL's Namelistand NamelistDefaults so that submodules have more ownership over configuration parameters and corresponding default values. NDSL Issue#64

Changes include the following:

  • Removes use of NamelistDefaults in the physics config. Instead, the config class will store the default values directly.
  • Uses simplified ndsl.Namelist
  • Replaces namelist with config in TranslatePhysics
  • Updates translate tests with these changes
  • Modifes github workflow tests to run jjuyeonkim's fork's tests until namelist refactor is completed

Fixes: NOAA-GFDL/NDSL#64 (refactor that affects Pace, NDSL, PyFV3, and PySHiELD).

How Has This Been Tested?
PyFV3 and PySHiELD translate tests run as expected compared to the develop branch. Pace unit tests also pass as expected.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules -- There are changes in Pace, NDSL, PyFV3, and PySHiELD to address this issue. They need to be checked in together.
  • New check tests, if applicable, are included
  • Targeted model, if this change was triggered by a model need/shortcoming

jjuyeonkim and others added 5 commits September 9, 2025 11:57
- Removing NamelistDefaults in the physics config
- Updating to use simplified ndsl.Namelist
- Replacing namelist with config for TranslatePhysicsFortranData2Py
- Modifying workflow tests until namelist refactor is completed
@jjuyeonkim jjuyeonkim mentioned this pull request Sep 10, 2025
8 tasks
@fmalatino fmalatino requested review from FlorianDeconinck, fmalatino and oelbert and removed request for FlorianDeconinck September 12, 2025 16:14
Comment thread pyshield/_config.py

@oelbert oelbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a couple of stylistic changes for now and one group that should be a default.

Comment thread pyshield/_config.py
nwat: int = DEFAULT_INT
schemes: List = None
do_qa: bool = DEFAULT_BOOL
c_cracw: float = NamelistDefaults.c_cracw

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be good to have these live in a local pyshield namelist defaults class but that's a discussion to have with NASA about code layout

Comment thread pyshield/_config.py
Comment thread pyshield/_config.py
Comment thread pyshield/_config.py Outdated
@jjuyeonkim jjuyeonkim marked this pull request as ready for review September 16, 2025 21:16
…tching from_namelist/from_f90nml implementation
@jjuyeonkim jjuyeonkim closed this Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NDSL should provide a framweork for physics namelists instead of specifying the namlist members and default values for specific physics models

3 participants