Skip to content

Porting SST and ice physics improvements from uob_fftw_sit23 branch - #306

Draft
sit23 wants to merge 9 commits into
ExeClim:masterfrom
sit23:uob_fftw_sit23_physics_2026
Draft

Porting SST and ice physics improvements from uob_fftw_sit23 branch#306
sit23 wants to merge 9 commits into
ExeClim:masterfrom
sit23:uob_fftw_sit23_physics_2026

Conversation

@sit23

@sit23 sit23 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

For a while I've been working on getting Isca's basic state as good as it can be. This culminated in some work on the uob_fftw_sit23 branch, and the later version with maths_2 configs. I'd like to merge this in, but it was also bound up with FFTW changes and other things that were done by people at the University of Bristol. Here I'm pull requesting just the physics changes on this branch, and I've had Claude verify that the physics changes perform as they did on the old branch. I need to do some manual testing on this, but so far it looks OK.

sit23 added 9 commits August 21, 2026 10:52
(cherry picked from commit e4628a5)

Ported onto current master with manual reconciliation: dropped the
new binary_ice_albedo switch introduced by this commit, since
master independently added the equivalent (and more general)
ice_albedo_method ('step_function'/'ramp_function') option in the
interim - the two are algebraically identical for the ramp case, so
carrying both would just be a redundant duplicate mechanism.
…ea-ice model, the north pole is much warmer than it ought to be. I think this has many knock-on effects for the jet streams, stationary wave patterns etc. to try and patch this, I have added an option whereby a different non-amip sst can be specified over areas of sea-ice. I have been testing this using the 2m temperatures taken from a jra-55 climatology. Awaiting results now.

(cherry picked from commit 8af6027)

Reconciled against master's specify_constant_sst option (added
independently since this branch forked): the constant-SST and
file-read SST paths now both feed sst_input, which the sea-ice
overlay logic reads from, rather than writing sst_new directly.
(cherry picked from commit 8a1653a)

Also fixed a duplicate `specify_sst_over_sea_ice` entry in the
mixed_layer_nml namelist declaration list that this commit
introduced upstream and which persisted to the branch tip -
dropped the duplicate rather than porting it.
(cherry picked from commit 3f695e9)
…d socrates_simcloud

The physics port from uob_fftw_sit23_new_maths2intel (previous 4
commits) decoupled land_ice_mask's ice-awareness from
update_albedo_from_ice into a new update_land_mask_from_ice flag,
defaulting to .false. Both of these existing test cases set
update_albedo_from_ice=True without knowing about the new flag, so
without this change they'd silently switch land_ice_mask from
ice-aware to land-only - affecting qflux zeroing and, for
socrates_simcloud (do_sc_sst + specify_sst_over_ocean_only), which
cells get SST-relaxed. Setting update_land_mask_from_ice=True
explicitly restores their pre-port behaviour.
(cherry picked from commit 0752c6b)

Ported the calculate_qflux.py / nc_file_io_xarray.py / cell_area.py
changes only - these are the generic, reusable pieces (Socrates
variable-name support in check_surface_flux_dims, the
ignore_ice_for_calculation option, Gaussian-grid cell-area fallback,
and reading a pre-joined file by name). Dropped this commit's hunk
to postprocessing/plevel_interpolation/scripts/run_plevel.py: it was
Stephen's own scratch run/path config for a specific dataset, and
master has independently modernised run_plevel.py since this branch
forked (see 4459f5c) - reconciling the branch's run_plevel.py
history against that belongs with the numerics/tooling port on
uob_fftw_sit23_numerics_2026, not here.

This is the script that generated soc_ga3_bucket_jra_55_ice_temps.nc,
the q-flux input file used by the Maunder Minimum experiments in
exp/socrates_fast_land_ice_cmpi5_ozone/maunder_min/ - needed to
regenerate or adapt that q-flux file (e.g. for a different ice
treatment, spinup length, or the socrates_fast_land_fft_new_ice
family of scripts more generally).
Documents that the ported sea-ice/land-SST physics compiles and runs
the real Maunder Minimum q-flux experiment
(socrates_fast_land_fft_new_ice_sbm_do_simple_false_bucket_qflux_mm.py),
and compares one month of output directly against the original
uob_fftw_sit23_new_maths2intel branch: fields tied to the ported
physics (albedo, ice_conc, flux_oceanq) match exactly, while
dynamical fields diverge with a textbook chaotic-error-growth
signature rather than a step change, consistent with two
non-bit-identical compiles of the same chaotic model rather than a
regression.
Stephen asked whether the branch-vs-branch divergence noted in the
previous validation pass was general chaos or something specific to
the old branch. Ran the same comparison methodology on a plain,
physics-untouched socrates_aquaplanet control case across several
pairings: master vs physics_2026 (bit-identical), the 2023 merge-base
vs current master (bit-identical), and the original branch vs
physics_2026 (diverges, same signature as before).

Bisected the divergence by reverting/restoring the ~35 modified
source files one at a time / in batches, narrowing it to a single
file: socrates_interface.F90, the original branch's own Socrates
radiation-coupling changes - unrelated to and untouched by this
port's mixed_layer.F90 work. Confirmed physics_2026's
socrates_interface.F90 is byte-identical to master's, so whatever
the exact remaining issue in that file is, it isn't carried into
this PR.
Reframed the socrates_interface.F90 finding: it's not a single-line
bug, it's ~2400 lines of independent divergence between the old
branch's 2019-vintage Socrates interface and master's now much more
developed version (master already reimplements the same Mars-orbital
diagnostics more completely, including a fix for an uninitialized
use_old_r_inv_squared the old branch's version had).

With that confound identified, re-ran the actual Maunder Minimum
target experiment comparing physics_2026 against a patched copy of
the old branch (everything matched to current master except
mixed_layer.F90, left at the branch's original un-ported physics).
Result: bit-identical for the full month across every field. This is
the direct confirmation that the ported physics reproduces exactly
what the original branch would have produced running on current
master - the physics port is complete.
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