Update Regionalization to Run as Module Instead of Script#70
Merged
Conversation
… a module instead of as a script
yuqiong77
approved these changes
May 12, 2026
Contributor
There was a problem hiding this comment.
Looks good. Successfully tested regionalization runs in AWS workspace.
Update: Actually the ngen step of the regionalization workflow ran into the following error:
[94c60fdd3c03:00029] *** End of error message ***
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to initialize ForcingsEngine: ForcingsEngine python module is not installed or is not properly configured. (KeyError: 'att_map'
yuqiong77
requested changes
May 12, 2026
Contributor
There was a problem hiding this comment.
Getting the following error:
[94c60fdd3c03:00029] *** End of error message ***
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to initialize ForcingsEngine: ForcingsEngine python module is not installed or is not properly configured. (KeyError: 'att_map'
At:
/ngen-app/ngen-python/lib/python3.11/site-packages/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/bmi_model.py(145): NWMv3_Forcing_Engine_BMI_model_Base
/ngen-app/ngen-python/lib/python3.11/site-packages/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/bmi_model.py(79): <module>
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap_external>(940): exec_module
<frozen importlib._bootstrap>(705): _load_unlocked
<frozen importlib._bootstrap>(1150): _find_and_load_unlocked
<frozen importlib._bootstrap>(1176): _find_and_load
/ngen-app/ngen-python/lib/python3.11/site-packages/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/__init__.py(3): <module>
Contributor
Author
Please try again after pulling the latest image. I am not experiencing this error when using the latest. |
yuqiong77
approved these changes
May 13, 2026
Contributor
yuqiong77
left a comment
There was a problem hiding this comment.
Repulled the latest RTE image and ngen simulation completed successfully
mxkpp
commented
May 13, 2026
Contributor
Author
mxkpp
left a comment
There was a problem hiding this comment.
@yuqiong77 I think the chmod call should be after the ensure_dir call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates
run_region.shto call torun_regionalization.pys.t. it calls it as a module rather than as a script, to update against latest code structure innwm-rte.For example:
python -um ngen_rte.run_regionalization.