AirNow and WRF-Chem Regulatory Calculations

This example will compare WRF-Chem model results against AirNow surface observations for the MDA8 ozone and 24 hour average PM2.5 regulatory metrics.

Note

Check out the Supported Diagnostics for information on how MELODIES MONET calculates these regulatory metrics

All default surface plots are available for the regulatory calculations except for the spatial_overlay and scorecard plots. There is also an additional plot called the spatial_bias_exceedance plot available that is a difference plot of model - observations for the number of exceedances greater than the regulatory standard within the analysis window with options to specify the domain.

Note

Check out the Supported Plots for more description of these plots.

This example shows how one can compare results from two different model simulations against observations. This particular example compares WRF-Chem results using two different chemical mechanisms (RACM_ESRL and RACM_ESRL_VCP). Simulated surface ozone is slightly improved in WRF-Chem using the RACM_ESRL_VCP mechanism as compared to the AirNow observations.

First, we import the melodies_monet.driver module.

from melodies_monet import driver

Analysis driver class

Now, lets create an instance of the analysis driver class, melodies_monet.driver.analysis. It consists of these main parts:

  • model instances

  • observation instances

  • a paired instance of both

an = driver.analysis()

Initially, most of our analysis object’s attributes are set to None, though some have meaningful defaults:

an
analysis(
    control='control.yaml',
    control_dict=None,
    models={},
    obs={},
    paired={},
    start_time=None,
    end_time=None,
    time_intervals=None,
    download_maps=True,
    output_dir=None,
    output_dir_save=None,
    output_dir_read=None,
    debug=False,
    save=None,
    read=None,
    regrid=False,
)

Control file

We set the YAML control file and begin by reading the file. As shown below in order to calculate regulatory metrics set regulatory equal to True under each relevant observation. Currently, regulatory calculations are only available for ozone and PM2.5.

Note

Check out the Description of All YAML Options for info on how to create and modify these files.

an.control = "control_wrfchem_mech-0905_2_reg.yaml"
an.read_control()
an.control_dict

Hide code cell output

{'analysis': {'start_time': '2019-09-04-06:00:00',
  'end_time': '2019-09-06-05:00:00',
  'output_dir': './output/airnow_wrfchem_reg',
  'debug': True},
 'model': {'RACM_ESRL': {'files': 'example:wrfchem:racm_esrl_reg',
   'mod_type': 'wrfchem',
   'mod_kwargs': {'mech': 'racm_esrl_vcp', 'surf_only_nc': True},
   'radius_of_influence': 12000,
   'mapping': {'airnow': {'PM2_5_DRY': 'PM2.5', 'o3': 'OZONE'}},
   'projection': None,
   'plot_kwargs': {'color': 'magenta', 'marker': 's', 'linestyle': '-'}},
  'RACM_ESRL_VCP': {'files': 'example:wrfchem:racm_esrl_vcp_reg',
   'mod_type': 'wrfchem',
   'mod_kwargs': {'mech': 'racm_esrl_vcp', 'surf_only_nc': True},
   'radius_of_influence': 12000,
   'mapping': {'airnow': {'PM2_5_DRY': 'PM2.5', 'o3': 'OZONE'}},
   'projection': None,
   'plot_kwargs': {'color': 'gold', 'marker': 'o', 'linestyle': '-'}}},
 'obs': {'airnow': {'use_airnow': True,
   'filename': 'example:airnow:2019-09',
   'obs_type': 'pt_sfc',
   'variables': {'OZONE': {'unit_scale': 1,
     'unit_scale_method': '*',
     'nan_value': -1.0,
     'ylabel_plot': 'Ozone (ppbv)',
     'vmin_plot': 15.0,
     'vmax_plot': 55.0,
     'vdiff_plot': 20.0,
     'nlevels_plot': 21,
     'regulatory': True,
     'ylabel_reg_plot': 'MDA8 O3 (ppbv)',
     'vmin_reg_plot': 30.0,
     'vmax_reg_plot': 70.0,
     'vdiff_reg_plot': 20.0},
    'PM2.5': {'unit_scale': 1,
     'unit_scale_method': '*',
     'nan_value': -1.0,
     'ylabel_plot': 'PM2.5 (ug/m3)',
     'ty_scale': 2.0,
     'vmin_plot': 0.0,
     'vmax_plot': 22.0,
     'vdiff_plot': 15.0,
     'nlevels_plot': 23,
     'regulatory': True,
     'ylabel_reg_plot': 'PM2.5_24hr (ug/m3)',
     'vmin_reg_plot': 0.0,
     'vmax_reg_plot': 22.0,
     'vdiff_reg_plot': 15.0}}}},
 'plots': {'plot_grp1': {'type': 'timeseries',
   'fig_kwargs': {'figsize': [12, 6]},
   'default_plot_kwargs': {'linewidth': 2.0, 'markersize': 10.0},
   'text_kwargs': {'fontsize': 24.0},
   'domain_type': ['all', 'state_name', 'epa_region'],
   'domain_name': ['CONUS', 'CA', 'R9'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True,
    'ts_select_time': 'time_local',
    'ts_avg_window': 'D',
    'set_axis': True}},
  'plot_grp2': {'type': 'taylor',
   'fig_kwargs': {'figsize': [8, 8]},
   'default_plot_kwargs': {'linewidth': 2.0, 'markersize': 10.0},
   'text_kwargs': {'fontsize': 16.0},
   'domain_type': ['all'],
   'domain_name': ['CONUS'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True, 'set_axis': True}},
  'plot_grp3': {'type': 'spatial_bias',
   'fig_kwargs': {'states': True, 'figsize': [10, 5]},
   'text_kwargs': {'fontsize': 16.0},
   'domain_type': ['all'],
   'domain_name': ['CONUS'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True, 'set_axis': True}},
  'plot_grp5': {'type': 'boxplot',
   'fig_kwargs': {'figsize': [8, 6]},
   'text_kwargs': {'fontsize': 20.0},
   'domain_type': ['all'],
   'domain_name': ['CONUS'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True, 'set_axis': False}},
  'plot_grp5_5': {'type': 'spatial_bias_exceedance',
   'fig_kwargs': {'states': True, 'figsize': [10, 5]},
   'text_kwargs': {'fontsize': 16.0},
   'domain_type': ['all'],
   'domain_name': ['CONUS'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True, 'set_axis': False}},
  'plot_grp7': {'type': 'multi_boxplot',
   'fig_kwargs': {'figsize': [10, 8]},
   'text_kwargs': {'fontsize': 20.0},
   'domain_type': ['all'],
   'domain_name': ['CONUS'],
   'region_name': ['epa_region'],
   'region_list': ['R1',
    'R2',
    'R3',
    'R4',
    'R5',
    'R6',
    'R7',
    'R8',
    'R9',
    'R10'],
   'model_name_list': ['AirNow', 'RACM_ESRL', 'RACM_ESRL_VCP'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True, 'set_axis': False}},
  'plot_grp8': {'type': 'csi',
   'fig_kwargs': {'figsize': [10, 8]},
   'text_kwargs': {'fontsize': 20.0},
   'domain_type': ['all', 'epa_region'],
   'domain_name': ['CONUS', 'R9'],
   'threshold_list': [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
   'score_name': 'Critical Success Index',
   'model_name_list': ['RACM_ESRL', 'RACM_ESRL_VCP'],
   'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP'],
   'data_proc': {'rem_obs_nan': True, 'set_axis': False}}},
 'stats': {'stat_list': ['MB', 'MdnB', 'R2', 'RMSE'],
  'round_output': 2,
  'output_table': False,
  'output_table_kwargs': {'figsize': [7, 3],
   'fontsize': 12.0,
   'xscale': 1.4,
   'yscale': 1.4,
   'edges': 'horizontal'},
  'domain_type': ['all'],
  'domain_name': ['CONUS'],
  'data': ['airnow_RACM_ESRL', 'airnow_RACM_ESRL_VCP']}}

Now, some of our analysis object’s attributes are populated:

an
analysis(
    control='control_wrfchem_mech-0905_2_reg.yaml',
    control_dict=...,
    models={},
    obs={},
    paired={},
    start_time=Timestamp('2019-09-04 06:00:00'),
    end_time=Timestamp('2019-09-06 05:00:00'),
    time_intervals=None,
    download_maps=True,
    output_dir='./output/airnow_wrfchem_reg',
    output_dir_save='./output/airnow_wrfchem_reg',
    output_dir_read='./output/airnow_wrfchem_reg',
    debug=True,
    save=None,
    read=None,
    regrid=False,
)

Load the model data

The driver will automatically loop through the “models” found in the model section of the YAML file and create an instance of melodies_monet.driver.model for each that includes the

  • label

  • mapping information

  • file names (can be expressed using a glob expression)

  • xarray object

an.open_models()
wrfchem
example:wrfchem:racm_esrl_reg
**** Reading WRF-Chem model output...
wrfchem
example:wrfchem:racm_esrl_vcp_reg
**** Reading WRF-Chem model output...

Applying open_models() populates the models attribute.

an.models
{'RACM_ESRL': model(
     model='wrfchem',
     is_global=False,
     radius_of_influence=12000,
     mod_kwargs={'mech': 'racm_esrl_vcp', 'surf_only_nc': True, 'var_list': ['PM2_5_DRY', 'o3']},
     file_str='example:wrfchem:racm_esrl_reg',
     label='RACM_ESRL',
     obj=...,
     mapping={'airnow': {'PM2_5_DRY': 'PM2.5', 'o3': 'OZONE'}},
     variable_dict=None,
     label='RACM_ESRL',
     ...
 ),
 'RACM_ESRL_VCP': model(
     model='wrfchem',
     is_global=False,
     radius_of_influence=12000,
     mod_kwargs={'mech': 'racm_esrl_vcp', 'surf_only_nc': True, 'var_list': ['PM2_5_DRY', 'o3']},
     file_str='example:wrfchem:racm_esrl_vcp_reg',
     label='RACM_ESRL_VCP',
     obj=...,
     mapping={'airnow': {'PM2_5_DRY': 'PM2.5', 'o3': 'OZONE'}},
     variable_dict=None,
     label='RACM_ESRL_VCP',
     ...
 )}

We can access the underlying dataset with the obj attribute.

an.models['RACM_ESRL'].obj
<xarray.Dataset> Size: 49MB
Dimensions:    (y: 284, x: 440, time: 48, z: 1)
Coordinates:
    longitude  (y, x) float32 500kB -122.3 -122.2 -122.1 ... -60.52 -60.37
    latitude   (y, x) float32 500kB 21.19 21.22 21.24 21.27 ... 50.28 50.24 50.2
  * time       (time) datetime64[ns] 384B 2019-09-04T06:00:00 ... 2019-09-06T...
Dimensions without coordinates: y, x, z
Data variables:
    PM2_5_DRY  (time, z, y, x) float32 24MB 1.916 1.911 1.895 ... 0.4702 0.4709
    o3         (time, z, y, x) float32 24MB 32.62 32.62 32.6 ... 37.28 37.56
Attributes: (12/15)
    FieldType:                 104
    MemoryOrder:               XYZ
    description:               pm2.5 aerosol dry mass
    units:                     ug m^-3
    stagger:                   
    coordinates:               XLONG XLAT XTIME
    ...                        ...
    MOAD_CEN_LAT:              39.617638
    STAND_LON:                 -97.0
    MAP_PROJ:                  1
    CEN_LAT:                   39.617638
    CEN_LON:                   -97.77487
    mapping_tables_to_airnow:  {'OZONE': 'o3', 'PM2.5': 'PM2_5_DRY', 'PM10': ...

Load the observational data

As with the model data, the driver will loop through the “observations” found in the obs section of the YAML file and create an instance of melodies_monet.driver.observation for each.

an.open_obs()
an.obs
{'airnow': observation(
     obs='airnow',
     label='airnow',
     file='example:airnow:2019-09',
     obj=...,
     type='pt_src',
     sat_type=None,
     data_proc=None,
     variable_dict={'OZONE': {'unit_scale': 1, 'unit_scale_method': '*', 'nan_value': -1.0, 'ylabel_plot': 'Ozone (ppbv)', 'vmin_plot': 15.0, 'vmax_plot': 55.0, 'vdiff_plot': 20.0, 'nlevels_plot': 21, 'regulatory': True, 'ylabel_reg_plot': 'MDA8 O3 (ppbv)', 'vmin_reg_plot': 30.0, 'vmax_reg_plot': 70.0, 'vdiff_reg_plot': 20.0}, 'PM2.5': {'unit_scale': 1, 'unit_scale_method': '*', 'nan_value': -1.0, 'ylabel_plot': 'PM2.5 (ug/m3)', 'ty_scale': 2.0, 'vmin_plot': 0.0, 'vmax_plot': 22.0, 'vdiff_plot': 15.0, 'nlevels_plot': 23, 'regulatory': True, 'ylabel_reg_plot': 'PM2.5_24hr (ug/m3)', 'vmin_reg_plot': 0.0, 'vmax_reg_plot': 22.0, 'vdiff_reg_plot': 15.0}},
     resample=None,
     time_var=None,
     regrid_method=None,
 )}
an.obs['airnow'].obj
<xarray.Dataset> Size: 1GB
Dimensions:     (x: 3786, time: 2091, y: 1)
Coordinates:
  * x           (x) int64 30kB 0 1 2 3 4 5 6 ... 3780 3781 3782 3783 3784 3785
  * time        (time) datetime64[ns] 17kB 2019-09-01 ... 2019-09-30T00:30:00
    latitude    (y, x) float64 30kB ...
    longitude   (y, x) float64 30kB ...
    siteid      (y, x) <U12 182kB ...
Dimensions without coordinates: y
Data variables: (12/30)
    BARPR       (time, y, x) float64 63MB ...
    BC          (time, y, x) float64 63MB ...
    CO          (time, y, x) float64 63MB ...
    NO          (time, y, x) float64 63MB ...
    NO2         (time, y, x) float64 63MB ...
    NO2Y        (time, y, x) float64 63MB ...
    ...          ...
    cmsa_name   (y, x) float64 30kB ...
    msa_code    (y, x) float64 30kB ...
    msa_name    (y, x) <U52 787kB ...
    state_name  (y, x) <U2 30kB ...
    epa_region  (y, x) <U5 76kB ...
    time_local  (time, y, x) datetime64[ns] 63MB ...
Attributes:
    title:         
    format:        NetCDF-4
    date_created:  2021-06-07

Pair model and observational data

Now, we create a melodies_monet.driver.pair for each model–obs pair using the pair_data() routine.

%%time

an.pair_data()

Hide code cell output

1, in pair data
After pairing:                         time  BARPR   BC   CO   NO  NO2  NO2Y  NOX  NOY  OZONE  \
0       2019-09-01 00:00:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0   25.0   
1       2019-09-01 00:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
2       2019-09-01 00:30:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
3       2019-09-01 01:00:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0   24.0   
4       2019-09-01 01:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
...                     ...    ...  ...  ...  ...  ...   ...  ...  ...    ...   
7916521 2019-09-29 23:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
7916522 2019-09-29 23:30:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
7916523 2019-09-30 00:00:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    8.0   
7916524 2019-09-30 00:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
7916525 2019-09-30 00:30:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   

         ...  longitude  cmsa_name  msa_code  msa_name  state_name  \
0        ...   -52.8167       -1.0      -1.0                    CC   
1        ...   -52.8167       -1.0      -1.0                    CC   
2        ...   -52.8167       -1.0      -1.0                    CC   
3        ...   -52.8167       -1.0      -1.0                    CC   
4        ...   -52.8167       -1.0      -1.0                    CC   
...      ...        ...        ...       ...       ...         ...   
7916521  ...    69.2725       -1.0      -1.0                         
7916522  ...    69.2725       -1.0      -1.0                         
7916523  ...    69.2725       -1.0      -1.0                         
7916524  ...    69.2725       -1.0      -1.0                         
7916525  ...    69.2725       -1.0      -1.0                         

         epa_region          time_local     siteid  PM2_5_DRY  o3  
0                CA 2019-08-31 20:00:00  000010102        NaN NaN  
1                CA 2019-08-31 20:15:00  000010102        NaN NaN  
2                CA 2019-08-31 20:30:00  000010102        NaN NaN  
3                CA 2019-08-31 21:00:00  000010102        NaN NaN  
4                CA 2019-08-31 21:15:00  000010102        NaN NaN  
...             ...                 ...        ...        ...  ..  
7916521        DSUZ 2019-09-30 04:15:00  UZB010001        NaN NaN  
7916522        DSUZ 2019-09-30 04:30:00  UZB010001        NaN NaN  
7916523        DSUZ 2019-09-30 05:00:00  UZB010001        NaN NaN  
7916524        DSUZ 2019-09-30 05:15:00  UZB010001        NaN NaN  
7916525        DSUZ 2019-09-30 05:30:00  UZB010001        NaN NaN  

[7916526 rows x 36 columns]
saving pair
After pairing:                         time  BARPR   BC   CO   NO  NO2  NO2Y  NOX  NOY  OZONE  \
0       2019-09-01 00:00:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0   25.0   
1       2019-09-01 00:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
2       2019-09-01 00:30:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
3       2019-09-01 01:00:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0   24.0   
4       2019-09-01 01:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
...                     ...    ...  ...  ...  ...  ...   ...  ...  ...    ...   
7916521 2019-09-29 23:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
7916522 2019-09-29 23:30:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
7916523 2019-09-30 00:00:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    8.0   
7916524 2019-09-30 00:15:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   
7916525 2019-09-30 00:30:00   -1.0 -1.0 -1.0 -1.0 -1.0  -1.0 -1.0 -1.0    NaN   

         ...  longitude  cmsa_name  msa_code  msa_name  state_name  \
0        ...   -52.8167       -1.0      -1.0                    CC   
1        ...   -52.8167       -1.0      -1.0                    CC   
2        ...   -52.8167       -1.0      -1.0                    CC   
3        ...   -52.8167       -1.0      -1.0                    CC   
4        ...   -52.8167       -1.0      -1.0                    CC   
...      ...        ...        ...       ...       ...         ...   
7916521  ...    69.2725       -1.0      -1.0                         
7916522  ...    69.2725       -1.0      -1.0                         
7916523  ...    69.2725       -1.0      -1.0                         
7916524  ...    69.2725       -1.0      -1.0                         
7916525  ...    69.2725       -1.0      -1.0                         

         epa_region          time_local     siteid  PM2_5_DRY  o3  
0                CA 2019-08-31 20:00:00  000010102        NaN NaN  
1                CA 2019-08-31 20:15:00  000010102        NaN NaN  
2                CA 2019-08-31 20:30:00  000010102        NaN NaN  
3                CA 2019-08-31 21:00:00  000010102        NaN NaN  
4                CA 2019-08-31 21:15:00  000010102        NaN NaN  
...             ...                 ...        ...        ...  ..  
7916521        DSUZ 2019-09-30 04:15:00  UZB010001        NaN NaN  
7916522        DSUZ 2019-09-30 04:30:00  UZB010001        NaN NaN  
7916523        DSUZ 2019-09-30 05:00:00  UZB010001        NaN NaN  
7916524        DSUZ 2019-09-30 05:15:00  UZB010001        NaN NaN  
7916525        DSUZ 2019-09-30 05:30:00  UZB010001        NaN NaN  

[7916526 rows x 36 columns]
saving pair
CPU times: user 51.3 s, sys: 26.7 s, total: 1min 18s
Wall time: 1min 19s
an.paired
{'airnow_RACM_ESRL': pair(
     type='pt_sfc',
     radius_of_influence=1000000.0,
     obs='airnow',
     model='RACM_ESRL',
     model_vars=['PM2_5_DRY', 'o3'],
     obs_vars=['PM2.5', 'OZONE'],
     filename='airnow_RACM_ESRL.nc',
 ),
 'airnow_RACM_ESRL_VCP': pair(
     type='pt_sfc',
     radius_of_influence=1000000.0,
     obs='airnow',
     model='RACM_ESRL_VCP',
     model_vars=['PM2_5_DRY', 'o3'],
     obs_vars=['PM2.5', 'OZONE'],
     filename='airnow_RACM_ESRL_VCP.nc',
 )}
an.paired['airnow_RACM_ESRL']
pair(
    type='pt_sfc',
    radius_of_influence=1000000.0,
    obs='airnow',
    model='RACM_ESRL',
    model_vars=['PM2_5_DRY', 'o3'],
    obs_vars=['PM2.5', 'OZONE'],
    filename='airnow_RACM_ESRL.nc',
)

Plot

The plotting() routine produces plots.

%%time

an.plotting()
Reference std: 5.212232181881147
Warning: ty_scale not specified for OZONE, so default used.
Reference std: 16.224367920262775
Warning: ty_scale not specified for OZONE, so default used.
0 (1488, 1)
0 (1488, 2)
1 (1488, 3)
final 1 1
/Users/rschwantes/Documents/MONET/final_version1/apr_3/MELODIES-MONET/melodies_monet/plots/surfplots.py:1717: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
  ax.set_xticklabels(labels)
0 (267, 1)
0 (267, 2)
1 (267, 3)
final 1 1
/Users/rschwantes/Documents/MONET/final_version1/apr_3/MELODIES-MONET/melodies_monet/plots/surfplots.py:1717: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
  ax.set_xticklabels(labels)
0 (1889, 1)
0 (1889, 2)
1 (1889, 3)
final 1 1
/Users/rschwantes/Documents/MONET/final_version1/apr_3/MELODIES-MONET/melodies_monet/plots/surfplots.py:1717: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
  ax.set_xticklabels(labels)
0 (400, 1)
0 (400, 2)
1 (400, 3)
final 1 1
/Users/rschwantes/Documents/MONET/final_version1/apr_3/MELODIES-MONET/melodies_monet/plots/surfplots.py:1717: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
  ax.set_xticklabels(labels)
CPU times: user 4min 36s, sys: 1min 12s, total: 5min 48s
Wall time: 6min 1s
../_images/265a9c9084e0d30585a2a9874b9af262ca2ea27c7c058fefa00a18f0e78565d8.png ../_images/35975f9af8c18b782db3f1bbc374e2be6c5fcd0782ce3b8d346f4e919d8edc58.png ../_images/cfbd1b530b1690ec1c8d2b4619e8588a624e7bceeef1afda654c83ab7f2716bc.png ../_images/ba0edc81217fedfc945978f3cd55d00a22d7a2f6df4c619d7e6e03c9cce68c56.png ../_images/0e0e33718ecbeedce5bd7cdb6ea6ed96776eaadb34a50dee5ae2ec75a57738d8.png ../_images/2e89ee6ec16975adc0d7a8ce29f4daefe0b4aea6283f2c672ebe8232c8a269c2.png ../_images/e64f5ec8bc1cbba6c1fd9f8e3195930bc8f5b2387b1958a0beb90c4953c7c7af.png ../_images/0473771d894d3e64fd9a8cdffaed784699244fc4cce6b37a93a1f1b95be2d699.png ../_images/4c45d6bbf01b85a7cdbcf4b6e5f5cc4091f1374e806e1a1abfeb18a883357cd7.png ../_images/aaadee36df5b403feb50757c9ce960af55a480062a8c4757e26ac65787318f76.png ../_images/18446969a5d7e6104f5f6ae0703e75f01bd6b43d700567910b82f2be225ee4a4.png ../_images/159e08fdfea4646bf2ef705a87701b3482eb98357e7f3156fb8d9ca06feb5dbd.png ../_images/ff9d9a07738e053b68b763421757b604f80b671891c8edc7f934194177a4ea19.png ../_images/14f42e863036df5aef3d0455f96df5535318c5a8a3f1a86f51ddd9def054d917.png ../_images/36405c8f4767d93c1553935a0c7db73d2bfd6233402f15ecdd91ad8d8149f677.png ../_images/4eefd2074226f02a5a94cd1d3f45f40d117d90c4bae90c0d1225a1550379e8d4.png ../_images/fdf47d9892f04dd2e213f698e52dab3e2de3d5367dd5ae667243bd3f40782390.png ../_images/36446eeee07ed1f72e49b3c4fcf54961bb5b7e7a7004c343be63e41fbfbdb28a.png ../_images/4c0d267ebc18750ad7f21b78b6eb4563495c6cd4a5627fa652910600b6b64e2d.png ../_images/5c889b78d2207a18a473292d1658ba5f501b0b0c69d739ed7e9763bee8a66d19.png ../_images/f73b1ae6a2f7a1efcb248015276a79643e9741cece3e999eefa4965c43e02aa2.png ../_images/5ffa1b98b1214b2303521f468b17e657eab6bffb7e3b04cecfb60c6ac2504c6d.png ../_images/2a7b471e375fde614c06ea5d42ea0e049190d05d1b7159308dfabce63a9e6e38.png ../_images/4435215c42f33bf0677f4f408bb0c32f57da2a740b116e3249da8dc153292927.png

The figures are saved in the directory specified by the analysis instance’s output_dir attribute.

Statistics

The stats() routine produces tables of statistics.

%%time

an.stats()
CPU times: user 1min 59s, sys: 27.2 s, total: 2min 27s
Wall time: 2min 31s

The stats routine has produced two files (one for each data variable). This is one of them:

output/airnow_wrfchem_reg/stats.OZONE_reg.all.CONUS.2019-09-04_06.2019-09-06_05.csv
Stat_ID,Stat_FullName,airnow_RACM_ESRL,airnow_RACM_ESRL_VCP
MB,Mean_Bias,2.5,1.2
MdnB,Median_Bias,2.73,1.43
R2,Coefficient_of_Determination_(R2),0.63,0.59
RMSE,Root_Mean_Square_Error,8.52,8.63