You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The troute-network package (and possibly other places) expects compute_parameters.data_assimilation_parameters.reservoir_da to have subkeys reservoir_persistence_usace and reservoir_persistence_usgs. However, troute-config defines this property as an Optional[ReservoirDA]. As a result, if reservoir_persistence_usace and reservoir_persistence_usgs are present, we see this error:
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ValidationError: 2 validation errors for Config
compute_parameters -> data_assimilation_parameters -> reservoir_da -> reservoir_persistence_usace
extra fields not permitted (type=value_error.extra)
compute_parameters -> data_assimilation_parameters -> reservoir_da -> reservoir_persistence_usgs
extra fields not permitted (type=value_error.extra)
During troubleshooting, it was suggested by @aaraney that, within the DataAssimilationParameters model, the reservoir_da attribute may need to be of type Optional[ReservoirPersistenceDA] rather than Optional[ReservoirDA].
Note that if we comment out reservoir_persistence_usace and reservoir_persistence_usgs from the config, then this error happens:
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): AttributeError: 'NoneType' object has no attribute 'get'
At:
/usr/local/lib64/python3.9/site-packages/troute/HYFeaturesNetwork.py(32): read_geopkg
/usr/local/lib64/python3.9/site-packages/troute/HYFeaturesNetwork.py(154): read_geo_file
/usr/local/lib64/python3.9/site-packages/troute/HYFeaturesNetwork.py(253): __init__
/usr/local/lib/python3.9/site-packages/nwm_routing/__main__.py(80): main_v04
Here are lines 31 and 32 of src/troute-network/troute/HYFeaturesNetwork.py:
A note that I did attempt to change the reservoir_da property type from Optional[ReservoirDA] to Optional[ReservoirPersistenceDA], as @aaraney suggested and as was mentioned in the description, but that led to a different error during testing:
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): AttributeError: 'ReservoirPersistenceDA' object has no attribute 'reservoir_rfc_da'
At:
/usr/local/lib/python3.9/site-packages/troute/config/config.py(118): check_rfc_parameters
/usr/local/lib/python3.9/site-packages/nwm_routing/input.py(44): _input_handler_v04
/usr/local/lib/python3.9/site-packages/nwm_routing/__main__.py(54): main_v04
@robertbartel It looks like, for the original error listed here, you're missing a level in the config file. They way troute-config is setup, it should be compute_parameters -> data_assimilation_parameters -> reservoir_da -> reservoir_persistence_da -> reservoir_persistence_usace
The two config files in /t-route/test/LowerColorado_TX_v4/ are the most recent examples that work with V4. You should be able to use these as guidelines for running the latest version of t-route.
The troute-network package (and possibly other places) expects
compute_parameters.data_assimilation_parameters.reservoir_da
to have subkeysreservoir_persistence_usace
andreservoir_persistence_usgs
. However, troute-config defines this property as anOptional[ReservoirDA]
. As a result, ifreservoir_persistence_usace
andreservoir_persistence_usgs
are present, we see this error:During troubleshooting, it was suggested by @aaraney that, within the
DataAssimilationParameters
model, thereservoir_da
attribute may need to be of typeOptional[ReservoirPersistenceDA]
rather thanOptional[ReservoirDA]
.Note that if we comment out
reservoir_persistence_usace
andreservoir_persistence_usgs
from the config, then this error happens:Here are lines 31 and 32 of src/troute-network/troute/HYFeaturesNetwork.py:
The text was updated successfully, but these errors were encountered: