Skip to content

Commit

Permalink
Correct grounded budgets
Browse files Browse the repository at this point in the history
Previous commit used total calving and facemelting on plot instead of
just grounded components.
  • Loading branch information
trhille committed Oct 19, 2023
1 parent 4f00d0d commit 3c716e9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions landice/output_processing_li/plot_mass_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,17 @@
GLMigrationflux = -f.variables['groundingLineMigrationFlux'][:]/1.0e12
ax[0,1].plot(yr, GLMigrationflux, label="GL migration flux")

ax[0,1].plot(yr, SMBg+BMBg+calv+FMF+GLflux+GLMigrationflux, "--", label="total")
ax[0,1].plot(yr, SMBg+BMBg+calvg+FMFg+GLflux+GLMigrationflux, "--", label="total")

ax[0,1].legend(loc='best', prop={'size': 6})

# --- Figure: cumulative mass change ---
ax[1,1].set_xlabel('Year')
ax[1,1].set_ylabel('Cumulative mass change (Gt)')

ax[1,1].plot(yr, volGround - volGround[0], 'k', linewidth=3, label='total mass change')
ax[1,1].plot(yr, (SMBg*dyr).cumsum(), label="SMB")
ax[1,1].plot(yr, (BMBg*dyr).cumsum(), label="BMB")

ax[1,1].plot(yr, (calv*dyr).cumsum(), label='calving')
ax[1,1].plot(yr, (FMF*dyr).cumsum(), label='facemelt')
ax[1,1].plot(yr, (calvg*dyr).cumsum(), label='calving')
ax[1,1].plot(yr, (FMFg*dyr).cumsum(), label='facemelt')
ax[1,1].plot(yr, (GLflux*dyr).cumsum(), label="GL flux")
ax[1,1].plot(yr, (GLMigrationflux*dyr).cumsum(), label="GL Migration flux")
ax[1,1].plot(yr, ( (SMBg+BMBg+calvg+FMFg+GLflux+GLMigrationflux) * dyr).cumsum(), "--", label='total budget')
Expand Down

0 comments on commit 3c716e9

Please sign in to comment.