Skip to content

Commit

Permalink
Merge pull request #110 from tsherwen/dev
Browse files Browse the repository at this point in the history
Merge of code used in publication.
  • Loading branch information
tsherwen authored Aug 6, 2021
2 parents 2bca7d7 + 730aaab commit 1b7b1c8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
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

0 comments on commit 1b7b1c8

Please sign in to comment.