Improve guess_output_template
Currently, guess_input_template goes a long way towards providing a correct output filename based on CMIP/CORDEX input files. However, handling of two filename elements need to be improved:
- The frequency element is not replaced but instead duplicated (cf. #214 (closed)).
- If the input files are from a combination of historical and scenario simulations (as they often are), the
base
component of the filename cannot be determined resulting in a simplistic default template. There are two typical situation to handle:
- Most of the data are from the historic simulation (e.g. 1970-2005), but extended with scenario data (onwards from 2006) to at most the end of the present year. In this case it is reasonable to use the historic files to derive the
base
for the output template. - Historic data is combined with scenario data that extend into the future, i.e. beyond the end of the present year. In this case it is reasonable to use the scenario files to derive the
base
for the output template.
Edited by Klaus Zimmermann