Cmesp
- RofCap
model
environmental_transport
mosart
MOSART cap-boundary component (stage 2 of the EqESM project): the med<->rof field conversions of rof_comp_nuopc/rof_import_export.F90 (mosart1.1.13) as algebraic equations, per the stage1/boundaries.md 1.5 boundary table. Imports (med -> rof): Flrl_rofsur, Flrl_rofsub, Flrl_rofgwl, Flrl_rofi, Flrl_irrig (lnd runoff, CMEPS kg/m^2/s which for water equals mm/s), and Fgrg_rofl, Fgrg_rofi (glc runoff, active when rof_from_glc). Exports (rof -> med): Forr_rofl, Forr_rofi, Forr_rofl_glc, Forr_rofi_glc, Flrr_flood, Flrr_volr, Flrr_volrmch, Sr_tdepth, Sr_tdepth_max. Import conversion, exactly state_getimport (rof_import_export.F90:589-595): q [m3/s] = field [mm/s] * med2mod_areacor * area [m2] * 0.001 [m/mm], where med2mod_areacor is the mesh-area correction factor (F90:209-210, ~1 for the rof mesh on the model grid) and 0.001 is spelled as the parameter mm_to_m [m/mm] for dimensional honesty. Export conversion, exactly state_setexport (F90:636-643): field [mm/s] = q [m3/s] * mod2med_areacor / (area [m2] * 0.001 [m/mm]); Flrr_flood carries the sign flip flood = -ctl%flood/(area*0.001) (F90:395, the land->rof positive convention); Flrr_volr = volr/area and Flrr_volrmch = wr/area are depths [m] with no mm scaling (F90:396-397); Sr_tdepth/Sr_tdepth_max are stream depths exported only when flds_r2l_stream_channel_depths (F90:398-402, tdepth_max = max(twidth0,0)*(rdepth/rwidth)). The direct-transfer, irrigation, flood and subcycling orchestration of mosart_run lives in the assembly mosart_routing.esm (its Control model) because the qgwl threshold option and the flood threshold need the channel storage wr; this file keeps the pure unit conversions, per the boundaries.md 2.6 mapping (cap boundary row). The tests block pins the med<->rof import/export unit conversions pointwise (instantaneous tests, time_span {0,0}) from the step-1 boundary values of cell 100312 (EqESM instrumented-CESM dumps stage1/dumps/mosart/mosart_run_imports.csv, mosart_run_exports.csv, and the area/areacor columns of mosart_run_imports_wide.csv); see README.md (Testing). Reference: stage1/cesm/components/mosart/src/cpl/nuopc/rof_import_export.F90 (mosart1.1.13).