Skip to content

Read "restrict_cats" from YAML and pass to make_benchmark_conc_plots #400

@yantosca

Description

@yantosca

Your name

Bob Yantosca

Your affiliation

Harvard + GCST

Provide a clear and concise overview of the new feature requested.

Proposed modification: Specify restrict_cats in the benchmark YAML files, to facilitate regenerating benchmark concentration plots for a subset of all categories.

For example:

  #
  # outputs: Specifies the plots and tables to generate
  #
  outputs:
    #
    # Benchmark plots
    #
    plot_aod: True
    plot_conc: True
      restrict_cats: ['Aerosols']   # Will restrict plotting to the Aerosols category
    plot_drydep: True
    plot_emis: True
    plot_jvalues: True
    plot_models_vs_obs: True
    plot_options:
      by_spc_cat: True
      by_hco_cat: True

And in e.g. run_benchmark.py:

        # ==================================================================
        # GCC vs GCC species concentration plots
        #
        # Includes lumped species and separates by category if plot_by_spc_cat
        # is true; otherwise excludes lumped species and writes to one file
        # ==================================================================
        if config["options"]["outputs"]["plot_conc"]:
            title = "\n%%% Creating GCC vs. GCC concentration plots %%%"

            # Diagnostic collection files to read
            ref = get_filepath(gcc_vs_gcc_refdir, "SpeciesConc", gcc_ref_date)
            dev = get_filepath(gcc_vs_gcc_devdir, "SpeciesConc", gcc_dev_date)

            # Create plots
            make_benchmark_conc_plots(
                ref,
                gcc_vs_gcc_refstr,
                dev,
                gcc_vs_gcc_devstr,
                spcdb_files,
                refmet=refmet,
                devmet=devmet,
                dst=gcc_vs_gcc_resultsdir,
                weightsdir=config["paths"]["weights_dir"],
                plot_by_spc_cat=config["options"]["outputs"]["plot_options"][
                    "by_spc_cat"],
                benchmark_type=config["options"]["bmk_type"],
                overwrite=True,
                sigdiff_files=gcc_vs_gcc_sigdiff,
                restrict_cats=config["options"]["outputs"]["plot_conc"]["restrict_cats"],
                n_job=config["options"]["n_cores"]

etc. for other calls to make_benchmark_conc_plots.

Will you be implementing this feature yourself?

Yes

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions