AirNow and WRF-Chem

Our first example will demonstrate the basics available in MELODIES MONET to compare WRF-Chem model results against AirNow surface observations for ozone and PM2.5.

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.

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.yaml"
an.read_control()
an.control_dict

Hide code cell output

{'analysis': {'start_time': '2019-09-05-06:00:00',
  'end_time': '2019-09-06-06:00:00',
  'output_dir': './output/airnow_wrfchem',
  'debug': True},
 'model': {'RACM_ESRL': {'files': 'example:wrfchem:racm_esrl',
   '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',
   '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},
    '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}}}},
 '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': 'h',
    '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_grp4': {'type': 'spatial_overlay',
   'fig_kwargs': {'states': True, 'figsize': [10, 5]},
   'text_kwargs': {'fontsize': 16.0},
   'domain_type': ['all', 'epa_region'],
   'domain_name': ['CONUS', 'R9'],
   '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_grp6': {'type': 'scorecard',
   'fig_kwargs': {'figsize': [15, 10]},
   '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'],
   'urban_rural_name': ['msa_name'],
   'urban_rural_differentiate_value': '',
   'better_or_worse_method': 'NME',
   '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_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', 'R1'],
   '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.yaml',
    control_dict=...,
    models={},
    obs={},
    paired={},
    start_time=Timestamp('2019-09-05 06:00:00'),
    end_time=Timestamp('2019-09-06 06:00:00'),
    time_intervals=None,
    download_maps=True,
    output_dir='./output/airnow_wrfchem',
    output_dir_save='./output/airnow_wrfchem',
    output_dir_read='./output/airnow_wrfchem',
    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
**** Reading WRF-Chem model output...
wrfchem
example:wrfchem:racm_esrl_vcp
**** 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': ['o3', 'PM2_5_DRY']},
     file_str='example:wrfchem:racm_esrl',
     label='RACM_ESRL',
     obj=...,
     extra_calc=None,
     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': ['o3', 'PM2_5_DRY']},
     file_str='example:wrfchem:racm_esrl_vcp',
     label='RACM_ESRL_VCP',
     obj=...,
     extra_calc=None,
     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: 32MB
Dimensions:    (y: 284, x: 440, time: 31, 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] 248B 2019-09-05 ... 2019-09-06T06:00:00
Dimensions without coordinates: y, x, z
Data variables:
    o3         (time, z, y, x) float32 15MB 30.0 30.0 30.0 ... 34.72 36.87 37.13
    PM2_5_DRY  (time, z, y, x) float32 15MB 3.046 3.048 2.84 ... 0.4506 0.4512
Attributes: (12/17)
    FieldType:                                       104
    MemoryOrder:                                     XYZ
    description:                                     O3 mixing ratio
    units:                                           ppmv
    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':...

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=...,
     extra_calc=None,
     type='pt_src',
     sat_type=None,
     sat_method=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}, '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}},
     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 52.9 s, sys: 34.9 s, total: 1min 27s
Wall time: 1min 37s
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.409628418207226
Warning: ty_scale not specified for OZONE, so default used.
Reference std: 16.454896847070792
Warning: ty_scale not specified for OZONE, so default used.
0 (22449, 1)
0 (22449, 2)
1 (22449, 3)
final 1 1
/Users/rschwantes/Documents/MONET/version1.1/update_wind_barb/MELODIES-MONET/melodies_monet/plots/surfplots.py:2244: 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 (999, 1)
0 (999, 2)
1 (999, 3)
final 1 1
/Users/rschwantes/Documents/MONET/version1.1/update_wind_barb/MELODIES-MONET/melodies_monet/plots/surfplots.py:2244: 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 (30675, 1)
0 (30675, 2)
1 (30675, 3)
final 1 1
/Users/rschwantes/Documents/MONET/version1.1/update_wind_barb/MELODIES-MONET/melodies_monet/plots/surfplots.py:2244: 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 (1408, 1)
0 (1408, 2)
1 (1408, 3)
final 1 1
/Users/rschwantes/Documents/MONET/version1.1/update_wind_barb/MELODIES-MONET/melodies_monet/plots/surfplots.py:2244: 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 53s, sys: 1min 58s, total: 6min 51s
Wall time: 7min 34s
../_images/fc1703b19510696e81767ba0b912c158ca088e4fa6a55aa81d1dc94226a9b1ee.png ../_images/1f2727983d2dee92e0f21eca91ab39963fa8b881cc456bb3188885d56c4c792d.png ../_images/84c18431d05f70c5dd18046065bf02392ff6f9599a93b65dfe5c14151e43729e.png ../_images/81e5c681595f1823b77ade39bbe920ef47e12c5a03b8242ef4b2ffeef341f5fb.png ../_images/79ef90a46c2d5663fd4a3cf04acd0b2fbc2db71dab2f71deed752a7bcf9924e3.png ../_images/77428bef6c5bb87112244ee9d4c716bc79bb09b9ed447f992b7b9c0f6ea6ff00.png ../_images/99e12a693b57becf5ba22acfd5a9c315bd2b1cbabd8488686821544be837b0ca.png ../_images/ff38aea150862681b7a4270928592731d3173c343102b8b53b003f307aff5924.png ../_images/065e48e88d8116eac077ae3ab2404ab19dcf83631bfec5d5cc53185bd126266a.png ../_images/1a7f84fca6fbc812983d825d40dcec26c07a0a0ffbfd4ddd25bd111d1d52ca25.png ../_images/24b32a944d89b1504578659853f4b932c5f79f6e1edf4aca54688e4dd96309ef.png ../_images/87fae1a210a990edb1051c9c86e9dd0ef199d1e582f24c2ae4fb606c183532b7.png ../_images/9d4c5030ad33ecb3452eb1bf7a36912ca2beddd289b9f50ddbc3a5362d499af6.png ../_images/7fa7042a87711cfae84a1cfed96d04d69b133b556908586a450f829f3c8e566b.png ../_images/d5abe5194052a32c5b605ab002e394a4ffe96e79567b14455349474167c2bf1d.png ../_images/bc6a7870f1740d5774bc1e36f05bf3c7285362d9faa50b5208c2500e893bc606.png ../_images/96993e5b088413c7a6bf3c9c22485394171e2fab79eb4ea9765f8e8734f0d456.png ../_images/d6d55c855c6df3395c99ec423b3206e0fd0165fca9f9eb415a476e33b4020a67.png ../_images/171e1aee8ae6240abbe2809e19806c5f60a05421123688ba9ad13beb855fbf02.png ../_images/0cd34d8878afc4dd41b3677231e17ea09b1507c31f2dbf494d0fde867da45eb9.png ../_images/6fa75f66c7183388f399b47f8d8c185e2352e7db7e0fadbed37f0f083a1d88da.png ../_images/eed8d3bbf8784edf2770269ae9892e75cbc28b0b31f7c208b31de0279562905c.png ../_images/3c1d2243d0f22304eeab123415b58ae42045636083c17148914b4626a9da9678.png ../_images/2bc8b23cd93a214124a7caa09b0b32b1fb7a588cb273d92dd6753150a8df12ed.png ../_images/089c7c4e9d00ff82ce5e1b989ec5ccfcdfdfac1a2867171801d3a97c10da255f.png ../_images/cd52925a34e3cdd016af2ed7ab96cad2a99c900dc2696415700eab25b9a2de5d.png ../_images/cdbfaf4e1de2777402fc27391f69d2dfa7d2657d2ae56c7d0b941c47560ff36b.png ../_images/7da4cdb0f6e015ddaa05e2f8f8b5a6106e4b44a4b35a19aa4e58e2432937c57b.png ../_images/0a2a5ae1de20cc0d2efa7a8270ba19dc293833e4857e031ed060908ccdc6ca5b.png ../_images/30d014e02eb494a93dab55a8d61b9a416a86a563c49d7e7e01afca7d3a97f52a.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 4s, sys: 31.2 s, total: 1min 35s
Wall time: 1min 43s

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

output/airnow_wrfchem/stats.OZONE.all.CONUS.2019-09-05_06.2019-09-06_06.csv
Stat_ID,Stat_FullName,airnow_RACM_ESRL,airnow_RACM_ESRL_VCP
MB,Mean_Bias,3.93,3.23
MdnB,Median_Bias,3.86,3.27
R2,Coefficient_of_Determination_(R2),0.56,0.54
RMSE,Root_Mean_Square_Error,11.64,11.59