Skip to content

Add Python tool for querying parameter values #3394

Description

@samsrabin

Some ideas:

  • query_parameter $parameter would return the default value(s) for $parameter in the codebase that $PWD is in.
  • The user wouldn't need to specify whether to look in the paramfile or the namelists; it would figure that out on its own.
  • --ctsm-dir /path/to/ctsm/checkout would let you query values for arbitrary locations.
  • Return default values for all configurations. So, e.g., query_parameter co2_ppmv would return
sim_year="1000": 379.0
sim_year="1979": 336.6
...
  • Allow specifying arbitrary qualifiers, like sim_year in the above.
  • Nice formatting for PFT-specific parameters. E.g., query_parameter taulnir would return:
not_vegetated: 0
needleleaf_evergreen_temperate_tree: 0.32
...

Activity

  1. added this to the Eventually milestone on Aug 7, 2025
  2. added
    b4bbit-for-bit
    usabilityImprove or clarify user-facing options
    on Aug 7, 2025
  3. changed the title [-]Add Python tool for getting parameter values[/-] [+]Add Python tool for querying parameter values[/+] on Aug 7, 2025
  4. samsrabin commented on Aug 25, 2025

    @samsrabin
    MemberAuthor

    query_paramfile is now on master as of ctsm5.3.071. However, I'm leaving this issue open because it's broader than just working with parameter files; we also want it to work with namelist parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    b4bbit-for-bitusabilityImprove or clarify user-facing options

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions