ESCOMP / ESCOMP/CTSM

Add Python tool for querying parameter values

Open
#3,394 1 comment 0 reactions 0 assignees View on GitHub
b4b usability
Dominant language
Fortran
Stars
352
Forks
361
Avg merge
6d 6h
Merged PRs (30d)
8

Description

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
...
```
- Allow saving output to a CSV file usable in [the "set parameters" script](https://github.com/ESCOMP/CTSM/issues/3393#issuecomment-3168299266).

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.