ut_no2_gc_test
Use synthetic partial columns from GEOS-Chem to obtain cloud-sliced NO2 in the upper troposphere and compare this to UT NO2 obtained if simply average the NO2 mixing ratios from the model over the same pressure range (the “truth”). Both are obtained by Gaussian weighting toward the pressure center.
GEOS-Chem partial columns are obtained over Europe, North America, and China at the GEOS-FP meteorology native resolution (0.25x0.3125) (latxlon) for June-August 2016-2017.
Input options to process the data include the region, the horizontal resolution, and model simulation years.
usage: ut_no2_gc_test.py [-h] [--gc_dir GC_DIR] [--out_dir OUT_DIR]
[--resolution RESOLUTION] [--region REGION]
[--strat_filter_threshold STRAT_FILTER_THRESHOLD]
[--start_date START_DATE]
[--end_date END_DATE] [-p PLOT]
[--do_temp_correct DO_TEMP_CORRECT]
[--apply_cld_frac_filter APPLY_CLD_FRAC_FILTER]
[--do_cld_hght_test DO_CLD_HGHT_TEST]
optional arguments:
-h, --help show this help message and exit
--gc_dir GC_DIR
--out_dir OUT_DIR
--resolution RESOLUTION
Can be 8x10, 4x5, 2x25 or 1x1
--region REGION Can be EU, NA, or CH
--strat_filter_threshold STRAT_FILTER_THRESHOLD
--start_date START_DATE
--end_date END_DATE
-p PLOT, --plot PLOT
--do_temp_correct DO_TEMP_CORRECT
--apply_cld_frac_filter APPLY_CLD_FRAC_FILTER
--do_cld_hght_test DO_CLD_HGHT_TEST
-
class
uptrop.ut_no2_gc_test.
GeosChemDay
(file_path, temperature_correction=False, cloud_height_test=False) A class for reading, preprocessing and accessing Geoschem data on a given day
-
__init__
(file_path, temperature_correction=False, cloud_height_test=False) Reads the data at file_path and returns a GeosChemDay object containing that data
- Parameters
file_path (str) – Path to the netcdf4 file containing the GeosChem data
temperature_correction (bool) – Whether to apply temperature correction
cloud_height_test (bool) – Whether to test effect of systematic underestimate in cloud height
- Returns
A GeosChemDay class
- Return type
-
-
class
uptrop.ut_no2_gc_test.
ProcessedData
(region, str_res, strat_thld, do_temperature_correction=False, do_cld_frac_filter=False, do_cld_hght_test=False) A class for comparing geoschem and tropomi data
-
__init__
(region, str_res, strat_thld, do_temperature_correction=False, do_cld_frac_filter=False, do_cld_hght_test=False) Creates and returns an instance of ProcessedData for a given region
This class aggregates geoschem data over a grid defined by the define_grid method.
- Parameters
region (str) – The region to aggregate geoschem over; can be NA, EU or CH.
str_res (str) – The resolution of the grid around teh region to analyse; can be 8x10, 4x5, 2x25 or 1x1
do_temperature_correction (bool) – Whether to perform the temperature correction step
do_cld_frac_filter (bool) – Whether to perform fractional filtering of clouds
- Returns
A ProcessedData isntance ready to recieve data
- Return type
-
add_slice
(i, j, t_cld, t_col_no2, t_mr_no2, t_fr_c, t_grad_no2, t_o3) - Extracts the upper troposphere gc_data, gc_data error, ozone data, ozone error,
and mean cloud pressure for grid square [i,j]
This method uses the cloud-slicing function uptrop.cloud_slice_ut_no2.cldslice Once calculated, the a weighting is derived from cloud pressure. The weighted upper tropospheric gc_data and error is added to the rolling total for this season. If the cloud slicing fails, then the reason is added to loss_count for the end report.
- Parameters
i (int) – X-index of grid square
j (int) – Y-index of grid square
t_cld (float) – Tropospheric cloud
t_col_no2 (float) – Total (stratosphere+troposphere) column no2
t_mr_no2 (float) – NO2 mixing ratio between pmax and pmin
t_fr_c (float) – Cloud fraction between pmax and pmin
t_grad_no2 (float) – NO2 gradient between pmax and pmin in pptv/hPa
t_o3 (float) – O3 mixing ratio to test influence from stratosphere
-
define_grid
(region, str_res) Defines a grid based on a set of regional bounding boxes and a resolution
- Parameters
region (str) – The region to aggregate geoschem over; can be NA, EU or CH.
str_res (str) – The resolution of the grid around the region to analyse; can be 8x10, 4x5, 2x25 or 1x1
-
process_geoschem_day
(file_path) Aggregates geoschem data into the processing grid for a file on a given day.
Calls regrid_and_process for each pixel in the geoschem file, then calls process_grid_square for each square of the grid
- Parameters
file_path (str) – Path to the geoschem file to load into the processing grid
-
regrid_and_process
(x, y, gc_data) Inserts data from pixel x,y from geoschem data into the appropriate grid cell
- Parameters
x (int) – X index of geoschem grid cell
y (int) – Y index of geoschem grid cell
gc_data (GeosChemDay) – An instance of GeosChemDay data
-