Description
Is your feature request related to a problem? Please describe.
The time series block of the key_metrics
example looks like
timeseries:
num_procs: 8
ts_done: [False, False]
overwrite_ts: [False, False]
case_name: ['b.e30_beta02.BLT1850.ne30_t232.104', 'b.e23_alpha17f.BLT1850.ne30_t232.092']
atm:
vars: ['PSL']
derive_vars: []
hist_str: 'h0a'
start_years: [1,1]
end_years: [100,100]
level: 'lev'
This will create time series for years 1-100 for both b.e30_beta02.BLT1850.ne30_t232.104
and b.e23_alpha17f.BLT1850.ne30_t232.092
, but it would be really nice if we could create time series for years 1-10, 11-20, 21-30, ..., 91-100 instead.
Describe the solution you'd like
Support nested lists, such as
atm:
vars: ['PSL']
derive_vars: []
hist_str: 'h0a'
start_years: [[1, 11, 21, 31, 41, 51, 61, 71, 81, 91], [1, 11, 21, 31, 41, 51, 61, 71, 81, 91]]
end_years: [[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]]
level: 'lev'
While I'm here, another improvement to the time series generation API that I'd like is dropping the requirement for
timeseries:
case_name: ['b.e30_beta02.BLT1850.ne30_t232.104', 'b.e23_alpha17f.BLT1850.ne30_t232.092']
And letting case_name
be determined from global_params
instead, specifically the case_name
and base_case_name
variables:
global_params:
case_name: 'b.e30_beta02.BLT1850.ne30_t232.104'
base_case_name: 'b.e23_alpha17f.BLT1850.ne30_t232.092'
For this, we could do something like
if timeseries_case is None:
timeseries_case = [global_params_case]
if global_params_base_case is not None:
timeseries_case.append(global_params_base_case)
then users could still specify timeseries.case_name
in the YAML, but if it's omitted then it's determined from global_params
instead.