openearth / glofrim

Globally Applicable Framework for Integrated Hydrological-Hydrodynamic Modelling (GLOFRIM)
GNU General Public License v3.0
46 stars 27 forks source link

develop ini syntax to couple multiple instances from same model (framework) #82

Open DirkEilander opened 5 years ago

DirkEilander commented 5 years ago

Right now we can only use the abbreviations of the implemented models (PCR, DFM etc) in the ini-file syntax under the [models] and [exchanges] sections. As wflow is a framework with several models rather than one model there are usecases where we want to couple a wflow hydrological model with the wflow kin wave routing or reservoir models. For these usecases we need to be able to have multiple instances of the same model. A possible solution would be to make it possible (optional) to use the following syntax (or similar) to reference

[models]
W3RA=WFL/W3RA/wflow_W3RA.ini@WFL
routing=WFL/W3RA/wflow_routing.ini@WFL
DFM=DFM/dfm_settings.nam@DFM

[exchanges]
# runoff directly from W3RA Sr0 variable
W3RA.Sr0*cellArea=DFM.rain*ba*1000@1d
# upstream routed discharge from wflow routing module
routing.Qtot*86400@grid_us=DFM.rain*ba*1000@1d_us
JannisHoch commented 5 years ago

Hi @DirkEilander good point. I am not an expert in using wflow, but can you not also specify the hydrologic model to routing module coupling in the wflow ini-file? This would make the GLOFRIM ini-file bit leaner. Or would it then not possible to get runoff and routed discharge from one and the same BMI isntance but we have to address hydrologic model and routing module independently?

DirkEilander commented 5 years ago

@ChippChapp The coupling between the wflow hydrology and routing is now also done via BMI. By making the naming flexible we can also combine different wflow modules in GLOFRIM

JannisHoch commented 5 years ago

@DirkEilander alrigtht, great work then! Think we should update the documentation then accordingly as well as update the template GLOFRIM ini-file. Happy to do the former if you do the latter ;)