JGCRI / xanthos

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

Add option to toggle on/off for standard outputs #27

Closed crvernon closed 5 years ago

crvernon commented 5 years ago

Add an option in the Xanthos configuration file and code that allows for only certain outputs to be written to disk

calebbraun commented 5 years ago

If this option were nested in the sections for each model, it would still need to be a list of some sort. Maybe:

[Runoff]
outputs = runoff, soilmoisture

I feel like there might be a better way. If we use strings like this, it will need to be clear which ones are available.

Another option is to do something like:

[Runoff]
output_runoff = 1
output_soil_moisture = 1

but this will add more options to an already-long configuration file.

calebbraun commented 5 years ago

For user and coding simplicity, I think I'm more partial to having it be a general setting:

[Project]

# which variables to output, any of:
#   - 'pet' - potential evapotranspiration
#   - 'aet' - actual evapotranspiration, 
#   - 'q' - runoff
#   - 'sav' - soil moisture
#   - 'ch_storage' - channel storage,
#   - 'avg_ch_flow' - average channel flow
output_vars = pet, q, avg_ch_flow
crvernon commented 5 years ago

I like the way you have that set up under [Project] which should make it easier to extend. What do you think about the options for output_vars being only the core (PET, Runoff, Routing) outputs. Any post-processing components would need to explicitly define those in their config blocks, unless we can figure out a clean way to do this at the project level in the code as collaborators extend.

calebbraun commented 5 years ago

I agree, let's just make it the core outputs. Are q and sav clear enough as variable names? That's what's used throughout Xanthos.

crvernon commented 5 years ago

‘q’ is pretty standard in the hydrology world to denote flow, so that one may be ok. I have no idea about ‘sav’ and am not opposed to changing it.