NOAA-OWP / ngen-cal

Tools for calibrating and configuring NextGen
https://github.com/NOAA-OWP/ngen-cal/wiki
Other
8 stars 15 forks source link

Consider allowing glob star in `routing_output` field #173

Open aaraney opened 3 weeks ago

aaraney commented 3 weeks ago

https://github.com/NOAA-OWP/ngen-cal/blob/f22302070668bac823b731bd2e05eace32f8f41d/python/ngen_cal/src/ngen/cal/ngen.py#L86

Its not uncommon that software that creates model outputs (e.g. ngen or t-route) names their output files based on factors like the associated nexus or catchment id, the current time, or the simulation start time. Often a prefix or suffix is used (e.g. troute_output_{{start_time}}.csv) with the output format. It would be convenient if a glob star could be provided in the name of the routing_output field so that you don't have to know a priori the full name of the routing_output file. For example routing_output: troute_output_*.csv.

aaraney commented 3 weeks ago

@hellkite500, what are your thoughts on this?

hellkite500 commented 3 weeks ago

I think this is reasonable. We would probably want to pass the pattern down to the output hook and let it decide how to handle it, especially the case when the pattern matches more than one file.