Atm
- 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).