From bac72b9d49706821efae82cfd16d1afb80233083 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Thu, 28 May 2026 14:42:19 -0700 Subject: [PATCH 1/3] 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’ Now consistent with salinity correction in icepack_therm_itd --- columnphysics/icepack_therm_itd.F90 | 63 +++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index 78292a7c..1d91e469 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,9 @@ subroutine icepack_step_therm2(dt, hin_max, & wavefreq, & d_afsd_latg, d_afsd_newi, & d_afsd_latm, d_afsd_weld, & - dpnd_melt, dSin0_frazil_cell) + dpnd_melt, frazilm, & + frazils, frazilh, & + dSin0_frazil_cell) use icepack_parameters, only: icepack_init_parameters @@ -1942,7 +1966,10 @@ subroutine icepack_step_therm2(dt, hin_max, & dpnd_melt ! pond 'drainage' due to ice melting (m / step) real (kind=dbl_kind), intent(in), optional :: & - wlat, & ! lateral melt rate (m/s) + wlat , & ! lateral melt rate (m/s) + 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) dSin0_frazil_cell ! frazil bulk salinity reduction from sss (ppt) real (kind=dbl_kind), dimension(:), intent(inout) :: & @@ -2035,6 +2062,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 dSin0_frazil_local = dSin0_frazil @@ -2117,7 +2154,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 cde282937717d07ead7d9bb5b07ed67cb944087f Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Tue, 16 Jun 2026 09:38:47 -0700 Subject: [PATCH 2/3] 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 1d91e469..6db7c993 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 From 7d53445905a000e14ed39261bd56aaad344c7fca Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Tue, 1 Sep 2026 11:56:43 -0500 Subject: [PATCH 3/3] Corrects typo from previous rebase --- columnphysics/icepack_therm_itd.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index 6db7c993..45e23f70 100644 --- a/columnphysics/icepack_therm_itd.F90 +++ b/columnphysics/icepack_therm_itd.F90 @@ -1320,7 +1320,7 @@ subroutine add_new_ice (dt, & 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) @@ -1969,7 +1969,7 @@ subroutine icepack_step_therm2(dt, hin_max, & wlat , & ! lateral melt rate (m/s) 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) + frazilh , & ! frazil ice enthalpy flux (+) (W/m^2) dSin0_frazil_cell ! frazil bulk salinity reduction from sss (ppt) real (kind=dbl_kind), dimension(:), intent(inout) :: & @@ -2066,7 +2066,7 @@ subroutine icepack_step_therm2(dt, hin_max, & 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