Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mechanism for breaking time series generation across multiple files (e.g. 10-year chunks) #130

Open
mnlevy1981 opened this issue Sep 5, 2024 · 0 comments
Assignees
Labels
common utility enhancement New feature or request

Comments

@mnlevy1981
Copy link
Collaborator

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.

@TeaganKing TeaganKing added common utility enhancement New feature or request labels Sep 18, 2024
@mnlevy1981 mnlevy1981 self-assigned this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common utility enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants