Refactor: bmi_model.py, config.py, model.py - #191
Conversation
|
This PR received merges equivalent to these now-closed PRs / branches (those merges need to be reviewed, but I have closed the other PRs to help clean up the repo): Already merged into this PRRefactor of
|
|
Rebased against development. |
|
Rebased against |
| element_slope_azmuith[i] = hyfab.aspect_circmean[ | ||
| i | ||
| ] # NHF aspect is currently in radians, may need to be converted to degrees |
There was a problem hiding this comment.
| element_slope_azmuith[i] = hyfab.aspect_circmean[ | |
| i | |
| ] # NHF aspect is currently in radians, may need to be converted to degrees | |
| # NHF aspect is currently in radians, may need to be converted to degrees | |
| element_slope_azmuith[i] = hyfab.aspect_circmean[i] |
| if TYPE_CHECKING: | ||
| from NextGen_Forcings_Engine_BMI.NextGen_Forcings_Engine.core.config import ( | ||
| ConfigOptions, | ||
| ) |
There was a problem hiding this comment.
Double import
| if TYPE_CHECKING: | |
| from NextGen_Forcings_Engine_BMI.NextGen_Forcings_Engine.core.config import ( | |
| ConfigOptions, | |
| ) |
| b_date: str = None, | ||
| geogrid: str = None, | ||
| output_path: str = None, |
There was a problem hiding this comment.
Are these necessary? BMI standards have the constructor not take any additional arguments. If there are properties that the BMI should potentially know about, they should probably be included in the config file and loaded from that in initialize.
There was a problem hiding this comment.
The official initialize() method (BMI spec) does take only a config file. The class's __init__ exposes these overrides for these 3 parameters. run_bmi_model.py leverages these overrides and continues their exposure through to CLI args, presumably so that a user could point to one configuration file, while varying one or more of these parameters in a for loop, or some similar workflow. Since the run_bmi_model.py was originally set up this way, I feel that we should preserve this behavior.
c6360b3 to
6ec7d80
Compare
…fix namespace error, remove call to `validate_config` (validation occurs automatically in new design)
…ly if rqiMethod is 0 (unused) then rqiThresh property now resolves to None regardless of the value of the RqiThresh key in the config file.
…s tests relative to refactored class structures and new key exclusions in test utils
|
Rebased after rebasing the base |
PR to merge a
pre_devbranch containing major refactoring to BMI_model.py, Config.py, and Model.py. Thepre_devbranch is intended as a staging branch whereby combinations of the 3 refactored files can be tested and adjustments made before an actual merge into development.Additions
Removals
Changes
Testing
Screenshots
Notes
Todos
Checklist
Testing checklist
Target Environment support