Skip to content

Add ensemble-consistent snow masking for SWC-DA#58

Open
jjokella wants to merge 2 commits intotsmp-pdaf-patchedfrom
tsmp-pdaf-patched-ens-snow-mask
Open

Add ensemble-consistent snow masking for SWC-DA#58
jjokella wants to merge 2 commits intotsmp-pdaf-patchedfrom
tsmp-pdaf-patched-ens-snow-mask

Conversation

@jjokella
Copy link
Collaborator

@jjokella jjokella commented Mar 12, 2026

Input option CLM:swc_mask_snow_ens

Related to #52

Background

When CLM:swc_mask_snow = 1, the SWC update is suppressed for columns with snow
depth ≥ 1 mm. Previously, each ensemble member applied this mask
independently based on its own snow state. This means members with and without
snow over the same grid cell receive different treatment: snow-free members
are updated, snowy members are not. The result is an inconsistent ensemble
after the analysis step.

Changes

A new optional input parameter CLM:swc_mask_snow_ens (default 0) enables
ensemble-consistent snow masking. When set to 1, an MPI_Allreduce with MPI_MAX
is performed over COMM_couple_clm - the communicator that connects
corresponding spatial PEs across ensemble members - before the column update
loop. This reduces the per-column snow flag (0/1) across all members so that a
column is masked out if any member has snow there. The update is then either
applied to all members or none, for each column.

The default (0) preserves the original per-member behaviour exactly.

Limitations

With clmswc_mask_snow_ens = 0 (default), the known inconsistency remains:
snowy members still contribute to the ensemble covariance used by PDAF but do
not receive the analysis increment.

Inputoption `CLM:swc_mask_snow_ens`

When `CLM:swc_mask_snow = 1`, the SWC update is suppressed for columns with snow
 depth ≥ 1 mm. Previously, each ensemble member applied this mask
independently based on its own snow state. This means members with and without
 snow over the same grid cell receive different treatment: snow-free members
are updated, snowy members are not. The result is an inconsistent ensemble
after the analysis step.

A new optional input parameter `CLM:swc_mask_snow_ens` (default 0) enables
ensemble-consistent snow masking. When set to 1, an `MPI_Allreduce` with MPI_MAX
 is performed over COMM_couple_clm - the communicator that connects
corresponding spatial PEs across ensemble members - before the column update
loop. This reduces the per-column snow flag (0/1) across all members so that a
 column is masked out if any member has snow there. The update is then either
applied to all members or none, for each column.

The default (0) preserves the original per-member behaviour exactly.

With `clmswc_mask_snow_ens = 0` (default), the known inconsistency remains:
snowy members still contribute to the ensemble covariance used by PDAF but do
not receive the analysis increment.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jjokella added a commit to HPSCTerrSys/TSMP2 that referenced this pull request Mar 12, 2026
@jjokella
Copy link
Collaborator Author

jjokella commented Mar 13, 2026

  • This masking of updates has to be complemented with observation masking (removing observations at snow locations).

Different ideas for masking observations

  • run OL and remove observations where snow/ice present
  • on-the-fly checking in the init_dim_obs?
    • problem: run-time / MPI communication

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.

1 participant