Skip to content

Update config.yml schema to avoid warnings about unused variables #203

@mnlevy1981

Description

@mnlevy1981

Is your feature request related to a problem? Please describe.
We running the key metrics example out of a CESM case, the log file has the following warning messages:

These parameters are not used in the task's source code: 'CESM_output_dir', 'base_case_name', 'base_case_output_dir', 'base_end_date', 'base_start_date', 'case_name', 'end_date', 'lc_kwargs', 'obs_data_dir', 'serial', 'start_date', and 'subset_kwargs'
These parameters are not used in the task's source code: 'lc_kwargs', 'serial', and 'subset_kwargs'
These parameters are not used in the task's source code: 'CESM_output_dir', 'base_case_output_dir', 'lc_kwargs', 'obs_data_dir', 'serial', and 'subset_kwargs'
These parameters are not used in the task's source code: 'base_case_name', 'base_case_output_dir', 'base_end_date', 'base_start_date', 'lc_kwargs', 'serial', and 'subset_kwargs'
These parameters are not used in the task's source code: 'subset_kwargs'
These parameters are not used in the task's source code: 'base_start_date', 'lc_kwargs', 'serial', 'start_date', and 'subset_kwargs'

One workaround would be to add one more layer of dictionary to the global parameters in config.yml, and passing a single dictionary of parameters instead of a bunch of individual parameters to each notebook.

Describe the solution you'd like

I think something like

global_params:
+ CUPiD_config:
    case_name: 'b.e30_beta02.BLT1850.ne30_t232.104'
    base_case_name: 'b.e23_alpha17f.BLT1850.ne30_t232.092'
    CESM_output_dir: /glade/campaign/cesm/development/cross-wg/diagnostic_framework/CESM_output_for_testing
    start_date: '0001-01-01'
    end_date: '0101-01-01'
    base_start_date: '0001-01-01'
    base_end_date: '0101-01-01'
    obs_data_dir: '/glade/campaign/cesm/development/cross-wg/diagnostic_framework/CUPiD_obs_data'
    lc_kwargs:
      threads_per_worker: 1

And then notebooks would use CUPiD_config['case_name'] instead of case_name (or create local copies out of the dictionary).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions