Misc. ideas for query_paramfile and set_paramfile
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 8
Description
Eventually will want to add issues for these; maybe just as we start to address them.
`query_paramfile`:
- Add `--describe` or similar flag to print parameter variable attributes.
- Include 0-based index next to PFT names.
- Pretty-print ALL 1-d parameters like we do those that are PFT-dimensioned.
- Pretty-print multi-dimensional parameters too.
- `--group-crop` option. At a simple level this could just group lines for all CFTs associated with a crop together; e.g., the four temperate/tropical x rainfed/irrigated "corn" types. We could also get fancier with it: If someone says `--group-crops -p corn` we would show just `$param: corn: $value` if `$param` is the same for all corn CFTs.
`set_paramfile`:
- Add handling of multi-dimensional parameters
- Add optional `history_msg` argument to `_add_cmd_to_history()`, plus anything that calls it. Throw error if `history_msg` isn't a string.
- Have `_add_cmd_to_history()` throw warning if `sys.argv` and `history_msg` are empty.
- Enable setting individual array members directly like `param(I,J)` or `param(strI,strJ)` or `pft_param(needleleaf_deciduous_boreal_tree)`.
- Add ability to assign a fill value to variables that don't have one.
- Add ability to set integer variables to their fill value. This is harder than it sounds!
- ~~Add ability to change multiple PFTs (or any 1-d parameter, I guess) to the same value without having to write it like `param=value,value,value,...`. Just `param=value` should work.~~ Done with #3560.
- `--group-crop` option to assign the same value for all CFTs associated with a crop. E.g., change the value for all four corn CFTs with `--group-crop -p corn $param=$value`.
Both:
- Allow querying PFTs by 0-based index
- Work with CDL files (Issue #3423)... or something. [CTSM_calibration](https://github.com/NCAR/CTSM_calibration) uses e.g. CSV for this.
Contributor guide
Assessment
This issue has not been assessed yet.