Skip to content

Consider refactoring the USER_CONFIG_OPTIONS template constant #597

@matthew-mizielinski

Description

@matthew-mizielinski

In the code below the MIP Convert config template is set out, but for CMIP7 we are "breaking" this in several places by modifying it further down stream in MIP Convert .

We might need to pull out the constant into a function that can then modify the template depending on whether we want to work in a "CMIP6" or "CMIP7" style.

USER_CONFIG_OPTIONS = {
# section: {option_type: [options]}
'cmor_setup': {
'required': ['mip_table_dir'],
'optional': [
'cmor_log_file', 'create_subdirectories', 'exit_control',
'netcdf_file_action', 'set_verbosity'],
},
'cmor_dataset': {
'required': [
'branch_method', 'calendar', 'institution_id',
'license', 'mip', 'mip_era', 'model_id', 'model_type',
'output_dir', 'variant_label'],
'required_for_grid': ['grid', 'grid_label', 'nominal_resolution'],
'optional': [
'experiment_id', 'sub_experiment_id', 'comment', 'contact',
'grid_resolution', # required for CMIP5 functional tests
'output_file_template', 'output_path_template', 'references',
'variant_info'],
'branch': [
'branch_date_in_child', 'branch_date_in_parent',
'parent_base_date', 'parent_experiment_id', 'parent_mip_era',
'parent_model_id', 'parent_time_units', 'parent_variant_label'],
},
'request': {
'required': [
'base_date', 'model_output_dir', 'run_bounds', 'suite_id'],
'optional': [
'ancil_files', 'atmos_timestep', 'deflate_level',
'hybrid_heights_files', 'replacement_coordinates_file', 'shuffle',
'sites_file', 'reference_time'],
},
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions