Coupler
- AoFlux
model
coupler
cmeps
CMEPS atmosphere-ocean bulk flux component (stage 2 of the EqESM project): the pointwise laws of flux_atmOcn_large in cesm/flux_atmocn/flux_atmocn_Large.F90 (the Large & Pond / Large & Yeager scheme of the CESM mediator, cesm3.0-alphabranch checkout) transcribed exactly, with the expression templates of ./cmeps_templates.esm imported by reference. The traced configuration (the C_JRA_t62 DATM+MOM6 case, nuopc.runconfig of the instrumented run): add_gusts = .false., coldair_outbreak_mod = .false., aofluxes_use_shr_wv_sat = .true. (the shr_wv_sat Goff & Gratch / qsat path), minwind = 0.5 m/s (seq_flux_atmocn_minwind), flux_convergence = 0.01 and flux_max_iteration = 5 (the do-while of F90:242-290). Structure, in the order of the Fortran: (a) the 12 raw inputs zbot/ubot/vbot/thbot/qbot/rainc/rbot/tbot/pslv/us/vs/ts (the flux_atmOcn_large argument list, F90:50-67); (b) the derived inputs of F90:193-229: du = ubot - us and dv = vbot - vs (the relative-wind components), vmag (the minwind-clamped relative wind), wind0 = vmag (the resolved wind of F90:204; with add_gusts = .false. the Fortran computes wind0 = max(minwind, sqrt(du^2 + dv^2)) identically to vmag, so the alias is exact), esat_raw (Goff & Gratch at ts), esat = min(esat_raw, pslv), qsat from the RAW es (shr_wv_sat_qsat_liquid calls svp_to_qsat with the unminned es, shr_wv_sat_mod.F90:439-441), ssq = 0.98*qsat, delt, delq, alz = ln(zbot/10), al2 = ln(zref/ztref), cp = cpdair*(1 + cpvir*ssq), with the CESM constants cpdair = 1004.64 J/kg/K and cpvir = 1810/1004.64 - 1 declared once as named parameters of this component (shr_const_mod.F90:46, 48); (c) the neutral coefficients of F90:236-244 (stable0 = 0.5 + sign(0.5, delt) as a 0/1 selection, rdn0 = sqrt(cdn(vmag)), rhn0 = (1-stable0)*0.0327 + stable0*0.018, ren0 = 0.0346, ustar0/tstar0/qstar0); (d) the stability iteration of F90:242-290. The esm has no loop construct, so the iteration is represented compositionally: the 16-equation update law is authored ONCE in the one-step model AoFluxStep of ./cmeps_aoflux_step.esm (a single pass of the do-while: hol_raw (the unclamped Monin-Obukhov parameter of F90:252-253), hol = stability_parameter_clamp(hol_raw) (the |hol| <= 10 sign-preserving clamp of F90:254), the stability selection, xsq/xqq, the psi functions, the clamped wind-shift rdw of F90:272, u10n = vmag*rdw/rdn_prev, the updated neutral coefficients rdn = sqrt(cdn(u10n)) and rhn, the height-shifted rd/rh/re of F90:282-284, ustar/tstar/qstar, the per-update convergence flag conv = |(ustar - ustar_prev)/ustar| <= 0.01, and 4 frozen-state fields (ustar/tstar/qstar/rdn) pinning the first-converged state) and mounted six times by reference as top-level models step1..step5 and exit (esm-spec section 4.7; top-level mounts are required because the pinned CLI silently drops couplings in the single-top-level-model build path, see README.md), with the chained inputs coupled by variable_map (imported from the ./cmeps_aoflux_steps_coupling.esm coupling library, esm-spec sections 10.9-10.10, so the same 86 edges are reused by reference by the m9_ocn_flux.esm subassembly): ustar0/tstar0/qstar0/rdn0 seed step1, each step's state feeds the next (ustar/tstar/qstar/rdn), conv and the 4 frozen fields thread the convergence state, and the fixed pointwise fields vmag/delt/delq/alz/zbot/thbot/qbot feed every step (ren stays the constant 0.0346 of F90:277, not coupled; the CESM constants karman = 0.4, cpdair, cpvir, latvap = 2.501e6 J/kg and stebol = 5.67e-8 W/m^2/K^4 are declared once as named parameters of this component, shr_const_mod.F90:32, 46, 48, 52, 22). The 6th mount exit recomputes the exit-state fields from step5's frozen state: the exit-state fields of the first-converged update k are deterministic functions of the pre-converged state (the update k-1 outputs ustar/tstar/qstar/rdn) plus the fixed fields (Fortran do-while trace), so only these 4 states need to be threaded — exit is fed by step5.frozen_ustar_prev/frozen_tstar_prev/frozen_qstar_prev/frozen_rdn_prev (conv_prev stays at its 0 default, so the frozen selection inside exit is the identity) and the 7 fixed fields, and the parent aliases the 15 exit-state fields from its fresh unknowns (hol, stable, xsq, xqq, psimh, psixh, rd, u10n, rdn, rhn, rh, re, ustar, tstar, qstar), which coincide bit-identically with the Fortran exit state. The parent keeps the same external names as the pre-refactor unrolled model so the pinned tests are unchanged: conv_1..4 = step1..4.conv, iter = the first converged k, else 5 (nested ifelse on conv_1..4), and the 16 exit-state fields = the 15 exit.* fields (the first-converged update's values, recomputed by the exit mount from the pinned 4-state; in the no-convergence case the fresh 5th-update values) plus ren; (e) the fluxes of F90:299-311 (tau/taux/tauy/sen/lat/lwup/evap); (f) the 2-m diagnostics of F90:316-333 (hol2/xsq2/xqq2/psix2/fac_t/fac_q/tref/qref/duu10n/u10res), which consume the exit state exactly as the Fortran leaves it after the do-while.
- AoFluxStep
model
coupler
cmeps
One-step update of the CMEPS atmosphere-ocean stability iteration (stage 2 of the EqESM project): a single pass of the do-while of flux_atmOcn_large in cesm/flux_atmocn/flux_atmocn_Large.F90:242-290 (the Large & Pond / Large & Yeager scheme of the CESM mediator, cesm3.0-alphabranch checkout), transcribed exactly and mounted six times by reference in cmeps_aoflux.esm (top-level models.step1..step5, esm-spec section 4.7; the 6th mount exit recomputes the exit-state fields from step5's frozen state, see the parent's metadata) so the 16-equation update law is authored once and the unrolled iteration is composed. Inputs are the update-invariant pointwise fields vmag/delt/delq/alz/zbot/thbot/qbot (the wind magnitude, the temperature and humidity differences, the height logarithm ln(zbot/10) and the Monin-Obukhov inputs of F90:252-254) and the water coefficient ren = 0.0346 (constant across the iteration, F90:277), the previous update's state (ustar_prev/tstar_prev/qstar_prev feeding the stability parameter and the convergence test |(ustar - ustar_prev)/ustar| <= flux_convergence = 0.01 of F90:286-287, and rdn_prev, the pre-update neutral drag used by the clamped wind shift rdw of F90:272; the heat coefficient rhn is recomputed from this update's stability each pass, F90:278, so no rhn_prev is needed), the previous convergence flag conv_prev, and the 4 previous frozen-state fields (ustar/tstar/qstar/rdn). The CESM constants karman = 0.4, g = 9.80616 m/s^2 and zvir = 28.966/18.016 - 1 (shr_const_mod.F90:32, 21, 31) are parameters with defaults, bound into the stability_parameter template call and not coupled (the parent carries the same constants, the ren precedent). Outputs are the 17 update states (hol_raw, the unclamped Monin-Obukhov parameter of F90:252-253; hol = stability_parameter_clamp(hol_raw), the sign-preserving |hol| <= 10 clamp of F90:254; stable, xsq, xqq, psimh, psixh, rdw, u10n, rdn, rhn, rd, rh, re, ustar, tstar, qstar), this update's own convergence flag conv, and 4 frozen-state fields (frozen_ustar_prev/frozen_tstar_prev/frozen_qstar_prev/frozen_rdn_prev) that pin the INPUT state of the first-converged update (frozen_state_select on the update inputs ustar_prev/tstar_prev/qstar_prev/rdn_prev: once conv_prev = 1 the frozen fields stop updating, so the 5th mount's frozen outputs are the state the first-converged update was computed from — the pre-converged update's outputs, which the parent's exit mount feeds back through the update law to reproduce the Fortran exit state exactly — and the all-5-iterations case leaves the fresh 4th-update values, which reproduce the 5th update). The frozen threading is required because the iteration states do not repeat after convergence (ustar_2 differs from ustar_4 at the 1.8e-4 level on the pinned rows) while the dump pins the first-converged state; all 15 exit-state fields are functions of the pinned 4-input state plus the fixed fields and are recomputed by the parent's exit mount rather than threaded. The expression templates of ./cmeps_templates.esm are imported by reference.
- AtmGridFractions
model
coupler
cmeps
The surface fractions of the CMEPS mediator (med_fraction_set of mediator/med_fraction_mod.F90:774-954 plus the init-time fields of med_fraction_init, called from med_phases_post_ice) as transcribed from the M8 stage-1 dump (cmeps_fractions_*.csv of the C_JRA_t62_inst run 12446243 and the F2000climo_f19_inst rerun of 2026-11-17, fork cmeps 5e41b8ee/b548fa7c/17545715). The per-grid laws: on the ICE grid (F90:851-856) ifrac = Si_ifrac*Si_imask and ofrac = Si_imask - ifrac with Si_ifrac the time-evolving ice export and Si_imask the constant ice domain mask (the gx1v7 ocean mask mapped onto the f19 grid in the F2000climo case takes PARTIAL values on coastal cells, so the product law is exercised non-degenerately there); the OCN grid bundle is the mapfcopy redistribution of the ice-grid fractions (F90:866-881) - in the traced configurations the ice and ocean grids are the same mesh (tx2_3v2 in C_JRA, fv1.9x2.5 in F2000), so every same-mesh map is the identity at the same global element (verified grid-wide from the cpl restarts, 0 diffs), and the two fraction maps are modeled through the single EarthSciDiscretizations conservative_overlap_apply template imported by reference (${ESD_ROOT}/regridding/conservative_overlap.esm) with the identity weights carried as data - the same map law as the cmeps_map component, one template for every ESMF routehandle; the ATM grid bundle (F90:900-929) is the ice->atm mapped ifrac, the ice->atm mapped ofrac (gated on the ocn->atm coupling; the source is the ice-grid ofrac) and aofrac = Sa_ofrac of FBImp(compatm,compatm) (F90:928), plus the init-time lfrac (the truncated residual 1 - ofrac of F90:455-481 with the |x| < 1.0e-3 truncation - NOT dumped, so lfrac is carried as DATA from the dump column, a documented gap: the init-time ofrac is not traced) and lfrin (the lnd->atm mapped lfrin of F90:421-448, = the lnd-grid Sl_lfrin at the same gid in the traced configuration); the LND grid bundle is the pure copy lfrac = lfrin = Sl_lfrin of F90:294-309 (the land model's own mask export, pinned by the stage-1 validator only: a copy law admits no failable stage-2 pin). The models: IceGridFractions evaluates the product laws pointwise; OcnGridFractions and AtmGridFractions evaluate the identity maps on the 1x1 traced subdomain (NSRC = NTGT = 1, the single traced cell of each test; the weights-as-data treatment is the cmeps_map precedent); LndGridFractions carries the copy equations. The fail-able cross-check of the component is the partition of unity on the ATM grid, pou = lfrac + ifrac + ofrac == 1 (asserted in every atm test; it fails if the data lfrac, pinned from the dump, does not tile with the mapped fractions - the traced F2000 rows sum to 1.0 exactly). Configuration facts (verified by stage1/analysis/check_cmeps_fractions.py and asserted by stage1/analysis/extract_cmeps_fraction_test_rows.py on ALL dumped rows): the C_JRA atm bundle is identically zero (DATM run sequence: no MED->ATM connector, the atm fraction maps of F90:900-921 are gated off by the med_coupling_active checks); the C_JRA ocn traced cells are fully masked (So_omask = 1, the SICE mask is 1 there, so ofrac + ifrac = 1 on every row) and the mapped ice export Si_ifrac(step k) == ifrac(step k-1) bit-exactly (the mapfcopy redist maps PET-0-local index n of the ice grid to the same n of the ocn grid; the mapped Si_imask column holds the bundle reset 0.0 because Si_imask is not in the ice->ocn packed map list of this configuration); the F2000 atm lfrac/lfrin/aofrac/Sa_ofrac are constant across steps (init-time) with lfrin == lfrac on every traced cell and aofrac == Sa_ofrac == 0 (CAM does not export Sa_ofrac here); the F2000 ice Si_imask takes 5 distinct values 0.114..1.0 on the traced window (the non-degenerate product law). The pinned rows: the F2000 ice rows (5 tests, partial mask everywhere: ifrac = Si_ifrac*Si_imask is never a copy of an input, and the step-6/step-12 rows cover the cells that enter the traced set as the ice edge moves and the time evolution of Si_ifrac), the C_JRA ocn rows (7 tests: first/mid/last traced cells at steps 1, 2, 12, 24 plus the min/max ifrac rows; the identity-map pins fail on any wrong map law or weight), and the F2000 atm rows (4 tests: the partial-land AND partial-ice cell n = 6 at steps 1 and 6 - the only cell of the window where lfrac, ifrac and ofrac are all partial, so every pin can fail and the partition-of-unity pin cross-checks the data lfrac - plus the north-pole cell gid 13753 at step 12, whose ifrac 0.99875 the wrong 0edaae42 recorder read as 0 (the bug the recorder fix removed), and the smallest partial-ice ocean cell of step 12). The lfrin pin is dropped on the pure-ocean rows (lfrin = Sl_lfrin = 0 there: a copy of a zero input cannot fail) and the aofrac pin is dropped everywhere (aofrac = Sa_ofrac = 0 in this configuration; the equation is the law, the pin would be unfailable). All overrides and expected values are raw dump columns at rel 1e-12 (abs 0.0); the stage-1 replay is bit-exact and the engine's summation slack on the 1-term maps is zero, so the pins hold exactly.
- AtmMerge
model
coupler
cmeps
CMEPS atmosphere-import merge component (stage 2 of the EqESM project): the fraction-weighted merges of the land/ice/ocean fields onto the atm grid in med_phases_prep_atm (mediator/med_phases_prep_atm_mod.F90:156-166, the med_merge_auto of med_merge_mod.F90:405-412 with the merge specs of esmFldsExchange_cesm_mod.F90), transcribed exactly with the fraction_weighted_sum expression template of ./cmeps_templates.esm imported by reference. The traced configuration (the F2000climo_f19_inst case of the instrumented CMEPS run 12284979, stage1/dumps/cmeps/cmeps_prep_atm.csv, 432 rows = 36 traced atm cells x 12 coupling steps): the cesm coupling mode with samegrid_atmlnd = .true. and component_computes_enthalpy_flux = none; every lnd2atm export is a three-source merge weighted by the FBFrac(compatm) fractions lfrac/ifrac/ofrac (the land weight is mrg_fracname_lnd2atm_state = 'lfrac' of med_internalstate_mod.F90:289-290, the ice/ocean weights are the 'ifrac'/'ofrac' strings of the addmrg specs), and the So_t copy export of L1282-1285 is the unweighted mrg_type = 'copy'. The merge lists: Sx_avsdr L875-887, Sx_avsdf L902-914, Sx_anidr L929-941, Sx_anidf L956-968, Sx_tref L988-1002, Sx_u10 L1015-1029, Sx_qref L1046-1062 (the bulk blank-suffix branch of the water_bulk_or_tracers split; the traced run is bulk), Faxx_taux L1085-1099, Faxx_tauy L1112-1126, Faxx_lat L1139-1153, Faxx_sen L1166-1180, Faxx_evap L1197-1211, Faxx_lwup L1236-1250, Sx_t L1267-1279. The dump carries each source field mapped to the atm grid and the merged export, so each test pins one cell/step at full dump precision: the traced cells are the first dump_first_cells = 12 atm cells of PET 0 (local element order, the Antarctica row block of the f19 grid) unioned with the per-step partial-ice (0 < ifrac < 1) and partial-land (0 < lfrac < 1) cells (36 distinct cells); the pinned rows cover the fraction regimes fully-land (lfrac = 1), open-ocean (ofrac = 1), partial-ice (ifrac = 0.99875) and the mixed three-fraction cell (atm cell n = 6, all weights nonzero, every source valid), plus the same mixed cell at the last step where the 05:30 local-time albedo sources are the dark-side 1.0. Sources on zero-fraction cells carry the CMEPS spval 1e30 (e.g. Sl_* on the ocean/ice cells) or 0.0 (Si_* of the ice-free Antarctica rows) - both inert at weight 0 (0.0*1e30 = 0.0 exactly, no NaN), which the tests pin implicitly. Each merge reproduces the Fortran accumulation order exactly: dp = 0 + Sl*lfrac, dp = dp + Si*ifrac, dp = dp + So*ofrac (med_merge_mod.F90:405-412), i.e. fraction_weighted_sum applied twice: the land+ice pair weighted by lfrac/ifrac first (the inner application), then the open-ocean source weighted by ofrac added on top (the outer application with the identity ice_frac = 1.0, which multiplies exactly).
- BilinearMap
model
coupler
cmeps
The atm->ocn mapping step of the CMEPS mediator (map_atm2ocn of med_phases_post_atm_mod.F90, the sparse weight apply of med_map_field_packed, med_map_mod.F90:1187-1234) as transcribed from the M8 stage-1 dump (cmeps_map_ocn.csv / cmeps_map_atm.csv of the C_JRA_t62_inst run, fork cmeps 2673bd61). The law is dst_j = (sum_i W_ij x_i)/normOne_j over the source stencil of each destination cell, with the weights W taken AS DATA from the offline ESMF_RegridWeightGen mapping files (atm2ocn_conserve_fracarea.nc, atm2ocn_bilinear.nc - bit-identical to the online routehandle: stage1/analysis/check_cmeps_map.py replays both laws from the file weights at worst rel 0.0 over 1152 (field,step,cell) checks each) and normOne the field_normOne row sums (mapnorm='one': no source fraction factor). Both routehandles express the SAME law through the single EarthSciDiscretizations conservative_overlap_apply template imported by reference (${ESD_ROOT}/regridding/conservative_overlap.esm): ConserveMap binds the ESMF conserve weights as its A_ij data and the dumped normOne_consf as A_j; BilinearMap binds the bilinear weights and normOne_bilnr the same way. The mapnorm='lfrac' source weighting of the M9 lane's lnd->rof map is carried in the field (F_src = lfrac*x) rather than in a second template, so there is exactly one map law for every ESMF routehandle. Both models evaluate on the traced 12-cell window (the first masked cells of PET 0, gids 41583, 41584, 42123-42126, 42662-42667 - the same window as cmeps_merge.csv) with the full ESMF stencils (conserve: 3 distinct T62 source cells, <= 2 terms; bilinear: 8, exactly 4 terms), and the tests pin cmeps_map_ocn.csv cell-wise (coords over the 12 traced cells) at rel 1e-12 at the STEPS_PINNED = (1, 13, 24) steps of the 24-step window (the first, a middle and the last: the steps repeat the same map and the same stencils with smoothly drifting inputs, so three steps spanning the drift suffice): Faxa_snowl (conserve) and Sa_tbot, Sa_pbot (bilinear) - 108 assertions (the stage-1 replay is bit-exact; the engine's own summation order leaves ~1e-16 slack on these short stencils). The remaining dumped fields are configuration facts of the traced window, not law statements, and are unpinned as unfailable: Faxa_rainl/Faxa_rainc/Faxa_snowc are identically 0 on every traced row (the Gulf-of-Guinea window receives snowfall but no rain in this JRA January window), Sa_z is a constant 10 m source (the mapped constant equals itself to 2e-15), and Sa_pslv is bit-identical to Sa_pbot on every traced row (the unfailable-assertion precedent of the prep_ice round).
- ConserveMap
model
coupler
cmeps
The atm->ocn mapping step of the CMEPS mediator (map_atm2ocn of med_phases_post_atm_mod.F90, the sparse weight apply of med_map_field_packed, med_map_mod.F90:1187-1234) as transcribed from the M8 stage-1 dump (cmeps_map_ocn.csv / cmeps_map_atm.csv of the C_JRA_t62_inst run, fork cmeps 2673bd61). The law is dst_j = (sum_i W_ij x_i)/normOne_j over the source stencil of each destination cell, with the weights W taken AS DATA from the offline ESMF_RegridWeightGen mapping files (atm2ocn_conserve_fracarea.nc, atm2ocn_bilinear.nc - bit-identical to the online routehandle: stage1/analysis/check_cmeps_map.py replays both laws from the file weights at worst rel 0.0 over 1152 (field,step,cell) checks each) and normOne the field_normOne row sums (mapnorm='one': no source fraction factor). Both routehandles express the SAME law through the single EarthSciDiscretizations conservative_overlap_apply template imported by reference (${ESD_ROOT}/regridding/conservative_overlap.esm): ConserveMap binds the ESMF conserve weights as its A_ij data and the dumped normOne_consf as A_j; BilinearMap binds the bilinear weights and normOne_bilnr the same way. The mapnorm='lfrac' source weighting of the M9 lane's lnd->rof map is carried in the field (F_src = lfrac*x) rather than in a second template, so there is exactly one map law for every ESMF routehandle. Both models evaluate on the traced 12-cell window (the first masked cells of PET 0, gids 41583, 41584, 42123-42126, 42662-42667 - the same window as cmeps_merge.csv) with the full ESMF stencils (conserve: 3 distinct T62 source cells, <= 2 terms; bilinear: 8, exactly 4 terms), and the tests pin cmeps_map_ocn.csv cell-wise (coords over the 12 traced cells) at rel 1e-12 at the STEPS_PINNED = (1, 13, 24) steps of the 24-step window (the first, a middle and the last: the steps repeat the same map and the same stencils with smoothly drifting inputs, so three steps spanning the drift suffice): Faxa_snowl (conserve) and Sa_tbot, Sa_pbot (bilinear) - 108 assertions (the stage-1 replay is bit-exact; the engine's own summation order leaves ~1e-16 slack on these short stencils). The remaining dumped fields are configuration facts of the traced window, not law statements, and are unpinned as unfailable: Faxa_rainl/Faxa_rainc/Faxa_snowc are identically 0 on every traced row (the Gulf-of-Guinea window receives snowfall but no rain in this JRA January window), Sa_z is a constant 10 m source (the mapped constant equals itself to 2e-15), and Sa_pslv is bit-identical to Sa_pbot on every traced row (the unfailable-assertion precedent of the prep_ice round).
- IceGridFractions
model
coupler
cmeps
The surface fractions of the CMEPS mediator (med_fraction_set of mediator/med_fraction_mod.F90:774-954 plus the init-time fields of med_fraction_init, called from med_phases_post_ice) as transcribed from the M8 stage-1 dump (cmeps_fractions_*.csv of the C_JRA_t62_inst run 12446243 and the F2000climo_f19_inst rerun of 2026-11-17, fork cmeps 5e41b8ee/b548fa7c/17545715). The per-grid laws: on the ICE grid (F90:851-856) ifrac = Si_ifrac*Si_imask and ofrac = Si_imask - ifrac with Si_ifrac the time-evolving ice export and Si_imask the constant ice domain mask (the gx1v7 ocean mask mapped onto the f19 grid in the F2000climo case takes PARTIAL values on coastal cells, so the product law is exercised non-degenerately there); the OCN grid bundle is the mapfcopy redistribution of the ice-grid fractions (F90:866-881) - in the traced configurations the ice and ocean grids are the same mesh (tx2_3v2 in C_JRA, fv1.9x2.5 in F2000), so every same-mesh map is the identity at the same global element (verified grid-wide from the cpl restarts, 0 diffs), and the two fraction maps are modeled through the single EarthSciDiscretizations conservative_overlap_apply template imported by reference (${ESD_ROOT}/regridding/conservative_overlap.esm) with the identity weights carried as data - the same map law as the cmeps_map component, one template for every ESMF routehandle; the ATM grid bundle (F90:900-929) is the ice->atm mapped ifrac, the ice->atm mapped ofrac (gated on the ocn->atm coupling; the source is the ice-grid ofrac) and aofrac = Sa_ofrac of FBImp(compatm,compatm) (F90:928), plus the init-time lfrac (the truncated residual 1 - ofrac of F90:455-481 with the |x| < 1.0e-3 truncation - NOT dumped, so lfrac is carried as DATA from the dump column, a documented gap: the init-time ofrac is not traced) and lfrin (the lnd->atm mapped lfrin of F90:421-448, = the lnd-grid Sl_lfrin at the same gid in the traced configuration); the LND grid bundle is the pure copy lfrac = lfrin = Sl_lfrin of F90:294-309 (the land model's own mask export, pinned by the stage-1 validator only: a copy law admits no failable stage-2 pin). The models: IceGridFractions evaluates the product laws pointwise; OcnGridFractions and AtmGridFractions evaluate the identity maps on the 1x1 traced subdomain (NSRC = NTGT = 1, the single traced cell of each test; the weights-as-data treatment is the cmeps_map precedent); LndGridFractions carries the copy equations. The fail-able cross-check of the component is the partition of unity on the ATM grid, pou = lfrac + ifrac + ofrac == 1 (asserted in every atm test; it fails if the data lfrac, pinned from the dump, does not tile with the mapped fractions - the traced F2000 rows sum to 1.0 exactly). Configuration facts (verified by stage1/analysis/check_cmeps_fractions.py and asserted by stage1/analysis/extract_cmeps_fraction_test_rows.py on ALL dumped rows): the C_JRA atm bundle is identically zero (DATM run sequence: no MED->ATM connector, the atm fraction maps of F90:900-921 are gated off by the med_coupling_active checks); the C_JRA ocn traced cells are fully masked (So_omask = 1, the SICE mask is 1 there, so ofrac + ifrac = 1 on every row) and the mapped ice export Si_ifrac(step k) == ifrac(step k-1) bit-exactly (the mapfcopy redist maps PET-0-local index n of the ice grid to the same n of the ocn grid; the mapped Si_imask column holds the bundle reset 0.0 because Si_imask is not in the ice->ocn packed map list of this configuration); the F2000 atm lfrac/lfrin/aofrac/Sa_ofrac are constant across steps (init-time) with lfrin == lfrac on every traced cell and aofrac == Sa_ofrac == 0 (CAM does not export Sa_ofrac here); the F2000 ice Si_imask takes 5 distinct values 0.114..1.0 on the traced window (the non-degenerate product law). The pinned rows: the F2000 ice rows (5 tests, partial mask everywhere: ifrac = Si_ifrac*Si_imask is never a copy of an input, and the step-6/step-12 rows cover the cells that enter the traced set as the ice edge moves and the time evolution of Si_ifrac), the C_JRA ocn rows (7 tests: first/mid/last traced cells at steps 1, 2, 12, 24 plus the min/max ifrac rows; the identity-map pins fail on any wrong map law or weight), and the F2000 atm rows (4 tests: the partial-land AND partial-ice cell n = 6 at steps 1 and 6 - the only cell of the window where lfrac, ifrac and ofrac are all partial, so every pin can fail and the partition-of-unity pin cross-checks the data lfrac - plus the north-pole cell gid 13753 at step 12, whose ifrac 0.99875 the wrong 0edaae42 recorder read as 0 (the bug the recorder fix removed), and the smallest partial-ice ocean cell of step 12). The lfrin pin is dropped on the pure-ocean rows (lfrin = Sl_lfrin = 0 there: a copy of a zero input cannot fail) and the aofrac pin is dropped everywhere (aofrac = Sa_ofrac = 0 in this configuration; the equation is the law, the pin would be unfailable). All overrides and expected values are raw dump columns at rel 1e-12 (abs 0.0); the stage-1 replay is bit-exact and the engine's summation slack on the 1-term maps is zero, so the pins hold exactly.
- LndGridFractions
model
coupler
cmeps
The surface fractions of the CMEPS mediator (med_fraction_set of mediator/med_fraction_mod.F90:774-954 plus the init-time fields of med_fraction_init, called from med_phases_post_ice) as transcribed from the M8 stage-1 dump (cmeps_fractions_*.csv of the C_JRA_t62_inst run 12446243 and the F2000climo_f19_inst rerun of 2026-11-17, fork cmeps 5e41b8ee/b548fa7c/17545715). The per-grid laws: on the ICE grid (F90:851-856) ifrac = Si_ifrac*Si_imask and ofrac = Si_imask - ifrac with Si_ifrac the time-evolving ice export and Si_imask the constant ice domain mask (the gx1v7 ocean mask mapped onto the f19 grid in the F2000climo case takes PARTIAL values on coastal cells, so the product law is exercised non-degenerately there); the OCN grid bundle is the mapfcopy redistribution of the ice-grid fractions (F90:866-881) - in the traced configurations the ice and ocean grids are the same mesh (tx2_3v2 in C_JRA, fv1.9x2.5 in F2000), so every same-mesh map is the identity at the same global element (verified grid-wide from the cpl restarts, 0 diffs), and the two fraction maps are modeled through the single EarthSciDiscretizations conservative_overlap_apply template imported by reference (${ESD_ROOT}/regridding/conservative_overlap.esm) with the identity weights carried as data - the same map law as the cmeps_map component, one template for every ESMF routehandle; the ATM grid bundle (F90:900-929) is the ice->atm mapped ifrac, the ice->atm mapped ofrac (gated on the ocn->atm coupling; the source is the ice-grid ofrac) and aofrac = Sa_ofrac of FBImp(compatm,compatm) (F90:928), plus the init-time lfrac (the truncated residual 1 - ofrac of F90:455-481 with the |x| < 1.0e-3 truncation - NOT dumped, so lfrac is carried as DATA from the dump column, a documented gap: the init-time ofrac is not traced) and lfrin (the lnd->atm mapped lfrin of F90:421-448, = the lnd-grid Sl_lfrin at the same gid in the traced configuration); the LND grid bundle is the pure copy lfrac = lfrin = Sl_lfrin of F90:294-309 (the land model's own mask export, pinned by the stage-1 validator only: a copy law admits no failable stage-2 pin). The models: IceGridFractions evaluates the product laws pointwise; OcnGridFractions and AtmGridFractions evaluate the identity maps on the 1x1 traced subdomain (NSRC = NTGT = 1, the single traced cell of each test; the weights-as-data treatment is the cmeps_map precedent); LndGridFractions carries the copy equations. The fail-able cross-check of the component is the partition of unity on the ATM grid, pou = lfrac + ifrac + ofrac == 1 (asserted in every atm test; it fails if the data lfrac, pinned from the dump, does not tile with the mapped fractions - the traced F2000 rows sum to 1.0 exactly). Configuration facts (verified by stage1/analysis/check_cmeps_fractions.py and asserted by stage1/analysis/extract_cmeps_fraction_test_rows.py on ALL dumped rows): the C_JRA atm bundle is identically zero (DATM run sequence: no MED->ATM connector, the atm fraction maps of F90:900-921 are gated off by the med_coupling_active checks); the C_JRA ocn traced cells are fully masked (So_omask = 1, the SICE mask is 1 there, so ofrac + ifrac = 1 on every row) and the mapped ice export Si_ifrac(step k) == ifrac(step k-1) bit-exactly (the mapfcopy redist maps PET-0-local index n of the ice grid to the same n of the ocn grid; the mapped Si_imask column holds the bundle reset 0.0 because Si_imask is not in the ice->ocn packed map list of this configuration); the F2000 atm lfrac/lfrin/aofrac/Sa_ofrac are constant across steps (init-time) with lfrin == lfrac on every traced cell and aofrac == Sa_ofrac == 0 (CAM does not export Sa_ofrac here); the F2000 ice Si_imask takes 5 distinct values 0.114..1.0 on the traced window (the non-degenerate product law). The pinned rows: the F2000 ice rows (5 tests, partial mask everywhere: ifrac = Si_ifrac*Si_imask is never a copy of an input, and the step-6/step-12 rows cover the cells that enter the traced set as the ice edge moves and the time evolution of Si_ifrac), the C_JRA ocn rows (7 tests: first/mid/last traced cells at steps 1, 2, 12, 24 plus the min/max ifrac rows; the identity-map pins fail on any wrong map law or weight), and the F2000 atm rows (4 tests: the partial-land AND partial-ice cell n = 6 at steps 1 and 6 - the only cell of the window where lfrac, ifrac and ofrac are all partial, so every pin can fail and the partition-of-unity pin cross-checks the data lfrac - plus the north-pole cell gid 13753 at step 12, whose ifrac 0.99875 the wrong 0edaae42 recorder read as 0 (the bug the recorder fix removed), and the smallest partial-ice ocean cell of step 12). The lfrin pin is dropped on the pure-ocean rows (lfrin = Sl_lfrin = 0 there: a copy of a zero input cannot fail) and the aofrac pin is dropped everywhere (aofrac = Sa_ofrac = 0 in this configuration; the equation is the law, the pin would be unfailable). All overrides and expected values are raw dump columns at rel 1e-12 (abs 0.0); the stage-1 replay is bit-exact and the engine's summation slack on the 1-term maps is zero, so the pins hold exactly.
- OcnAlb
model
coupler
cmeps
CMEPS ocean albedo component (stage 2 of the EqESM project): the pointwise laws of med_phases_ocnalb_run in mediator/med_phases_ocnalb_mod.F90 (the CESM mediator, cesm3.0-alphabranch checkout) transcribed exactly, with the solar-geometry and albedo expression templates of ./cmeps_templates.esm imported by reference. The traced configuration (the C_JRA_t62 DATM+SICE+MOM6 case, stage1/dumps/cmeps/cmeps_ocnalb.csv, 288 rows = 12 traced ocean cells x 24 coupling steps of the instrumented run 12134714): ocean_albedo_scheme = 0 (use_briegleb = .true., the Briegleb et al. (1986) scheme), orb_iyear = 2000 fixed orbit (the med_phases_ocnalb_orbital_update values: eccen = 0.0167036603927656034, obliqr = 0.409101122579778931 rad, lambm0 = -0.0324724956615293284 rad, mvelpp = 4.93745779048815780 rad), albdif = 0.06, albdir = 0.07, no ocean_albedo_limit (min_albedo = 0, use_min_albedo = .false.), flux_albav = .false., use_nextswcday = .true. (nextsw_cday from the atm scalar) and nextsw_cday = 1.04166666666666674 day throughout (the run starts 2003-01-01 01:00:00). Structure, in the order of the Fortran: (a) the orbital geometry of shr_orb_decl (share/src/shr_orb_mod.F90:736-814, the Berger (1978) mean-longitude series): solar_declination delta and earth_sun_distance_factor eccf; (b) the pointwise solar zenith cosine of shr_orb_cosz (shr_orb_mod.F90:110-159) at the cell latitude/longitude; (c) the albedo law of F90:453-518: ocean_albedo_visible anidr (the scheme selection with the flux_albav flat-albdir branch, the use_min_albedo max-clamp and the dark-side 1.0) and ocean_albedo_nearinfrared anidf, with the avsdr = anidr / avsdf = anidf aliases of F90:510-512. The traced run pins the Briegleb day-side branch only: all 288 rows have use_briegleb = 1, flux_albav = 0, use_min_albedo = 0 and cosz > 0 (cosz range 0.03600..0.69511 at 69.5S in January, delta range -0.40296..-0.40166 rad); the Taylor scheme, the flux_albav branch, the use_min_albedo clamp and the dark-side branch are transcribed but unpinned (documented in the template descriptions). The ifrac/ofrac/ifrad/ofrad columns of the dump are context (the FBFrac(compocn) fractions at the dump point; the phase copies ifrac/ofrac into ifrad/ofrad AFTER the albedo loop, so the dumped ifrad/ofrad lag the current step by one coupling step - ifrad(k) = ifrac(k-1), verified for all 288 rows - and they are consumed by the cmeps_merge component, not by this one). The nextsw_cday >= -0.5 guard of F90:467 is always true in the traced run. Reference: stage1/EqESM-cesm-cmeps/components/cmeps/mediator/med_phases_ocnalb_mod.F90 and share/src/shr_orb_mod.F90.
- OcnGridFractions
model
coupler
cmeps
The surface fractions of the CMEPS mediator (med_fraction_set of mediator/med_fraction_mod.F90:774-954 plus the init-time fields of med_fraction_init, called from med_phases_post_ice) as transcribed from the M8 stage-1 dump (cmeps_fractions_*.csv of the C_JRA_t62_inst run 12446243 and the F2000climo_f19_inst rerun of 2026-11-17, fork cmeps 5e41b8ee/b548fa7c/17545715). The per-grid laws: on the ICE grid (F90:851-856) ifrac = Si_ifrac*Si_imask and ofrac = Si_imask - ifrac with Si_ifrac the time-evolving ice export and Si_imask the constant ice domain mask (the gx1v7 ocean mask mapped onto the f19 grid in the F2000climo case takes PARTIAL values on coastal cells, so the product law is exercised non-degenerately there); the OCN grid bundle is the mapfcopy redistribution of the ice-grid fractions (F90:866-881) - in the traced configurations the ice and ocean grids are the same mesh (tx2_3v2 in C_JRA, fv1.9x2.5 in F2000), so every same-mesh map is the identity at the same global element (verified grid-wide from the cpl restarts, 0 diffs), and the two fraction maps are modeled through the single EarthSciDiscretizations conservative_overlap_apply template imported by reference (${ESD_ROOT}/regridding/conservative_overlap.esm) with the identity weights carried as data - the same map law as the cmeps_map component, one template for every ESMF routehandle; the ATM grid bundle (F90:900-929) is the ice->atm mapped ifrac, the ice->atm mapped ofrac (gated on the ocn->atm coupling; the source is the ice-grid ofrac) and aofrac = Sa_ofrac of FBImp(compatm,compatm) (F90:928), plus the init-time lfrac (the truncated residual 1 - ofrac of F90:455-481 with the |x| < 1.0e-3 truncation - NOT dumped, so lfrac is carried as DATA from the dump column, a documented gap: the init-time ofrac is not traced) and lfrin (the lnd->atm mapped lfrin of F90:421-448, = the lnd-grid Sl_lfrin at the same gid in the traced configuration); the LND grid bundle is the pure copy lfrac = lfrin = Sl_lfrin of F90:294-309 (the land model's own mask export, pinned by the stage-1 validator only: a copy law admits no failable stage-2 pin). The models: IceGridFractions evaluates the product laws pointwise; OcnGridFractions and AtmGridFractions evaluate the identity maps on the 1x1 traced subdomain (NSRC = NTGT = 1, the single traced cell of each test; the weights-as-data treatment is the cmeps_map precedent); LndGridFractions carries the copy equations. The fail-able cross-check of the component is the partition of unity on the ATM grid, pou = lfrac + ifrac + ofrac == 1 (asserted in every atm test; it fails if the data lfrac, pinned from the dump, does not tile with the mapped fractions - the traced F2000 rows sum to 1.0 exactly). Configuration facts (verified by stage1/analysis/check_cmeps_fractions.py and asserted by stage1/analysis/extract_cmeps_fraction_test_rows.py on ALL dumped rows): the C_JRA atm bundle is identically zero (DATM run sequence: no MED->ATM connector, the atm fraction maps of F90:900-921 are gated off by the med_coupling_active checks); the C_JRA ocn traced cells are fully masked (So_omask = 1, the SICE mask is 1 there, so ofrac + ifrac = 1 on every row) and the mapped ice export Si_ifrac(step k) == ifrac(step k-1) bit-exactly (the mapfcopy redist maps PET-0-local index n of the ice grid to the same n of the ocn grid; the mapped Si_imask column holds the bundle reset 0.0 because Si_imask is not in the ice->ocn packed map list of this configuration); the F2000 atm lfrac/lfrin/aofrac/Sa_ofrac are constant across steps (init-time) with lfrin == lfrac on every traced cell and aofrac == Sa_ofrac == 0 (CAM does not export Sa_ofrac here); the F2000 ice Si_imask takes 5 distinct values 0.114..1.0 on the traced window (the non-degenerate product law). The pinned rows: the F2000 ice rows (5 tests, partial mask everywhere: ifrac = Si_ifrac*Si_imask is never a copy of an input, and the step-6/step-12 rows cover the cells that enter the traced set as the ice edge moves and the time evolution of Si_ifrac), the C_JRA ocn rows (7 tests: first/mid/last traced cells at steps 1, 2, 12, 24 plus the min/max ifrac rows; the identity-map pins fail on any wrong map law or weight), and the F2000 atm rows (4 tests: the partial-land AND partial-ice cell n = 6 at steps 1 and 6 - the only cell of the window where lfrac, ifrac and ofrac are all partial, so every pin can fail and the partition-of-unity pin cross-checks the data lfrac - plus the north-pole cell gid 13753 at step 12, whose ifrac 0.99875 the wrong 0edaae42 recorder read as 0 (the bug the recorder fix removed), and the smallest partial-ice ocean cell of step 12). The lfrin pin is dropped on the pure-ocean rows (lfrin = Sl_lfrin = 0 there: a copy of a zero input cannot fail) and the aofrac pin is dropped everywhere (aofrac = Sa_ofrac = 0 in this configuration; the equation is the law, the pin would be unfailable). All overrides and expected values are raw dump columns at rel 1e-12 (abs 0.0); the stage-1 replay is bit-exact and the engine's summation slack on the 1-term maps is zero, so the pins hold exactly.
- OcnMerge
model
coupler
cmeps
CMEPS ocean-export merge component (stage 2 of the EqESM project): the fraction-weighted merges of the atmosphere/ocean/ice/runoff fields onto the ocean grid in med_phases_prep_ocn_accum (mediator/med_phases_prep_ocn_mod.F90:161-168, the med_merge_auto of med_merge_mod.F90:405-412 with the merge specs of esmFldsExchange_cesm_mod.F90) plus the med_phases_prep_ocn_custom shortwave computation (F90:582-894), transcribed exactly with the merge expression templates of ./cmeps_templates.esm imported by reference. The traced configuration (the C_JRA_t62 DATM+SICE+MOM6 case, stage1/dumps/cmeps/cmeps_merge.csv, 288 rows = 12 traced ocean cells x 24 coupling steps of the instrumented run 12134714; all traced cells are partial-ice, ifrac 0.0683..0.6246): the ice component (SICE data ice) is present, so the cice-is-present branch of the custom computation (F90:756-837) is exercised: fswabsv = Faxa_swvdr*(1 - avsdr) + Faxa_swvdf*(1 - avsdf) and fswabsi = Faxa_swndr*(1 - anidr) + Faxa_swndf*(1 - anidf) with the ocean albedos of the ocnalb phase (FBMed_ocnalb_o So_avsdr/avsdf/anidr/anidf, the anidr/avsdr/avsdf outputs of the cmeps_ocnalb component), the scaled fractions ifrac_scaled/ofrac_scaled/ifracr_scaled/ofracr_scaled of F90:800-813 (from ifrac/ofrac and the radiation fractions ifrad/ofrad; the dumped ifrad/ofrad lag the current ifrac/ofrac by one coupling step - ifrad(k) = ifrac(k-1) - because the ocnalb phase copies the fractions after its albedo loop, so the traced swnet weights the PREVIOUS step's radiation fractions; see the cmeps_ocnalb component), Foxx_swnet = ofracr_scaled*(fswabsv + fswabsi) + ifrac_scaled*Fioi_swpen (F90:814) and the shortwave band split Foxx_swnet_vdr/vdf/idr/idf = c*Foxx_swnet with the SINGLE-precision Fortran literals c1 = c2 = 0.285 and c3 = c4 = 0.215 promoted to r8 (0.2849999964237213 / 0.2150000035762787, F90:830-834; the import_swpen_by_bands per-band branch of F90:824-827 is not exercised because SICE does not export Fioi_swpen_vdr/vdf/idr/idf). The accumulated merges (the esmFldsExchange_cesm_mod.F90 specs, all ofrac-weighted for the atm/aoflux sources and ifrac-weighted for the ice sources): Faxa_rain = rainc*ofrac + rainl*ofrac (L1940-1942), Faxa_snow = snowc*ofrac + snowl*ofrac (L1949-1951), Foxx_lwnet = Faox_lwup*ofrac + Faxa_lwdn*ofrac (L1759-1762; Faox_lwup is the negative upward flux of the aoflux phase, so the sum is the net downward longwave), Foxx_sen = Faox_sen*ofrac (L1966-1967), Foxx_taux = Fioi_taux*ifrac + Faox_taux*ofrac (L2154-2158), Foxx_tauy = Fioi_tauy*ifrac + Faox_tauy*ofrac (L2169-2173), Foxx_evap = Faox_evap*ofrac (L1992-1993), Fioi_melth = Fioi_melth*ifrac (L2204-2206), Fioi_meltw = Fioi_meltw*ifrac (L2189-2191), Fioi_salt = Fioi_salt*ifrac (L2218-2220), Foxx_rofl = Forr_rofl (L2354) and Foxx_rofi = Forr_rofi (L2394), each reproduced bit-identically by the replay of stage1/analysis/validate_cmeps_ocnalb_merge_dumps.py (0.000e+00 relative error on all 23 columns over all 288 rows). The enthalpy fields (Foxx_hlat/hsen/etc.) are not dumped (documented gap): the traced run merges only the mass/energy fields above. The Sx_*/Faxx_* atmosphere merges of prep_atm are not exercised by this case (no prep_atm phase in the run sequence; needs a CAM case). Dump input labels carry the _ice suffix for the ice-import fields (FBImp(compice,compocn) names drop it). Reference: stage1/EqESM-cesm-cmeps/components/cmeps/mediator/med_phases_prep_ocn_mod.F90, med_merge_mod.F90 and esmFldsExchange_cesm_mod.F90.