def test_make_benchmark_aod_plots(): refdata = 'GCCData/AerosolsTest.nc4' refstr = 'GCC Test Data' devdata = 'GCHPData/AerosolsTest.nc4' devstr = 'GCHP Test Data' dst = './TestOutput/' #subdst = 'make_benchmark_aod_plots/' try: bmk.make_benchmark_aod_plots(refdata, refstr, devdata, devstr, dst=dst, overwrite=True) print( "make_benchmark_aod_plots ran successfully, check output PDFs to visually verify" ) except Exception as e: print("make_benchmark_aod_plots failed") raise e
print('\n%%% Creating GCC vs. GCC J-value plots %%%') bmk.make_benchmark_jvalue_plots(gcc_vs_gcc_refjv, gcc_vs_gcc_refstr, gcc_vs_gcc_devjv, gcc_vs_gcc_devstr, dst=gcc_vs_gcc_plotsdir, overwrite=True, sigdiff_files=gcc_vs_gcc_sigdiff) if plot_aod: # Column AOD plots print('\n%%% Creating GCC vs. GCC column AOD plots %%%') bmk.make_benchmark_aod_plots(gcc_vs_gcc_refaod, gcc_vs_gcc_refstr, gcc_vs_gcc_devaod, gcc_vs_gcc_devstr, dst=gcc_vs_gcc_plotsdir, overwrite=True, sigdiff_files=gcc_vs_gcc_sigdiff) if mass_table: # Global mass tables print('\n%%% Creating GCC vs. GCC global mass tables %%%') bmk.make_benchmark_mass_tables(gcc_vs_gcc_refrst, gcc_vs_gcc_refstr, gcc_vs_gcc_devrst, gcc_vs_gcc_devstr, dst=gcc_vs_gcc_plotsdir, overwrite=True) if budget_table:
'Aerosols', bmk_seasons, is_gcc=True) gcc_vs_gcc_devaod = get_filepaths(gcc_vs_gcc_devdir, 'Aerosols', bmk_seasons, is_gcc=True) # Create seasonal column AOD 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_aod_plots(gcc_vs_gcc_refaod[s], gcc_vs_gcc_refstr, gcc_vs_gcc_devaod[s], gcc_vs_gcc_devstr, dst=gcc_vs_gcc_plotsdir, subdst=mon_yr_str, overwrite=True, sigdiff_files=sigdiff_files) if mass_table and "FullChem" in bmk_type: # -------------------------------------------------------------- # GCC vs. GCC global mass tables # (FullChemBenchmark only) # -------------------------------------------------------------- title = '\n%%% Creating GCC vs. GCC {} global mass tables %%%'.format( bmk_type) print(title) bmk.make_benchmark_mass_tables(gcc_vs_gcc_refrst, gcc_vs_gcc_refstr,
# GCC vs GCC column AOD plots #--------------------------------------------------------------- if plot_aod: print("\n%%% Creating GCC vs. GCC column AOD plots %%%") # Diagnostic collection files to read col = "Aerosols" ref = get_filepath(gcc_vs_gcc_refdir, col, gcc_date) dev = get_filepath(gcc_vs_gcc_devdir, col, gcc_date) # Plot AODs bmk.make_benchmark_aod_plots(ref, gcc_vs_gcc_refstr, dev, gcc_vs_gcc_devstr, dst=gcc_vs_gcc_resultsdir, weightsdir=weightsdir, overwrite=True, sigdiff_files=gcc_vs_gcc_sigdiff, spcdb_dir=spcdb_dir) #--------------------------------------------------------------- # GCC vs GCC global mass tables #--------------------------------------------------------------- if mass_table: print("\n%%% Creating GCC vs. GCC global mass tables %%%") # Diagnostic collection files to read col = "Restart" ref = get_filepath(gcc_vs_gcc_refrst, col, end_date) dev = get_filepath(gcc_vs_gcc_devrst, col, end_date)
if plot_aod: print("\n%%% Creating GCC vs. GCC column AOD plots %%%") # Diagnostic collections to read col = "Aerosols" # Create AOD 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_aod_plots(ref, gcc_vs_gcc_refstr, dev, gcc_vs_gcc_devstr, dst=gcc_vs_gcc_resultsdir, subdst=bmk_mon_yr_strs[s], weightsdir=weightsdir, overwrite=True, spcdb_dir=spcdb_dir) # -------------------------------------------------------------- # GCC vs GCC mass tables # -------------------------------------------------------------- if mass_table: print("\n%%% Creating GCC vs. GCC mass tables %%%") # Diagnostic collections to read col = "Restart" # Create mass table for each benchmark month
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, dst=plotsdir, overwrite=True, cmpres=cmpres, dev_sg_params=dev_sg_params, x_extent=roi_x, y_extent=roi_y, ) if plot_aod: # Column AOD plots print('\n%%% Creating GCHP vs. GCHP column AOD plots %%%') bmk.make_benchmark_aod_plots(refaod, refstr, devaod, devstr, dst=plotsdir, overwrite=True, cmpres=cmpres, dev_sg_params=dev_sg_params, x_extent=roi_x, y_extent=roi_y)