NCAR / wrfcloud

WRF Cloud Framework
Apache License 2.0
14 stars 6 forks source link

Review namelist reads for consistency between single and list items #211

Open georgemccabe opened 1 year ago

georgemccabe commented 1 year ago

Some values in a namelist file can be a list or a single value. Currently we only support using the first domain if multiple domain are provided (issue #133 adds support for multiple domains). We have had to add logic to ensure that only a single value is read when a list of values can be provided. Here is an example:

https://github.com/NCAR/wrfcloud/blob/5a3d74a08a3ca2f75e6f733fe51b2af5f665e64a/python/src/wrfcloud/config/config.py#L191-L196

Describe the Enhancement

Review the existing logic to read namelist files and ensure that a single value is used when a list could potentially be provided by the user. Perhaps a helper function could be written to check and only return the first value if the item is a list. This could help implementing #133 as we could search for where this function is used and update the logic to support multiple domains if it is used to read the value of the first domain.

Time Estimate

Estimate the amount of work required here. Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the enhancement down into sub-issues.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Define the Metadata

Assignee

Labels

Projects and Milestone

Enhancement Checklist