JGCRI / xanthos

An extensible global hydrologic framework
Other
32 stars 16 forks source link

What does HistFlag do? #44

Open calebbraun opened 5 years ago

calebbraun commented 5 years ago

It is unclear what the intent is of the HistFlag configuration variable. The wiki says

If True, channel storage and soil moisture files are saved; if False, channel storage and soil moisture files are loaded when using the GWAM runoff module.

This isn't exactly correct, as the MRTM routing module also uses this flag to check whether to load channel storage values.

The example configuration file has

# HistFlag = True, historic mode ; = False, future mode HistFlag = True

but it isn't clear what is meant by historic mode or future mode.

This is also the only place where the truthy value is "True"/"False" (although "true" is allowed in some cases, and "t", "y", "yes", and "1" are even allowed in one case). The preferred alternative would be 0/1 like the other flag options.

crvernon commented 5 years ago

The HistFlag is a relict from the version 1 setup. The intention was that the user could run the historical period and then save both channel storage and soil moisture files for which spin-up would have already been accounted for. These files then would replace the spin-up process for the GWAM runoff model and originally saved on runtime.

Then comes version 2 with alternate options for these models. Now we have models like the abcd model, now the default runoff model, that has its own spin-up protocol. So HistFlag became only useful with a GWAM configuration. Spin-up is now conducted off of the first n number of months that the user sets in the config; which is why we combine historical and future datasets in one run.

I can see the benefit for being able to initialize the abcd model with pre-spun data. Please explore the ability, and consequences, to do the following: