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

Fix bug in GCHP transport tracer budget table #192

Merged
merged 1 commit into from
Jan 24, 2023
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
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [1.3.2] -- 2022-10-25

### Changed
- Bug fix: Fixed malformed version declaration for cartopy (use `==`
### Fixes
- Fixed malformed version declaration for cartopy (use `==`
instead of `=`) in setup.py. This was preventing upload to
conda-forge.

- Vertically flip GCHP emissions when computing transport tracers budget

## [1.3.1] -- 2022-10-25

### Changed
Expand Down
8 changes: 4 additions & 4 deletions gcpy/budget_tt.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,17 +559,17 @@ def annual_average_sources(globvars):
raise ValueException(msg)

# Convert Be7 and Be10 sources from kg/m2/s to g/day
# NOTE: This is a kludgey way to do it but it works and
# preserves the shape of the data as (time,lev,lat,lon).
# If GCHP data, must vertically flip the emissions diagnostic
for t in range(globvars.N_MONTHS):
for k in range(n_levs):
if globvars.is_gchp:
kf = n_levs - k - 1
q["Be7_f"][t, k, :, :, :] = \
globvars.ds_hco["EmisBe7_Cosmic"].isel(time=t, lev=k) * \
globvars.ds_hco["EmisBe7_Cosmic"].isel(time=t, lev=kf) * \
globvars.ds_met[area_var].isel(time=t) * \
globvars.kg_s_to_g_d["Be7"]
q["Be10_f"][t, k, :, :, :] = \
globvars.ds_hco["EmisBe10_Cosmic"].isel(time=t, lev=k) * \
globvars.ds_hco["EmisBe10_Cosmic"].isel(time=t, lev=kf) * \
globvars.ds_met[area_var].isel(time=t) * \
globvars.kg_s_to_g_d["Be10"]
else:
Expand Down