예제 #1
0
def test_make_benchmark_emis_plots():
    refdata = 'GCCData/EmissionsTest.nc4'
    refstr = 'GCC Test Data'
    devdata = 'GCHPData/EmissionsTest.nc4'
    devstr = 'GCHP Test Data'
    dst = './TestOutput/'
    #subdst = 'make_benchmark_emis_plots'
    try:
        bmk.make_benchmark_emis_plots(refdata,
                                      refstr,
                                      devdata,
                                      devstr,
                                      dst=dst,
                                      overwrite=True)  #, subdst=subdst)
        print(
            "make_benchmark_emis_plots ran successfully, check output PDFs  to visually verify"
        )
    except Exception as e:
        print("make_benchmark_emis_plots failed")
        raise e
예제 #2
0
        bmk.make_benchmark_plots(gcc_vs_gcc_refspc,
                                 gcc_vs_gcc_refstr,
                                 gcc_vs_gcc_devspc,
                                 gcc_vs_gcc_devstr,
                                 dst=gcc_vs_gcc_plotsdir,
                                 overwrite=True,
                                 sigdiff_files=gcc_vs_gcc_sigdiff)

    if plot_emis:
        # Emissions plots
        print('\n%%% Creating GCC vs. GCC emissions plots %%%')
        bmk.make_benchmark_emis_plots(gcc_vs_gcc_refhco,
                                      gcc_vs_gcc_refstr,
                                      gcc_vs_gcc_devhco,
                                      gcc_vs_gcc_devstr,
                                      dst=gcc_vs_gcc_plotsdir,
                                      plot_by_benchmark_cat=True,
                                      plot_by_hco_cat=True,
                                      overwrite=True,
                                      sigdiff_files=gcc_vs_gcc_sigdiff)

    if emis_table:
        # Table of emission and inventory totals
        print('\n%%% Creating GCC vs. GCC emissions and inventory tables %%%')
        gcc_vs_gcc_reflist = [gcc_vs_gcc_refhco]
        gcc_vs_gcc_devlist = [gcc_vs_gcc_devhco]
        bmk.make_benchmark_emis_tables(gcc_vs_gcc_reflist,
                                       gcc_vs_gcc_refstr,
                                       gcc_vs_gcc_devlist,
                                       gcc_vs_gcc_devstr,
                                       dst=gcc_vs_gcc_plotsdir,
예제 #3
0
                                          bmk_seasons,
                                          is_gcc=True)
        gcc_vs_gcc_devhco = get_filepaths(gcc_vs_gcc_devdir,
                                          'Emissions',
                                          bmk_seasons,
                                          is_gcc=True)

        # Create seasonal emissions plots
        for s in range(bmk_nseasons):
            mon_yr_str = bmk_seasons_names[s]
            sigdiff_files = gcc_vs_gcc_sigdiff[mon_yr_str]
            bmk.make_benchmark_emis_plots(gcc_vs_gcc_refhco[s],
                                          gcc_vs_gcc_refstr,
                                          gcc_vs_gcc_devhco[s],
                                          gcc_vs_gcc_devstr,
                                          dst=gcc_vs_gcc_plotsdir,
                                          subdst=mon_yr_str,
                                          plot_by_benchmark_cat=True,
                                          plot_by_hco_cat=True,
                                          overwrite=True,
                                          sigdiff_files=sigdiff_files)

    if emis_table and "FullChem" in bmk_type:
        # --------------------------------------------------------------
        # GCC vs GCC tables of emission and inventory totals
        # (FullChemBenchmark only)
        # --------------------------------------------------------------
        title = '\n%%% Creating GCC vs. GCC {} emissions and inventory totals %%%'.format(
            bmk_type)
        print(title)

        # File lists for J-values data (monthly)
예제 #4
0
    #---------------------------------------------------------------
    if plot_emis:
        print("\n%%% Creating GCC vs. GCC emissions plots %%%")

        # Diagnostic collection files to read
        col = "Emissions"
        ref = get_filepath(gcc_vs_gcc_refdir, col, gcc_date)
        dev = get_filepath(gcc_vs_gcc_devdir, col, gcc_date)

        # Create emissions plots
        bmk.make_benchmark_emis_plots(ref,
                                      gcc_vs_gcc_refstr,
                                      dev,
                                      gcc_vs_gcc_devstr,
                                      dst=gcc_vs_gcc_resultsdir,
                                      weightsdir=weightsdir,
                                      plot_by_spc_cat=plot_by_spc_cat,
                                      plot_by_hco_cat=plot_by_hco_cat,
                                      overwrite=True,
                                      sigdiff_files=gcc_vs_gcc_sigdiff,
                                      spcdb_dir=spcdb_dir)

    #---------------------------------------------------------------
    # GCC vs. GCC tables of emission and inventory totals
    #---------------------------------------------------------------
    if emis_table:
        print("\n%%% Creating GCC vs. GCC emissions/inventory tables %%%")

        # Diagnostic collection files to read
        col = "Emissions"
        ref = get_filepath(gcc_vs_gcc_refdir, col, gcc_date)
예제 #5
0
        print("\n%%% Creating GCC vs. GCC emissions plots %%%")

        # Diagnostic collections to read
        col = "Emissions"

        # Create concentration plots for each benchmark month
        for s, bmk_mon in enumerate(bmk_mons):

            ref = get_filepath(gcc_vs_gcc_refdir, col, bmk_mon)
            dev = get_filepath(gcc_vs_gcc_devdir, col, bmk_mon)
            bmk.make_benchmark_emis_plots(ref,
                                          gcc_vs_gcc_refstr,
                                          dev,
                                          gcc_vs_gcc_devstr,
                                          dst=gcc_vs_gcc_resultsdir,
                                          subdst=bmk_mon_yr_strs[s],
                                          weightsdir=weightsdir,
                                          plot_by_spc_cat=plot_by_spc_cat,
                                          plot_by_hco_cat=plot_by_hco_cat,
                                          overwrite=True,
                                          spcdb_dir=spcdb_dir)

    # --------------------------------------------------------------
    # GCC vs GCC tables of emission and inventory totals
    # --------------------------------------------------------------
    if emis_table:
        print("\n%%% Creating GCC vs. GCC emissions & inventory totals %%%")

        # Diagnostic collections to read
        col = "Emissions"
        ref = get_filepaths(gcc_vs_gcc_refdir, col, all_months)
예제 #6
0
파일: plot.py 프로젝트: LiamBindle/sgv
                                  use_cmap_RdBu=False,
                                  cmpres=cmpres,
                                  dev_sg_params=dev_sg_params,
                                  x_extent=roi_x,
                                  y_extent=roi_y)

if plot_emis:
    # Emissions plots
    print('\n%%% Creating GCHP vs. GCHP emissions plots %%%')
    bmk.make_benchmark_emis_plots(refhco,
                                  refstr,
                                  devhco,
                                  devstr,
                                  dst=plotsdir,
                                  plot_by_benchmark_cat=True,
                                  plot_by_hco_cat=True,
                                  overwrite=True,
                                  flip_ref=True,
                                  flip_dev=True,
                                  cmpres=cmpres,
                                  dev_sg_params=dev_sg_params,
                                  x_extent=roi_x,
                                  y_extent=roi_y)

if plot_jvalues:
    # Local noon J-values plots
    print('\n%%% Creating GCHP vs. GCHP J-value plots %%%')
    bmk.make_benchmark_jvalue_plots(
        refjv,
        refstr,
        devjv,
        devstr,