From e88169765fabf21645c9556d7fbd89f76b461740 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Thu, 28 May 2026 14:42:19 -0700 Subject: [PATCH 1/2] Adds omega-fluxes option for frazil coupling in icepack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set cpl_frazil to ‘omega-fluxes’ --- columnphysics/icepack_therm_itd.F90 | 62 ++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index 508d9ace3..5b2f826ec 100644 --- a/columnphysics/icepack_therm_itd.F90 +++ b/columnphysics/icepack_therm_itd.F90 @@ -23,7 +23,7 @@ module icepack_therm_itd use icepack_fsd, only: floe_rad_c, floe_binwidth - use icepack_parameters, only: c0, c1, c2, c3, c4, c6, c10 + use icepack_parameters, only: c0, c1, c2, c3, c4, c6, c10, c1000 use icepack_parameters, only: p001, p1, p333, p5, p666, puny, bignum use icepack_parameters, only: rhos, rhoi, Lfresh, ice_ref_salinity use icepack_parameters, only: phi_init, dsin0_frazil @@ -1238,7 +1238,10 @@ subroutine add_new_ice (dt, & wave_spectrum, & wavefreq, & d_afsd_latg, & - d_afsd_newi) + d_afsd_newi, & + frazilm, & + frazils, & + frazilh) use icepack_fsd, only: fsd_lateral_growth, fsd_add_new_ice @@ -1316,6 +1319,13 @@ subroutine add_new_ice (dt, & d_afsd_latg , & ! due to fsd lateral growth d_afsd_newi ! new ice formation + ! explicit frazil fluxes + + real (kind=dbl_kind), intent(in), optional :: & + frazilm , & ! frazil ice mass flux (kg/m2/s) + frazils , & ! frazil ice salt flux (kg/m2/s) + frazilh ! frazil ice enthalpy flux (+) (W/m2) + ! local variables integer (kind=int_kind) :: & @@ -1457,16 +1467,28 @@ subroutine add_new_ice (dt, & !----------------------------------------------------------------- if (ktherm == 2) then ! mushy - if (sss > c2 * dSin0_frazil) then - Si0new = sss - dSin0_frazil + if (cpl_frazil == 'omega-fluxes') then + vi0new = frazilm * dt / rhoi + if (vi0new > puny) then + Si0new = c1000 * frazils / frazilm + qi0new = -frazilh / frazilm * rhoi + else + Si0new = sss + qi0new = c0 + vi0new = c0 + endif else - Si0new = sss**2 / (c4*dSin0_frazil) + if (sss > c2 * dSin0_frazil) then + Si0new = sss - dSin0_frazil + else + Si0new = sss**2 / (c4*dSin0_frazil) + endif + Ti = min(liquidus_temperature_mush(Si0new/phi_init), Tliquidus_max) + qi0new = icepack_enthalpy_mush(Ti, Si0new) endif do k = 1, nilyr Sprofile(k) = Si0new enddo - Ti = min(liquidus_temperature_mush(Si0new/phi_init), Tliquidus_max) - qi0new = icepack_enthalpy_mush(Ti, Si0new) else do k = 1, nilyr Sprofile(k) = salinz(k) @@ -1479,7 +1501,7 @@ subroutine add_new_ice (dt, & !----------------------------------------------------------------- fnew = max (frzmlt, c0) ! fnew > 0 iff frzmlt > 0 - vi0new = -fnew*dt / qi0new ! note sign convention, qi < 0 + if (cpl_frazil .NE. 'omega-fluxes') vi0new = -fnew*dt / qi0new ! note sign convention, qi < 0 vi0_init = vi0new ! for bgc ! increment ice volume and energy @@ -1504,7 +1526,7 @@ subroutine add_new_ice (dt, & dfresh = c0 dfsalt = c0 - if (cpl_frazil == 'external') then + if (cpl_frazil == 'external' .OR. cpl_frazil == 'omega-fluxes') then ! do nothing here, calculations are in the coupler or elsewhere else if (update_ocn_f) then @@ -1894,7 +1916,8 @@ subroutine icepack_step_therm2(dt, hin_max, & wavefreq, & d_afsd_latg, d_afsd_newi, & d_afsd_latm, d_afsd_weld, & - dpnd_melt) + dpnd_melt, frazilm, & + frazils, frazilh) use icepack_parameters, only: icepack_init_parameters @@ -1941,6 +1964,11 @@ subroutine icepack_step_therm2(dt, hin_max, & real (kind=dbl_kind), intent(inout), optional :: & dpnd_melt ! pond 'drainage' due to ice melting (m / step) + real (kind=dbl_kind), intent(in), optional :: & + frazilm , & ! frazil ice mass flux (kg/m^2/s) + frazils , & ! frazil ice salt flux (kg/m^2/s) + frazilh ! frazil ice enthalpy flux (+) (W/m^2) + real (kind=dbl_kind), intent(in), optional :: & wlat ! lateral melt rate (m/s) @@ -2031,6 +2059,16 @@ subroutine icepack_step_therm2(dt, hin_max, & return endif endif + if (cpl_frazil == 'omega-fluxes') then + if (.not.(present(frazilm) .and. & + present(frazils) .and. & + present(frazilh))) then + + call icepack_warnings_add(subname//' error in frazil arguments, cpl_frazil=omega-fluxes') + call icepack_warnings_setabort(.true.,__FILE__,__LINE__) + return + endif + endif endif !----------------------------------------------------------------- @@ -2110,7 +2148,9 @@ subroutine icepack_step_therm2(dt, hin_max, & H2_18O_ocn, & wave_sig_ht, & wave_spectrum, wavefreq, & - d_afsd_latg, d_afsd_newi) + d_afsd_latg, d_afsd_newi, & + frazilm, frazils, & + frazilh) if (icepack_warnings_aborted(subname)) return From 30b06200adaaa3bb5fb60605d840b23163766a51 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Tue, 16 Jun 2026 09:38:47 -0700 Subject: [PATCH 2/2] Add a minimum salinity bounds for frazil --- columnphysics/icepack_therm_itd.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index 5b2f826ec..c8bdba51a 100644 --- a/columnphysics/icepack_therm_itd.F90 +++ b/columnphysics/icepack_therm_itd.F90 @@ -29,7 +29,7 @@ module icepack_therm_itd use icepack_parameters, only: phi_init, dsin0_frazil use icepack_parameters, only: Tliquidus_max use icepack_parameters, only: rhosi, conserv_check, rhosmin, snwredist - use icepack_parameters, only: kitd, ktherm + use icepack_parameters, only: kitd, ktherm, min_salin use icepack_parameters, only: z_tracers, hfrazilmin, hi_min use icepack_parameters, only: cpl_frazil, update_ocn_f, saltflux_option use icepack_parameters, only: icepack_chkoptargflag @@ -1470,7 +1470,7 @@ subroutine add_new_ice (dt, & if (cpl_frazil == 'omega-fluxes') then vi0new = frazilm * dt / rhoi if (vi0new > puny) then - Si0new = c1000 * frazils / frazilm + Si0new = max(c1000 * frazils / frazilm, min_salin) qi0new = -frazilh / frazilm * rhoi else Si0new = sss