UW-Hydro / tonic

A pre/post processing toolbox for hydrologic models
MIT License
20 stars 34 forks source link

Add support for global param files #36

Open tbohn opened 8 years ago

tbohn commented 8 years ago

Tonic could/should convert global parameter files between different versions.

In addition, the global parameter file could/should serve as the configuration file for tonic to set options. After all, that's the purpose of the global parameter file in VIC.

So, this kills 2 birds with one stone!

tbohn commented 8 years ago

Note: I was going to suggest that the global param file could be used as the config file for the forcing file conversion as well, but I see that there already exists some sort of config file for that. Perhaps it's just as well, particularly if the options in the forcing config file differ from what's in the global param file.

Anyway, any thoughts on how to handle this would be appreciated.

jhamman commented 8 years ago

I have some scratch code somewhere around here that parses a VIC global parameter file. It's pretty easy actually. I'd be happy to pull a first draft of the parser together.

jhamman commented 8 years ago

Here's a gist I have that parses the global config file. https://gist.github.com/jhamman/8bee9f287ccde4200666#file-vic_global_options-py

I think it has most of what we would want in there. We need to handle output variables still, and probably add a compliance checker of some kind.

When I get a chance to test it out a bit more, I'll drop it into tonic.