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:
|
nx: int = geogrid.get('e_we', 0) |
|
ny: int = geogrid.get('e_sn', 0) |
|
|
|
# get first nx/ny values if a list of values are set |
|
nx = nx[0] if isinstance(nx, list) else nx |
|
ny = ny[0] if isinstance(ny, list) else ny |
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
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:
wrfcloud/python/src/wrfcloud/config/config.py
Lines 191 to 196 in 5a3d74a
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
Branch name:
feature_<Issue Number>/<Description>Pull request:
feature <Issue Number> <Description>Select: Reviewer(s), Project, and Development issue
Select: Milestone as the next official version