Skip to content
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

Merge of code used in publication. #110

Merged
merged 2 commits into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions AC_tools/GEOSChem_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,24 @@ def get_general_stats4run_dict_as_df(run_dict=None, extra_str='', REF1=None,

# - Add Ozone production and loss...

# - Add lightning source if in HEMCO output
var2use = 'EmisNO_Lightning'
varName = 'Lightning (Tg N/yr)'
try:
# TODO - add check for HEMCO NetCDF files in the output folder
# if True:
dsH = {}
for key in run_dict.keys():
dsH[key] = get_HEMCO_diags_as_ds(wd=run_dict[key])
ds = ds[key]
val = (ds[var2use].mean(dim='time').sum(dim='lev') * ds['AREA'] )
val2 = val.values.sum() * 60 * 60 * 24 * 365 # => /yr
df.loc[key,varName] = val2*1E3/1E12
except KeyError:
pass
df.loc[key,varName] = np.nan


# - Surface concentrations
core_surface_specs = ['O3', 'NO', 'NO2', 'N2O5']
prefix = 'SpeciesConc_'
Expand Down
2 changes: 1 addition & 1 deletion scripts/geos-chem-schedule
Submodule geos-chem-schedule updated 3 files
+31 −32 core.py
+2 −1 test.py
+3 −2 utils.py