Skip to content

SMB water-budget fixes and GLAD ocean-mask fix for coupled runs - #97

Merged
Katetc merged 5 commits into
mainfrom
lipscomb/smb_fixes
Nov 12, 2026
Merged

Katetc merged 5 commits into
mainfrom
lipscomb/smb_fixes

Conversation

@whlipscomb

@whlipscomb whlipscomb commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Branch: lipscomb/smb_fixes
Base: main (6f04e11, tag cism_main_3.00.002, the CISM version in CESM3 alpha11d)
Matching CISM-wrapper PR: ESCOMP/CISM-wrapper lipscomb/smb_fixes. Coupler change (already merged): ESCOMP/CMEPS#720.
5 commits

Summary

This PR brings the SMB water-conservation fixes for coupled CESM runs into main, ahead of the larger Glide/Glissade refactoring. It replaces CISM PR #95 (which was stacked on #94) with the same changes ported to the code on main, so that they can be tested in the current CESM3 runs right away. It also includes the one commit from #94 that changes answers in CESM (the GLAD ocean-mask fix). The rest of #94 will follow in smaller PRs, each bit-for-bit in CESM relative to this one.

In CESM runs with an evolving Greenland ice sheet, the land model's meltwater exceeded the ice that CISM actually lost by about 40-60 Gt/yr, which shows up as a freshwater drift in the coupled system. This PR adds diagnostics that measure where SMB received from the coupler is not applied, and changes that remove the imbalances found:

  1. GLAD ocean mask (a165420, port of 02eae8d). GLAD sets acab = 0 over ice-free ocean cells using the current geometry (thck <= 0 and topg - eus < 0) instead of thkmask, which could be out of date at the first time step if initialization removed ice.
  2. SMB budget diagnostics (f9c0648, a87420d). New fields record, in each cell and globally, the SMB received from the coupler, the part that GLAD sets to zero before the dycore sees it, and the part the dycore does not apply. The budget closes exactly: received = applied + unapplied (GLAD) + unapplied (dycore).
  3. Fractional ice_covered (a4c56d3). A new option, ice_covered_thck_scale in the [GLAD climate] section, makes GLAD send ice_covered = min(1, thck/ice_covered_thck_scale) instead of 1 wherever thck > 0. This removes almost all of the imbalance. The default, 0, keeps the binary field. Fractional values require Allow fractional ice_covered values in the lnd2glc downscaling CMEPS#720.
  4. Return unapplied positive SMB as solid runoff (bc9e9a3). Positive SMB that the dycore does not apply (for example, removed by block_inception) is added to rofi, so that the water the land model removed as SMB is not lost.

Each commit is a port of the corresponding commit on lipscomb/separate_glide_glissade (#94) or lipscomb/smb_conservation (#95), with the same message plus a note on the port. Since main predates the Glide/Glissade split, the new fields are in glide_types.F90 and glide_vars.def, and the global sums in glide_diagnostics.F90; the changed lines are otherwise the same as in #95.

Where the imbalance came from

Almost all of the imbalance is in cells holding only a trace of ice. GLAD reported any cell with thck > 0 as fully ice-covered, so the coupler gave it a full year of low-elevation glacier SMB (ablation of ~1 m/yr or more), and the land model melted that much glacier ice and sent the water to runoff. CISM could melt only the few mm or cm present. In a 1-year run, 94% of the 62 Gt/yr imbalance was in cells with less than 10 cm of ice at the start of the year. With a fractional ice_covered, a cell with thin ice gets a blend of glacier and bare-land SMB, weighted by its ice cover.

In 20-year 1850 I-compset runs (CLM6 BGC-CROP, DATM coupler history from a B run, evolving gris4):

Control (binary) H0 = 2 m H0 = 4 m
CISM-side imbalance (Gt/yr) 36 to 53 0.01 to 0.16 0.00 to 0.10
Cells switching ice-covered/ice-free per year 280-340 22-57 14-32
CISM applied SMB - CLM QICE (Gt/yr) 31-48 1.5-7.5 1.5-7.2

These runs used the code of #95; this PR gives the same answers in CESM (see Testing).

Changes

New output fields (m/yr ice in output, each with a _tavg version): acab_cpl, acab_unapplied_glad, acab_unapplied.
New global scalars (kg/s, each with a _tavg version): total_smb_cpl_flux, total_smb_unapplied_glad_flux, total_smb_unapplied_flux; also written to the log in coupled runs.
New config option ice_covered_thck_scale in [GLAD climate] (m, default 0).
Solid runoff: rofi now includes the positive part of acab_unapplied.

Answer changes

  • Standalone runs: none (output and log files unchanged).
  • CESM, default settings (ice_covered_thck_scale = 0):
    • the ocean-mask fix changes answers slightly for cold starts whose input file has ice that is removed during initialization;
    • rofi increases where positive SMB is not applied (about 2-5 Gt/yr for Greenland, mostly from block_inception).
  • CESM with ice_covered_thck_scale > 0: answers change as described above. Requires Allow fractional ice_covered values in the lnd2glc downscaling CMEPS#720.

Testing

All on derecho.

  • Standalone CISM, main vs. this branch: Glissade dome and higher-order Halfar tests give identical output and log files. (Glide standalone tests fail on main with a segmentation fault, with or without this PR; Glide fixes will come in a later PR.)
  • CESM, full aux_glc suite (34 tests) plus a new test with the Greenland settings of the CESM3 runs (ERS_Ly3.f09_g17_gris4.T1850Gg.derecho_intel.cism-gris_powerlaw), with the matching CISM-wrapper branch. All builds, runs and restart, branch and hybrid comparisons pass.
  • With fractional ice_covered (CISM-wrapper testmod cism/fractional_ice_covered, H0 = 4 m) and Allow fractional ice_covered values in the lnd2glc downscaling CMEPS#720, all pass, including exact-restart comparisons, and the output is identical to the same tests run with the code of SMB water-budget diagnostics and conservation fixes for coupled runs #95 (CISM and coupler history, 227 files): ERS_Ly5.f09_g17_gris4.T1850Gg.derecho_intel, ERS_Ly4.f10_f10_ais8gris4_mg37.I1850Clm50SpGag.derecho_intel, SMS_D_Ly1.f09_g17_ais8.T1850Ga
    .derecho_gnu.

🤖 Generated with Claude Code

whlipscomb and others added 5 commits November 11, 2026 11:09
ANSWER-CHANGING for CESM (GLAD) runs, at startup only.
Standalone runs are not affected.

GLAD sets acab = 0 over ice-free ocean cells before each ice-sheet time step.
It found these cells with GLIDE_IS_OCEAN(thkmask). With Glissade, thkmask
was set at three points: during initialization, after initial calving, and
at the end of each time step (after transport and calving). After a time
step the mask matched the current geometry. At GLAD's first step, however,
the mask could be out of date: if initialization later removed ice (e.g.,
icebergs or ice caps with remove_icebergs or remove_ice_caps), GLAD did not
zero acab in the newly ice-free ocean cells, and positive SMB grew ice there.

Now GLAD tests the current geometry directly, zeroing acab where
thck <= 0 and topg - eus < 0.

This is a port of commit 02eae8d on ESCOMP/CISM lipscomb/separate_glide_glissade
(PR #94) to the code on main. In that branch, the change came after thkmask
was removed from Glissade; here, Glissade still computes thkmask, but GLAD
no longer uses it.

CESM answers change slightly for cold starts whose input file has ice that
is removed during initialization. In the aux_glc subset, compared to
baseline cesm_timevars_step3 (results of the original commit):
- SMS_D_Ly1.f09_g17_gris4 (intel and gnu): solid ice runoff (rofi) differs
  in 2 cells (ice-free, bed below sea level, with isolated ice in the input
  file); the ice sheet state is identical.
- ERS_Ly5.f09_g17_ais8: the ice sheet state differs slightly after 5 years
  (e.g., thk normalized RMS ~1e-6).
- ERI_Ly9.f09_g17_ais8gris4 (noevolve_ais): no change.
Restart comparisons pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In CESM runs with an evolving ice sheet, not all of the SMB received
from the coupler is applied to the ice. This commit adds diagnostics
to measure the unapplied SMB and where it occurs.

New 2D fields (m/yr ice in I/O, m/s ice in the code), each with a
time-average version:
* acab_cpl: SMB received from the coupler, saved by GLAD before any
  masking.
* acab_unapplied_glad: SMB zeroed by GLAD before the dycore sees it,
  i.e. negative SMB in ice-free cells and any SMB in ice-free ocean
  cells. GLAD applies this masking at each ice dynamics time step
  within the coupling interval, using the current ice thickness.
* acab_unapplied: SMB passed to the dycore but not applied
  (acab - acab_applied), e.g. melt in excess of the ice present.

New global scalars (kg/s), each with a time-average version:
total_smb_cpl_flux, total_smb_unapplied_glad_flux and
total_smb_unapplied_flux. In each cell and globally,
  acab_cpl = acab_applied + acab_unapplied_glad + acab_unapplied
  total_smb_cpl_flux = total_smb_flux + total_smb_unapplied_glad_flux
                       + total_smb_unapplied_flux
For coupled runs, these totals are also written to the log file.

Standalone runs are unchanged, including their log files.

This is a port of commit fb1379c on ESCOMP/CISM lipscomb/smb_conservation (PR #95)
to the code on main, which predates the Glide/Glissade split. Here the new fields are in glide_types.F90 and glide_vars.def, and the global sums in glide_diagnostics.F90 (in its Glissade-only block).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SMB budget diagnostics did not close: in a 1-year CESM run with an
evolving Greenland ice sheet, the SMB received from the coupler exceeded
the sum of the applied and unapplied terms by 2.25 Gt/yr. The missing
SMB was positive acab removed by block_inception, which zeroes positive
acab outside the extended ice sheet mask after GLAD has passed acab to
the dycore, and before acab_unapplied was computed.

Now acab_unapplied is the acab received by the dycore, saved at the
start of glissade_prepare_climate_forcing before any adjustments
(overwrite_acab, block_inception, dthck_dt correction), minus
acab_applied. With this change the budget closes in each cell:
  acab_cpl = acab_applied + acab_unapplied_glad + acab_unapplied

Standalone answers are unchanged.

This is a port of commit f02c5c8 on ESCOMP/CISM lipscomb/smb_conservation (PR #95)
to the code on main, which predates the Glide/Glissade split. Here the field definitions are in glide_types.F90.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GLAD sends the coupler an ice_covered field, used by the coupler to
choose between bare-land and glacier SMB for each CISM cell, and by the
land model to set its glacier areas. Currently ice_covered = 1 where
thck > 0, else 0. As a result, cells with a trace of ice (a few mm or
cm) are assigned a full year of glacier ablation, most of which cannot
be applied. In CESM runs with an evolving Greenland ice sheet, this
leaves about 60 Gt/yr of land-model meltwater with no matching ice
loss, and many such cells flicker between ice-covered and ice-free
states from year to year.

This commit adds a parameter ice_covered_thck_scale in the [GLAD
climate] section. If ice_covered_thck_scale > 0, then
  ice_covered = min(1, thck/ice_covered_thck_scale),
so that thin ice is treated as partly covering the cell. In a
single-cell model, this gives a steady state with no unapplied melt,
provided ice_covered_thck_scale exceeds the difference between the
bare-land and glacier SMB over one coupling interval.

The default, ice_covered_thck_scale = 0, keeps the current binary
ice_covered field, so answers are unchanged by default. Fractional
values require a coupler that supports them; the current CMEPS code
aborts unless ice_covered is 0 or 1.

This is a port of commit 5fcc9d2 on ESCOMP/CISM lipscomb/smb_conservation (PR #95)
to the code on main, which predates the Glide/Glissade split. The GLAD code is the same as in that branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… runoff

In coupled runs, the land model removes the SMB from its water budget
and sends it to GLAD. If the dycore does not apply a positive SMB, the
water is lost. In a CESM run with an evolving Greenland ice sheet, about
2.25 Gt/yr of positive SMB was lost this way, removed by block_inception
outside the extended ice sheet mask. Positive SMB could also be lost in
ice-free ocean cells and in partly ice-covered calving-front cells.

Now the positive part of acab_unapplied is added to rofi, the solid ice
runoff sent to the coupler, along with calving_thck and removal_thck.
Negative values of acab_unapplied (melt in excess of the ice present)
cannot be returned as runoff and are not included.

Also, correct a comment: icebergs are part of calving_thck, not
removal_thck. Both are included in rofi.

Ice sheet answers are unchanged; rofi changes where positive SMB is not
applied.

This is a port of commit 028d39f on ESCOMP/CISM lipscomb/smb_conservation (PR #95)
to the code on main, which predates the Glide/Glissade split. The GLAD code is the same as in that branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Katetc Katetc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks GREAT Bill. I love all of the new diagnostics. I find it a little confusing because I was expecting us to have to "do something" with the negative smb that was too large for thin cells, and then I reminded myself (several times) that this (basically) no longer occurs due to the new fractional ice coverage in the mediator. I don't think we need to make any changes to address this confusion. I'm writing myself a note here for later if I get confused again. We should definitely explain all of this in the documentation.

@whlipscomb

Copy link
Copy Markdown
Contributor Author

@Katetc, that sounds good. At some point we can consider whether we want to drive the conservation error to exactly 0. I wasn't sure how to do this without adding negative runoff (which I'm loathe to do) or introducing a time-lagged communication of unapplied SMB back to CTSM (which seems like more complexity than we need right now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants