-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
processing TROPOMI L2 NO2 data and plot #225
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a292050
processing TROPOMI L2 NO2 data and plot
99a64b1
add licenses on cal_mod_no2col.py and sat_l2_swath_utility.py
f070459
Merge branch 'develop' into develop
mlirenzhenmayi 1803d11
update the header
mlirenzhenmayi b2c252c
Merge remote-tracking branch 'upstream/develop' into develop
mlirenzhenmayi d0164b2
Update cal_mod_no2col.py
rrbuchholz d6490a8
Update sat_l2_swath_utility.py
rrbuchholz b84d67a
Update driver.py
rrbuchholz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
1,637 changes: 1,637 additions & 0 deletions
1,637
examples/jupyter_notebooks/MM_trp_no2_l2_plot.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,782 changes: 1,782 additions & 0 deletions
1,782
examples/jupyter_notebooks/MM_trp_no2_l2_plot_wavk.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,174 @@ | ||
analysis: | ||
start_time: '2022-04-30' | ||
end_time: '2022-05-01' | ||
start_time: '2019-07-15' | ||
end_time: '2019-07-16' | ||
debug: True | ||
output_dir: /Users/mengli/Work/melodies-monet/outdata | ||
output_dir_save: /Users/mengli/Work/melodies-monet/outdata/save_intermediate | ||
output_dir_read: /Users/mengli/Work/melodies-monet/outdata/read_intermediate | ||
save: | ||
paired: | ||
method: 'netcdf' | ||
prefix: '201907' | ||
data: all | ||
read: | ||
paired: | ||
method: 'netcdf' | ||
filenames: | ||
{tropomi_l2_no2_wrfchem_v4.2: ['201907_tropomi_l2_no2_wrfchem_v4.2.nc4']} | ||
|
||
obs: | ||
tropomi_l2_no2: | ||
debug: True | ||
filename: /Users/mengli/Work/melodies-monet/obsdata/tropomi_no2/* | ||
filename: /Users/mengli/Work/melodies-monet/obsdata/tropomi_no2/20190715/* | ||
#filename: /Volumes/Meng/TROPOMI/20190715/* | ||
obs_type: sat_swath_clm | ||
sat_type: tropomi_l2_no2 | ||
variables: | ||
qa_value: | ||
quality_flag_min: 0.7 | ||
var_applied: ['nitrogendioxide_tropospheric_column'] | ||
fillvalue: 9.96921e+36 | ||
nitrogendioxide_tropospheric_column: | ||
scale: 6.022141e+19 # unit convert form mol_perm2to molec_percm2,6.022141e+19 | ||
fillvalue: 9.96921e+36 | ||
#averaging_kernel: None | ||
#air_mass_factor_troposphere: None | ||
#tm5_tropopause_layer_index: None | ||
#tm5_constant_a: None | ||
#tm5_constant_b: None | ||
|
||
|
||
ylabel_plot: 'NO2 trop. columns' | ||
#ty_scale: 3.0 #opt | ||
vmin_plot: 0.0 # optMin for y-axis during plotting. To apply to a plot, change restrict_yaxis = True. | ||
vmax_plot: 1.0e+16 | ||
#vdiff_plot: 15.0 # Opt +/- range to use in bias plots. To apply to a plot, change restrict_yaxis = True. | ||
nlevels_plot: 23 # Opt number of levels used in colorbar for contourf plot. | ||
regulatory: False | ||
averaging_kernel: | ||
fillvalue: 9.96921e+36 | ||
air_mass_factor_total: | ||
fillvalue: 9.96921e+36 | ||
air_mass_factor_troposphere: | ||
fillvalue: 9.96921e+36 | ||
latitude: None | ||
longitude: None | ||
|
||
preslev: # pressure of the vertical layer center | ||
tm5_constant_a: | ||
group: ['PRODUCT'] | ||
maximum: 9.0e+36 | ||
tm5_constant_b: | ||
group: ['PRODUCT'] | ||
maximum: 9.0e+36 | ||
surface_pressure: | ||
group: ['PRODUCT/SUPPORT_DATA/INPUT_DATA/'] | ||
maximum: 9.0e+36 | ||
tm5_tropopause_layer_index: | ||
group: ['PRODUCT'] | ||
#latitude_bounds: | ||
# group: ['PRODUCT/SUPPORT_DATA/GEOLOCATIONS/'] | ||
#longitude_bounds: | ||
# group: ['PRODUCT/SUPPORT_DATA/GEOLOCATIONS/'] | ||
|
||
model: | ||
wrfchem_v4.2: | ||
files: /Users/mengli/Work/melodies-monet/modeldata/wrfchem/0715/* | ||
#files: /Volumes/Meng/WRF_Chem/0715/* | ||
mod_type: 'wrfchem' | ||
apply_ak: True | ||
mod_kwargs: | ||
mech: 'racm_esrl_vcp' | ||
mapping: #model species name : obs species name | ||
tropomi_l2_no2: | ||
no2: nitrogendioxide_tropospheric_column | ||
projection: ~ | ||
plot_kwargs: #Opt | ||
color: 'dodgerblue' | ||
marker: '^' | ||
linestyle: ':' | ||
|
||
plots: | ||
plot_grp1: | ||
type: 'timeseries' # plot type | ||
fig_kwargs: #Opt to define figure options | ||
figsize: [12,6] # figure size if multiple plots | ||
default_plot_kwargs: # Opt to define defaults for all plots. Model kwargs overwrite these. | ||
linewidth: 2.0 | ||
markersize: 10. | ||
text_kwargs: #Opt | ||
fontsize: 18. | ||
domain_type: ['all'] #List of domain types: 'all' or any domain in obs file. (e.g., airnow: epa_region, state_name, siteid, etc.) | ||
domain_name: ['CONUS'] #List of domain names. If domain_type = all domain_name is used in plot title. | ||
data: ['tropomi_l2_no2_wrfchem_v4.2'] # make this a list of pairs in obs_model where the obs is the obs label and model is the model_label | ||
data_proc: | ||
#See 'altitde_yax2' list below for secondary y-axis options | ||
#altitude_variable: altitude | ||
#altitude_ticks: 1000 # Altitude tick interval in meters (for secondary y-axis for altitude (m)) | ||
rem_obs_nan: True # True: Remove all points where model or obs variable is NaN. False: Remove only points where model variable is NaN. | ||
ts_select_time: 'time' #Time used for avg and plotting: Options: 'time' for UTC or 'time_local' | ||
ts_avg_window: 'H'# pandas resample rule (e.g., 'H', 'D'). No averaging is done if ts_avg_window is null or not specified. | ||
set_axis: False #If select True, add vmin_plot and vmax_plot for each variable in obs. | ||
#vmin2, vmax2 filter not needed as filter_dict option added in 'altitude_yax2' to subset the paireddf as per altitude secondary-axis limits | ||
#vmin2: #0 #Optional | ||
#vmax2: #5000 #12000 #Optional #Subset limits for secondary y-axis (altitude_variable) | ||
plot_grp2: | ||
type: 'gridded_spatial_bias' # plot type | ||
fig_kwargs: #For all spatial plots, specify map_kwargs here too. | ||
states: True | ||
figsize: [10, 5] # figure size | ||
text_kwargs: #Opt | ||
fontsize: 16. | ||
domain_type: ['all'] #List of domain types: 'all' or any domain in obs file. (e.g., airnow: epa_region, state_name, siteid, etc.) | ||
domain_name: ['CONUS'] #List of domain names. If domain_type = all domain_name is used in plot title. | ||
data: ['tropomi_l2_no2_wrfchem_v4.2'] # make this a list of pairs in obs_model where the obs is the obs label and model is the model_label | ||
data_proc: | ||
#filter_dict: {'state_name':{'value':['CA','NY'],'oper':'isin'},'WS':{'value':1,'oper':'<'}} | ||
#filter_string: state_name in ['CA','NY'] and WS < 1 # Uses pandas query method. | ||
#rem_obs_by_nan_pct: {'group_var': 'siteid','pct_cutoff': 25,'times':'hourly'} # Groups by group_var, then removes all instances of groupvar where obs variable is > pct_cutoff % nan values | ||
rem_obs_nan: True # True: Remove all points where model or obs variable is NaN. False: Remove only points where model variable is NaN. | ||
set_axis: True #If select True, add vdiff_plot for each variable in obs. | ||
plot_grp3: | ||
type: 'taylor' # plot type | ||
fig_kwargs: #Opt to define figure options | ||
figsize: [8,8] # figure size if multiple plots | ||
default_plot_kwargs: # Opt to define defaults for all plots. Model kwargs overwrite these. | ||
markersize: 10. | ||
text_kwargs: #Opt | ||
fontsize: 16. | ||
domain_type: ['all'] #List of domain types: 'all' or any domain in obs file. (e.g., airnow: epa_region, state_name, siteid, etc.) | ||
domain_name: ['CONUS'] #List of domain names. If domain_type = all domain_name is used in plot title. | ||
data: ['tropomi_l2_no2_wrfchem_v4.2'] # make this a list of pairs in obs_model where the obs is the obs label and model is the model_label | ||
data_proc: | ||
#filter_dict: {'state_name':{'value':['CA','NY'],'oper':'isin'},'WS':{'value':1,'oper':'<'}} | ||
#filter_string: state_name in ['CA','NY'] and WS < 1 # Uses pandas query method. | ||
#rem_obs_by_nan_pct: {'group_var': 'siteid','pct_cutoff': 25,'times':'hourly'} # Groups by group_var, then removes all instances of groupvar where obs variable is > pct_cutoff % nan values | ||
rem_obs_nan: True # True: Remove all points where model or obs variable is NaN. False: Remove only points where model variable is NaN. | ||
set_axis: False #If select True, add ty_scale for each variable in obs. | ||
plot_grp4: | ||
type: 'boxplot' # plot type | ||
fig_kwargs: | ||
figsize: [8, 6] # figure size | ||
default_plot_kwargs: # Opt to define defaults for all plots. Model kwargs overwrite these. | ||
markersize: 10. | ||
text_kwargs: #Opt | ||
fontsize: 20. | ||
domain_type: ['all'] #List of domain types: 'all' or any domain in obs file. (e.g., airnow: epa_region, state_name, siteid, etc.) | ||
domain_name: ['CONUS'] #List of domain names. If domain_type = all domain_name is used in plot title. | ||
data: ['tropomi_l2_no2_wrfchem_v4.2'] # make this a list of pairs in obs_model where the obs is the obs label and model is the model_label | ||
data_proc: | ||
#filter_dict: {'state_name':{'value':['CA','NY'],'oper':'isin'},'WS':{'value':1,'oper':'<'}} | ||
#filter_string: state_name in ['CA','NY'] and WS < 1 # Uses pandas query method. | ||
#rem_obs_by_nan_pct: {'group_var': 'siteid','pct_cutoff': 25,'times':'hourly'} # Groups by group_var, then removes all instances of groupvar where obs variable is > pct_cutoff % nan values | ||
rem_obs_nan: True # True: Remove all points where model or obs variable is NaN. False: Remove only points where model variable is NaN. | ||
set_axis: True #If select True, add vmin_plot and vmax_plot for each variable in obs. | ||
|
||
stats: | ||
#Stats require positive numbers, so if you want to calculate temperature use Kelvin! | ||
stat_list: ['MB','NMB', 'R2', 'RMSE'] #List stats to calculate. Dictionary of definitions included in plots/proc_stats.py Only stats listed below are currently working. | ||
#Full calc list ['STDO', 'STDP', 'MdnNB','MdnNE','NMdnGE', 'NO','NOP','NP','MO','MP', 'MdnO', 'MdnP', 'RM', 'RMdn', 'MB', 'MdnB', 'NMB', 'NMdnB', 'FB', 'ME','MdnE','NME', 'NMdnE', 'FE', 'R2', 'RMSE','d1','E1', 'IOA', 'AC'] | ||
round_output: 2 #Opt, defaults to rounding to 3rd decimal place. | ||
output_table: True #Always outputs a .txt file. Optional to also output as a table. | ||
output_table_kwargs: #Opt | ||
figsize: [12, 6] # figure size | ||
fontsize: 12. | ||
xscale: 1.4 | ||
yscale: 1.4 | ||
edges: 'horizontal' | ||
domain_type: ['all'] #List of domain types: 'all' or any domain in obs file. (e.g., airnow: epa_region, state_name, siteid, etc.) | ||
domain_name: ['CONUS'] #List of domain names. If domain_type = all domain_name is used in plot title. | ||
data: ['tropomi_l2_no2_wrfchem_v4.2'] # make this a list of pairs in obs_model where the obs is the obs labeland model is the model_label | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be called on the obs.sat_type instead? I think we decided to keep label as a fairly subjective thing (say there are several version of tropomi retrievals, then you could use the label to differentiate them).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should now be obs.sat_type and not obs.label. I think that change may have been made during the process of the big develop_satellite merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, great - I changed that in the driver file for tropomi.