From 32602c05a1449422fc6459aa90f83637f7fba6a0 Mon Sep 17 00:00:00 2001 From: Kara Peterson Date: Thu, 28 May 2026 14:36:19 -0700 Subject: [PATCH 01/11] Add budgeting in mct coupler for new coupling fields. --- driver-mct/main/seq_diag_mct.F90 | 168 ++++++++++++++++++++++++------- 1 file changed, 130 insertions(+), 38 deletions(-) diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 3c3872d48e50..50ee5ac0b174 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -143,45 +143,50 @@ module seq_diag_mct integer(in),parameter :: f_hsen =10 ! heat : sensible integer(in),parameter :: f_hpolar =11 ! heat : AIS imbalance integer(in),parameter :: f_hh2ot =12 ! heat : water temperature - integer(in),parameter :: f_hgsmb =13 ! heat : Greenland ice sheet surface mass balance - integer(in),parameter :: f_wfrz =14 ! water: freezing - integer(in),parameter :: f_wmelt =15 ! water: melting - integer(in),parameter :: f_wrain =16 ! water: precip, liquid - integer(in),parameter :: f_wsnow =17 ! water: precip, frozen - integer(in),parameter :: f_wpolar =18 ! water: AIS imbalance - integer(in),parameter :: f_wgsmb =19 ! water: Greenland ice sheet surface mass balance - integer(in),parameter :: f_wevap =20 ! water: evaporation - integer(in),parameter :: f_wroff =21 ! water: runoff/flood - integer(in),parameter :: f_wioff =22 ! water: frozen runoff - integer(in),parameter :: f_wirrig =23 ! water: irrigation - integer(in),parameter :: f_wfrz_16O =24 ! water: freezing - integer(in),parameter :: f_wmelt_16O =25 ! water: melting - integer(in),parameter :: f_wrain_16O =26 ! water: precip, liquid - integer(in),parameter :: f_wsnow_16O =27 ! water: precip, frozen - integer(in),parameter :: f_wevap_16O =28 ! water: evaporation - integer(in),parameter :: f_wroff_16O =29 ! water: runoff/flood - integer(in),parameter :: f_wioff_16O =30 ! water: frozen runoff - integer(in),parameter :: f_wfrz_18O =31 ! water: freezing - integer(in),parameter :: f_wmelt_18O =32 ! water: melting - integer(in),parameter :: f_wrain_18O =33 ! water: precip, liquid - integer(in),parameter :: f_wsnow_18O =34 ! water: precip, frozen - integer(in),parameter :: f_wevap_18O =35 ! water: evaporation - integer(in),parameter :: f_wroff_18O =36 ! water: runoff/flood - integer(in),parameter :: f_wioff_18O =37 ! water: frozen runoff - integer(in),parameter :: f_wfrz_HDO =38 ! water: freezing - integer(in),parameter :: f_wmelt_HDO =39 ! water: melting - integer(in),parameter :: f_wrain_HDO =40 ! water: precip, liquid - integer(in),parameter :: f_wsnow_HDO =41 ! water: precip, frozen - integer(in),parameter :: f_wevap_HDO =42 ! water: evaporation - integer(in),parameter :: f_wroff_HDO =43 ! water: runoff/flood - integer(in),parameter :: f_wioff_HDO =44 ! water: frozen runoff + integer(in),parameter :: f_hfrazo =13 ! heat : frazil from ocean + integer(in),parameter :: f_hfrazi =14 ! heat : frazil from ice + integer(in),parameter :: f_wfrz =15 ! water: freezing (frazil ocean) + integer(in),parameter :: f_wfrzi =16 ! water: frazil ice + integer(in),parameter :: f_wmelt =17 ! water: melting + integer(in),parameter :: f_wrain =18 ! water: precip, liquid + integer(in),parameter :: f_wsnow =19 ! water: precip, frozen + integer(in),parameter :: f_wpolar =20 ! water: AIS imbalance + integer(in),parameter :: f_wgsmb =21 ! water: Greenland ice sheet surface mass balance + integer(in),parameter :: f_wevap =22 ! water: evaporation + integer(in),parameter :: f_wroff =23 ! water: runoff/flood + integer(in),parameter :: f_wioff =24 ! water: frozen runoff + integer(in),parameter :: f_wirrig =25 ! water: irrigation + integer(in),parameter :: f_wfrz_16O =26 ! water: freezing + integer(in),parameter :: f_wmelt_16O =27 ! water: melting + integer(in),parameter :: f_wrain_16O =28 ! water: precip, liquid + integer(in),parameter :: f_wsnow_16O =29 ! water: precip, frozen + integer(in),parameter :: f_wevap_16O =30 ! water: evaporation + integer(in),parameter :: f_wroff_16O =31 ! water: runoff/flood + integer(in),parameter :: f_wioff_16O =32 ! water: frozen runoff + integer(in),parameter :: f_wfrz_18O =33 ! water: freezing + integer(in),parameter :: f_wmelt_18O =34 ! water: melting + integer(in),parameter :: f_wrain_18O =35 ! water: precip, liquid + integer(in),parameter :: f_wsnow_18O =36 ! water: precip, frozen + integer(in),parameter :: f_wevap_18O =37 ! water: evaporation + integer(in),parameter :: f_wroff_18O =38 ! water: runoff/flood + integer(in),parameter :: f_wioff_18O =39 ! water: frozen runoff + integer(in),parameter :: f_wfrz_HDO =40 ! water: freezing + integer(in),parameter :: f_wmelt_HDO =41 ! water: melting + integer(in),parameter :: f_wrain_HDO =42 ! water: precip, liquid + integer(in),parameter :: f_wsnow_HDO =43 ! water: precip, frozen + integer(in),parameter :: f_wevap_HDO =44 ! water: evaporation + integer(in),parameter :: f_wroff_HDO =45 ! water: runoff/flood + integer(in),parameter :: f_wioff_HDO =46 ! water: frozen runoff + integer(in),parameter :: f_salt =47 ! salt: salinity flux from sea ice + integer(in),parameter :: f_sfrazo =48 ! salt: salinity flux frazil from ocean + integer(in),parameter :: f_sfrazi =49 ! salt: salinity flux frazil from ice integer(in),parameter :: f_size = f_wioff_HDO ! Total array size of all elements integer(in),parameter :: f_a = f_area ! 1st index for area integer(in),parameter :: f_a_end = f_area ! last index for area integer(in),parameter :: f_h = f_hfrz ! 1st index for heat !integer(in),parameter :: f_h_end = f_hh2ot ! Last index for heat - integer(in),parameter :: f_h_end = f_hgsmb ! Last index for heat + integer(in),parameter :: f_h_end = f_hfrazi ! Last index for heat integer(in),parameter :: f_w = f_wfrz ! 1st index for water integer(in),parameter :: f_w_end = f_wirrig ! Last index for water integer(in),parameter :: f_16O = f_wfrz_16O ! 1st index for 16O water isotope @@ -190,20 +195,24 @@ module seq_diag_mct integer(in),parameter :: f_16O_end = f_wioff_16O ! Last index for 16O water isotope integer(in),parameter :: f_18O_end = f_wioff_18O ! Last index for 18O water isotope integer(in),parameter :: f_HDO_end = f_wioff_HDO ! Last index for HDO water isotope + integer(in),parameter :: f_s = f_salt ! 1st index for salt + integer(in),parameter :: f_s_end = f_sfrazili ! last index for salt character(len=12),parameter :: fname(f_size) = & (/' area',' hfreeze',' hmelt',' hnetsw',' hlwdn', & ' hlwup',' hlatvap',' hlatfus',' hiroff',' hsen', & - ' hpolar',' hh2otemp',' hgsmb',' wfreeze',' wmelt',' wrain', & - ' wsnow',' wpolar',' wgsmb',' wevap',' wrunoff',' wfrzrof', & + ' hpolar',' hh2otemp',' hgsmb',' hfrazo',' hfrazi', & + ' wfreeze',' wfreezei',' wmelt',' wrain',' wsnow',& + ' wpolar',' wgsmb',' wevap',' wrunoff',' wfrzrof', & ' wirrig', & ' wfreeze_16O',' wmelt_16O',' wrain_16O',' wsnow_16O', & ' wevap_16O',' wrunoff_16O',' wfrzrof_16O', & ' wfreeze_18O',' wmelt_18O',' wrain_18O',' wsnow_18O', & ' wevap_18O',' wrunoff_18O',' wfrzrof_18O', & ' wfreeze_HDO',' wmelt_HDO',' wrain_HDO',' wsnow_HDO', & - ' wevap_HDO',' wrunoff_HDO',' wfrzrof_HDO'/) + ' wevap_HDO',' wrunoff_HDO',' wfrzrof_HDO', & + ' salt',' sfrazo',' sfrazi'/) !--- P for period --- @@ -295,6 +304,8 @@ module seq_diag_mct integer :: index_o2x_Faoo_h2otemp integer :: index_o2x_Fioo_frazil + integer :: index_o2x_Fioo_frazils + integer :: index_o2x_Fioo_frazils integer :: index_o2x_Foxo_frazil_li integer :: index_o2x_Fioo_q integer :: index_o2x_Foxo_q_li @@ -325,10 +336,14 @@ module seq_diag_mct integer :: index_x2o_Fioi_bergh integer :: index_x2o_Fioi_bergw integer :: index_x2o_Fioi_salt + integer :: index_x2o_Fioi_frazil + integer :: index_x2o_Fioi_frazils integer :: index_i2x_Fioi_melth integer :: index_i2x_Fioi_meltw integer :: index_i2x_Fioi_salt + integer :: index_i2x_Fioi_frazil + integer :: index_i2x_Fioi_frazils integer :: index_i2x_Faii_swnet integer :: index_i2x_Fioi_swpen integer :: index_i2x_Faii_lwup @@ -340,6 +355,7 @@ module seq_diag_mct integer :: index_x2i_Faxa_rain integer :: index_x2i_Faxa_snow integer :: index_x2i_Fioo_frazil + integer :: index_x2i_Fioo_frazils integer :: index_x2i_Fioo_q integer :: index_x2i_Fixx_rofi @@ -1478,6 +1494,8 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa if (present(do_o2x)) then if (first_time) then index_o2x_Fioo_frazil = mct_aVect_indexRA(o2x_o,'Fioo_frazil') + index_o2x_Fioo_frazils = mct_aVect_indexRA(o2x_o,'Fioo_frazils') + index_o2x_Fioo_frazilh = mct_aVect_indexRA(o2x_o,'Fioo_frazilh') index_o2x_Foxo_frazil_li= mct_aVect_indexRA(o2x_o,'Foxo_frazil_li',perrWith='quiet') index_o2x_Fioo_q = mct_aVect_indexRA(o2x_o,'Fioo_q') index_o2x_Foxo_q_li = mct_aVect_indexRA(o2x_o,'Foxo_q_li',perrWith='quiet') @@ -1501,6 +1519,8 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa nf = f_area; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_o nf = f_wfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazil,n)) nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) + nf = f_hfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazilh,n)) + nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Fioo_frazils,n) nf = f_hh2ot; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Faoo_h2otemp,n) if (flds_polar) then nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_c*o2x_o%rAttr(index_o2x_Foxo_frazil_li,n) @@ -1560,8 +1580,11 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa index_x2o_Fioi_meltw = mct_aVect_indexRA(x2o_o,'Fioi_meltw') index_x2o_Fioi_bergh = mct_aVect_indexRA(x2o_o,'PFioi_bergh') index_x2o_Fioi_bergw = mct_aVect_indexRA(x2o_o,'PFioi_bergw') - index_x2o_Fioi_salt = mct_aVect_indexRA(x2o_o,'Fioi_salt') index_x2o_Foxx_swnet = mct_aVect_indexRA(x2o_o,'Foxx_swnet') + index_x2o_Fioi_salt = mct_aVect_indexRA(x2o_o,'Fioi_salt') + index_x2o_Fioi_sfrazi = mct_aVect_indexRA(x2o_o,'Fioi_frazils') + index_x2o_Fioi_hfrazi = mct_aVect_indexRA(x2o_o,'Fioi_frazilh') + index_x2o_Fioi_wfrzi = mct_aVect_indexRA(x2o_o,'Fioi_frazil') index_x2o_Faxa_lwdn = mct_aVect_indexRA(x2o_o,'Faxa_lwdn') index_x2o_Faxa_rain = mct_aVect_indexRA(x2o_o,'Faxa_rain') index_x2o_Faxa_snow = mct_aVect_indexRA(x2o_o,'Faxa_snow') @@ -1624,7 +1647,10 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa nf = f_wpolar; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergw,n) nf = f_wroff ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Foxx_rofl,n) nf = f_wioff ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Foxx_rofi,n) - + nf = f_salt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_salt,n) + nf = f_wfrzi ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_frazil,n) + nf = f_hfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_frazilh,n) + nf = f_sfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_frazils,n) if ( flds_wiso_ocn )then nf = f_wmelt_16O; @@ -1747,6 +1773,9 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) index_i2x_Faii_sen = mct_aVect_indexRA(i2x_i,'Faii_sen') index_i2x_Faii_evap = mct_aVect_indexRA(i2x_i,'Faii_evap') index_i2x_Fioi_salt = mct_aVect_indexRA(i2x_i,'Fioi_salt') + index_i2x_Fioi_frazil = mct_aVect_indexRA(i2x_i,'Fioi_frazil') + index_i2x_Fioi_frazils= mct_aVect_indexRA(i2x_i,'Fioi_frazils') + index_i2x_Fioi_frazilh= mct_aVect_indexRA(i2x_i,'Fioi_frazilh') index_i2x_Fioi_meltw_16O = mct_aVect_indexRA(i2x_i,'Fioi_meltw_16O',perrWith='quiet') if ( index_i2x_Fioi_meltw_16O /= 0 ) flds_wiso_ice = .true. @@ -1777,6 +1806,10 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) nf = f_hsen ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_sen,n) nf = f_wmelt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_meltw,n) nf = f_wevap ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_evap,n) + nf = f_salt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_salt,n) + nf = f_wfrzi ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_frazil,n) + nf = f_sfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_frazils,n) + nf = f_hfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_frazilh,n) if ( flds_wiso_ice )then nf = f_wmelt_16O; @@ -1808,6 +1841,8 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) index_x2i_Faxa_rain = mct_aVect_indexRA(x2i_i,'Faxa_rain') index_x2i_Faxa_snow = mct_aVect_indexRA(x2i_i,'Faxa_snow') index_x2i_Fioo_frazil = mct_aVect_indexRA(x2i_i,'Fioo_frazil') + index_x2i_Fioo_frazils= mct_aVect_indexRA(x2i_i,'Fioo_frazils') + index_x2i_Fioo_frazilh= mct_aVect_indexRA(x2i_i,'Fioo_frazilh') index_x2i_Fioo_q = mct_aVect_indexRA(x2i_i,'Fioo_q') index_x2i_Fixx_rofi = mct_aVect_indexRA(x2i_i,'Fixx_rofi') @@ -1840,6 +1875,10 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) nf = f_wfrz ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + & (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazil,n)) + nf = f_sfrazo ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + & + (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazils,n)) + nf = f_hfrazo ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - & + (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazilh,n)) nf = f_hfrz ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - & (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_q,n)) @@ -2081,6 +2120,21 @@ SUBROUTINE seq_diag_print_mct(EClock, stop_alarm, do_bgc_budg, & sum(dataGpr(iso0(is):isof(is),ico,ip)) end do end if + + write(logunit,*) ' ' + write(logunit,FAH) subname,trim(str)//' SALT BUDGET ((kg/s)/m^2*1e8): period = ',trim(pname(ip)),': date = ',cdate,sec + write(logunit,FA0) cname(ica),cname(icl),cname(icn),cname(ics),cname(ico),' *SUM* ' + do nf = f_s, f_s_end + write(logunit,FA1) fname(nf),dataGpr(nf,ica,ip),dataGpr(nf,icl,ip), & + dataGpr(nf,icn,ip),dataGpr(nf,ics,ip),dataGpr(nf,ico,ip), & + dataGpr(nf,ica,ip)+dataGpr(nf,icl,ip)+ & + dataGpr(nf,icn,ip)+dataGpr(nf,ics,ip)+dataGpr(nf,ico,ip) + enddo + write(logunit,FA1) ' *SUM*' ,sum(dataGpr(f_s:f_s_end,ica,ip)),sum(dataGpr(f_s:f_s_end,icl,ip)), & + sum(dataGpr(f_s:f_s_end,icn,ip)),sum(dataGpr(f_s:f_s_end,ics,ip)),sum(dataGpr(f_s:f_s_end,ico,ip)), & + sum(dataGpr(f_s:f_s_end,ica,ip))+sum(dataGpr(f_s:f_s_end,icl,ip))+ & + sum(dataGpr(f_s:f_s_end,icn,ip))+sum(dataGpr(f_s:f_s_end,ics,ip))+sum(dataGpr(f_s:f_s_end,ico,ip)) + write(logunit,*) ' ' enddo endif ! plev @@ -2187,6 +2241,22 @@ SUBROUTINE seq_diag_print_mct(EClock, stop_alarm, do_bgc_budg, & -sum(dataGpr(iso0(is):isof(is),icas,ip)) end do end if + + write(logunit,*) ' ' + write(logunit,FAH) subname,trim(str)//' SALT BUDGET (kg/m2s*1e8): period = ',trim(pname(ip)),': date = ',cdate,sec + write(logunit,FA0) cname(icar),cname(icxs),cname(icxr),cname(icas),' *SUM* ' + do nf = f_s, f_s_end + write(logunit,FA1) fname(nf),-dataGpr(nf,icar,ip),dataGpr(nf,icxs,ip), & + dataGpr(nf,icxr,ip),-dataGpr(nf,icas,ip), & + -dataGpr(nf,icar,ip)+dataGpr(nf,icxs,ip)+ & + dataGpr(nf,icxr,ip)-dataGpr(nf,icas,ip) + enddo + write(logunit,FA1) ' *SUM*' ,sum(dataGpr(f_s:f_s_end,ica,ip)),sum(dataGpr(f_s:f_s_end,icl,ip)), & + sum(dataGpr(f_s:f_s_end,icn,ip)),sum(dataGpr(f_s:f_s_end,ics,ip)),sum(dataGpr(f_s:f_s_end,ico,ip)), & + sum(dataGpr(f_s:f_s_end,ica,ip))+sum(dataGpr(f_s:f_s_end,icl,ip))+ & + sum(dataGpr(f_s:f_s_end,icn,ip))+sum(dataGpr(f_s:f_s_end,ics,ip))+sum(dataGpr(f_s:f_s_end,ico,ip)) + write(logunit,*) ' ' + enddo endif ! plev @@ -2335,6 +2405,28 @@ SUBROUTINE seq_diag_print_mct(EClock, stop_alarm, do_bgc_budg, & end do end if + write(logunit,*) ' ' + write(logunit,FAH) subname,'NET SALT BUDGET (kg/m2s*1e8): period = ',trim(pname(ip)),': date = ',cdate,sec + write(logunit,FA0r) ' atm',' lnd',' rof',' ocn',' ice nh',' ice sh',' glc',' *SUM* ' + do nf = f_s, f_s_end + write(logunit,FA1r) fname(nf),dataGpr(nf,c_atm_ar,ip)+dataGpr(nf,c_atm_as,ip), & + dataGpr(nf,c_lnd_lr,ip)+dataGpr(nf,c_lnd_ls,ip), & + dataGpr(nf,c_rof_rr,ip)+dataGpr(nf,c_rof_rs,ip), & + dataGpr(nf,c_ocn_or,ip)+dataGpr(nf,c_ocn_os,ip), & + dataGpr(nf,c_inh_ir,ip)+dataGpr(nf,c_inh_is,ip), & + dataGpr(nf,c_ish_ir,ip)+dataGpr(nf,c_ish_is,ip), & + dataGpr(nf,c_glc_gr,ip)+dataGpr(nf,c_glc_gs,ip), & + dataGpr(nf,c_atm_ar,ip)+dataGpr(nf,c_atm_as,ip)+ & + dataGpr(nf,c_lnd_lr,ip)+dataGpr(nf,c_lnd_ls,ip)+ & + dataGpr(nf,c_rof_rr,ip)+dataGpr(nf,c_rof_rs,ip)+ & + dataGpr(nf,c_ocn_or,ip)+dataGpr(nf,c_ocn_os,ip)+ & + dataGpr(nf,c_inh_ir,ip)+dataGpr(nf,c_inh_is,ip)+ & + dataGpr(nf,c_ish_ir,ip)+dataGpr(nf,c_ish_is,ip)+ & + dataGpr(nf,c_glc_gr,ip)+dataGpr(nf,c_glc_gs,ip) + enddo + write(logunit,*) ' ' + + endif ! ---- doprint ---- doprint ---- doprint ---- From 05142f528fee4f1d13af8750a592d470386f489e Mon Sep 17 00:00:00 2001 From: Kara Peterson Date: Fri, 29 May 2026 10:23:25 -0700 Subject: [PATCH 02/11] Fix bugs leading to build errors. --- driver-mct/main/seq_diag_mct.F90 | 94 +++++++++++++++++--------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 50ee5ac0b174..142d4527bbf8 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -143,45 +143,46 @@ module seq_diag_mct integer(in),parameter :: f_hsen =10 ! heat : sensible integer(in),parameter :: f_hpolar =11 ! heat : AIS imbalance integer(in),parameter :: f_hh2ot =12 ! heat : water temperature - integer(in),parameter :: f_hfrazo =13 ! heat : frazil from ocean - integer(in),parameter :: f_hfrazi =14 ! heat : frazil from ice - integer(in),parameter :: f_wfrz =15 ! water: freezing (frazil ocean) - integer(in),parameter :: f_wfrzi =16 ! water: frazil ice - integer(in),parameter :: f_wmelt =17 ! water: melting - integer(in),parameter :: f_wrain =18 ! water: precip, liquid - integer(in),parameter :: f_wsnow =19 ! water: precip, frozen - integer(in),parameter :: f_wpolar =20 ! water: AIS imbalance - integer(in),parameter :: f_wgsmb =21 ! water: Greenland ice sheet surface mass balance - integer(in),parameter :: f_wevap =22 ! water: evaporation - integer(in),parameter :: f_wroff =23 ! water: runoff/flood - integer(in),parameter :: f_wioff =24 ! water: frozen runoff - integer(in),parameter :: f_wirrig =25 ! water: irrigation - integer(in),parameter :: f_wfrz_16O =26 ! water: freezing - integer(in),parameter :: f_wmelt_16O =27 ! water: melting - integer(in),parameter :: f_wrain_16O =28 ! water: precip, liquid - integer(in),parameter :: f_wsnow_16O =29 ! water: precip, frozen - integer(in),parameter :: f_wevap_16O =30 ! water: evaporation - integer(in),parameter :: f_wroff_16O =31 ! water: runoff/flood - integer(in),parameter :: f_wioff_16O =32 ! water: frozen runoff - integer(in),parameter :: f_wfrz_18O =33 ! water: freezing - integer(in),parameter :: f_wmelt_18O =34 ! water: melting - integer(in),parameter :: f_wrain_18O =35 ! water: precip, liquid - integer(in),parameter :: f_wsnow_18O =36 ! water: precip, frozen - integer(in),parameter :: f_wevap_18O =37 ! water: evaporation - integer(in),parameter :: f_wroff_18O =38 ! water: runoff/flood - integer(in),parameter :: f_wioff_18O =39 ! water: frozen runoff - integer(in),parameter :: f_wfrz_HDO =40 ! water: freezing - integer(in),parameter :: f_wmelt_HDO =41 ! water: melting - integer(in),parameter :: f_wrain_HDO =42 ! water: precip, liquid - integer(in),parameter :: f_wsnow_HDO =43 ! water: precip, frozen - integer(in),parameter :: f_wevap_HDO =44 ! water: evaporation - integer(in),parameter :: f_wroff_HDO =45 ! water: runoff/flood - integer(in),parameter :: f_wioff_HDO =46 ! water: frozen runoff - integer(in),parameter :: f_salt =47 ! salt: salinity flux from sea ice - integer(in),parameter :: f_sfrazo =48 ! salt: salinity flux frazil from ocean - integer(in),parameter :: f_sfrazi =49 ! salt: salinity flux frazil from ice - - integer(in),parameter :: f_size = f_wioff_HDO ! Total array size of all elements + integer(in),parameter :: f_hgsmb =13 ! heat : Greenland ice sheet surface mass balance + integer(in),parameter :: f_hfrazo =14 ! heat : frazil from ocean + integer(in),parameter :: f_hfrazi =15 ! heat : frazil from ice + integer(in),parameter :: f_wfrz =16 ! water: freezing (frazil ocean) + integer(in),parameter :: f_wfrzi =17 ! water: frazil ice + integer(in),parameter :: f_wmelt =18 ! water: melting + integer(in),parameter :: f_wrain =19 ! water: precip, liquid + integer(in),parameter :: f_wsnow =20 ! water: precip, frozen + integer(in),parameter :: f_wpolar =21 ! water: AIS imbalance + integer(in),parameter :: f_wgsmb =22 ! water: Greenland ice sheet surface mass balance + integer(in),parameter :: f_wevap =23 ! water: evaporation + integer(in),parameter :: f_wroff =24 ! water: runoff/flood + integer(in),parameter :: f_wioff =25 ! water: frozen runoff + integer(in),parameter :: f_wirrig =26 ! water: irrigation + integer(in),parameter :: f_wfrz_16O =27 ! water: freezing + integer(in),parameter :: f_wmelt_16O =28 ! water: melting + integer(in),parameter :: f_wrain_16O =29 ! water: precip, liquid + integer(in),parameter :: f_wsnow_16O =30 ! water: precip, frozen + integer(in),parameter :: f_wevap_16O =31 ! water: evaporation + integer(in),parameter :: f_wroff_16O =32 ! water: runoff/flood + integer(in),parameter :: f_wioff_16O =33 ! water: frozen runoff + integer(in),parameter :: f_wfrz_18O =34 ! water: freezing + integer(in),parameter :: f_wmelt_18O =35 ! water: melting + integer(in),parameter :: f_wrain_18O =36 ! water: precip, liquid + integer(in),parameter :: f_wsnow_18O =37 ! water: precip, frozen + integer(in),parameter :: f_wevap_18O =38 ! water: evaporation + integer(in),parameter :: f_wroff_18O =39 ! water: runoff/flood + integer(in),parameter :: f_wioff_18O =40 ! water: frozen runoff + integer(in),parameter :: f_wfrz_HDO =41 ! water: freezing + integer(in),parameter :: f_wmelt_HDO =42 ! water: melting + integer(in),parameter :: f_wrain_HDO =43 ! water: precip, liquid + integer(in),parameter :: f_wsnow_HDO =44 ! water: precip, frozen + integer(in),parameter :: f_wevap_HDO =45 ! water: evaporation + integer(in),parameter :: f_wroff_HDO =46 ! water: runoff/flood + integer(in),parameter :: f_wioff_HDO =47 ! water: frozen runoff + integer(in),parameter :: f_salt =48 ! salt: salinity flux from sea ice + integer(in),parameter :: f_sfrazo =49 ! salt: salinity flux frazil from ocean + integer(in),parameter :: f_sfrazi =50 ! salt: salinity flux frazil from ice + + integer(in),parameter :: f_size = f_sfrazi ! Total array size of all elements integer(in),parameter :: f_a = f_area ! 1st index for area integer(in),parameter :: f_a_end = f_area ! last index for area integer(in),parameter :: f_h = f_hfrz ! 1st index for heat @@ -196,14 +197,14 @@ module seq_diag_mct integer(in),parameter :: f_18O_end = f_wioff_18O ! Last index for 18O water isotope integer(in),parameter :: f_HDO_end = f_wioff_HDO ! Last index for HDO water isotope integer(in),parameter :: f_s = f_salt ! 1st index for salt - integer(in),parameter :: f_s_end = f_sfrazili ! last index for salt + integer(in),parameter :: f_s_end = f_sfrazi ! last index for salt character(len=12),parameter :: fname(f_size) = & (/' area',' hfreeze',' hmelt',' hnetsw',' hlwdn', & ' hlwup',' hlatvap',' hlatfus',' hiroff',' hsen', & ' hpolar',' hh2otemp',' hgsmb',' hfrazo',' hfrazi', & - ' wfreeze',' wfreezei',' wmelt',' wrain',' wsnow',& + ' wfreeze',' wfreezei',' wmelt',' wrain',' wsnow', & ' wpolar',' wgsmb',' wevap',' wrunoff',' wfrzrof', & ' wirrig', & ' wfreeze_16O',' wmelt_16O',' wrain_16O',' wsnow_16O', & @@ -305,7 +306,7 @@ module seq_diag_mct integer :: index_o2x_Faoo_h2otemp integer :: index_o2x_Fioo_frazil integer :: index_o2x_Fioo_frazils - integer :: index_o2x_Fioo_frazils + integer :: index_o2x_Fioo_frazilh integer :: index_o2x_Foxo_frazil_li integer :: index_o2x_Fioo_q integer :: index_o2x_Foxo_q_li @@ -338,12 +339,14 @@ module seq_diag_mct integer :: index_x2o_Fioi_salt integer :: index_x2o_Fioi_frazil integer :: index_x2o_Fioi_frazils + integer :: index_x2o_Fioi_frazilh integer :: index_i2x_Fioi_melth integer :: index_i2x_Fioi_meltw integer :: index_i2x_Fioi_salt integer :: index_i2x_Fioi_frazil integer :: index_i2x_Fioi_frazils + integer :: index_i2x_Fioi_frazilh integer :: index_i2x_Faii_swnet integer :: index_i2x_Fioi_swpen integer :: index_i2x_Faii_lwup @@ -356,6 +359,7 @@ module seq_diag_mct integer :: index_x2i_Faxa_snow integer :: index_x2i_Fioo_frazil integer :: index_x2i_Fioo_frazils + integer :: index_x2i_Fioo_frazilh integer :: index_x2i_Fioo_q integer :: index_x2i_Fixx_rofi @@ -1582,9 +1586,9 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa index_x2o_Fioi_bergw = mct_aVect_indexRA(x2o_o,'PFioi_bergw') index_x2o_Foxx_swnet = mct_aVect_indexRA(x2o_o,'Foxx_swnet') index_x2o_Fioi_salt = mct_aVect_indexRA(x2o_o,'Fioi_salt') - index_x2o_Fioi_sfrazi = mct_aVect_indexRA(x2o_o,'Fioi_frazils') - index_x2o_Fioi_hfrazi = mct_aVect_indexRA(x2o_o,'Fioi_frazilh') - index_x2o_Fioi_wfrzi = mct_aVect_indexRA(x2o_o,'Fioi_frazil') + index_x2o_Fioi_frazils = mct_aVect_indexRA(x2o_o,'Fioi_frazils') + index_x2o_Fioi_frazilh = mct_aVect_indexRA(x2o_o,'Fioi_frazilh') + index_x2o_Fioi_frazil = mct_aVect_indexRA(x2o_o,'Fioi_frazil') index_x2o_Faxa_lwdn = mct_aVect_indexRA(x2o_o,'Faxa_lwdn') index_x2o_Faxa_rain = mct_aVect_indexRA(x2o_o,'Faxa_rain') index_x2o_Faxa_snow = mct_aVect_indexRA(x2o_o,'Faxa_snow') From 6ae78d22c81c8551a446197582def6342341fa13 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 29 May 2026 09:38:31 -0700 Subject: [PATCH 03/11] Adds omega-fluxes option for frazil coupling in sea ice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates Icepack submodule to frazil coupling branch Adds ocean-ice coupling fields: frazil salt flux (Fioo_frazils) frazil enthalpy flux (Fioo_frazilh) defined consistent with freezingMeltPotential To use, set config_frazil_coupling_type to ‘omega-fluxes’ Backwards compatible with mpas-ocean for config_frazil_coupling_type = ‘external’ Stealth --- components/mpas-ocean/driver/ocn_comp_mct.F | 5 ++- .../namelist_definition_mpassi.xml | 2 +- components/mpas-seaice/cime_config/buildnml | 6 +++ components/mpas-seaice/driver/ice_comp_mct.F | 44 ++++++++++++++++--- .../mpas-seaice/driver/mpassi_cpl_indices.F | 4 +- components/mpas-seaice/src/Registry.xml | 23 +++++++++- components/mpas-seaice/src/icepack | 2 +- .../src/shared/mpas_seaice_icepack.F | 11 ++++- driver-mct/shr/seq_flds_mod.F90 | 34 +++++++------- 9 files changed, 99 insertions(+), 32 deletions(-) diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F index b95947c2efb5..29abbb836e9b 100644 --- a/components/mpas-ocean/driver/ocn_comp_mct.F +++ b/components/mpas-ocean/driver/ocn_comp_mct.F @@ -3405,8 +3405,9 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ o2x_o(index_o2x_Fioo_q, n) = seaIceEnergy(i) / ocn_cpl_dt o2x_o(index_o2x_Fioo_frazil, n) = accumulatedFrazilIceMass(i) / ocn_cpl_dt - o2x_o(index_o2x_Fioo_frazils, n) = 4.0_RKIND - o2x_o(index_o2x_Fioo_frazilh, n) = 0.0_RKIND + o2x_o(index_o2x_Fioo_frazils, n) = accumulatedFrazilIceMass(i)* & + config_frazil_sea_ice_reference_salinity / ocn_cpl_dt + o2x_o(index_o2x_Fioo_frazilh, n) = max(seaIceEnergy(i) / ocn_cpl_dt, 0.0_RKIND) else diff --git a/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml b/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml index 0d8964e034f0..54a5153701f8 100644 --- a/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml +++ b/components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml @@ -533,7 +533,7 @@ Default: Defined in namelist_defaults.xml category="forcing" group="forcing"> Type of frazil ice coupling. -Valid values: 'external', 'internal', 'fresh_ice_correction' +Valid values: 'external', 'internal', 'fresh_ice_correction', 'omega-fluxes' Default: Defined in namelist_defaults.xml diff --git a/components/mpas-seaice/cime_config/buildnml b/components/mpas-seaice/cime_config/buildnml index 4386f95711ad..d749b1424318 100755 --- a/components/mpas-seaice/cime_config/buildnml +++ b/components/mpas-seaice/cime_config/buildnml @@ -852,6 +852,9 @@ def buildnml(case, caseroot, compname): lines.append(' ') lines.append(' ') lines.append(' ') + lines.append(' ') + lines.append(' ') + lines.append(' ') if ("WW3" in compset or "DWAV%FSD" in compset or "DWAV%ZEROS" in compset): lines.append(' ') lines.append(' ') @@ -913,6 +916,9 @@ def buildnml(case, caseroot, compname): lines.append(' ') lines.append(' ') lines.append(' ') + lines.append(' ') + lines.append(' ') + lines.append(' ') lines.append(' ') lines.append(' ') lines.append(' ') diff --git a/components/mpas-seaice/driver/ice_comp_mct.F b/components/mpas-seaice/driver/ice_comp_mct.F index ce8a7f745d41..163c029e99de 100644 --- a/components/mpas-seaice/driver/ice_comp_mct.F +++ b/components/mpas-seaice/driver/ice_comp_mct.F @@ -2050,6 +2050,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ ! o swnet -- sw: net ! o q -- ocn frazil heat flux(+) / melt potential(-) ! o frazil -- ocn frazil mass flux +! o frazils -- ocn frazil salt flux +! o frazilh -- ocn frazil enthalpy flux (+) ! o bcphidry -- Black Carbon hydrophilic dry deposition flux ! o bcphodry -- Black Carbon hydrophobic dry deposition flux ! o bcphiwet -- Black Carbon hydrophilic wet deposition flux @@ -2125,8 +2127,6 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ i,n,iFreq real (kind=RKIND) :: & - frazilMassFlux, & - frazilSaltMassFlux, & frazilMassFluxRev type (block_type), pointer :: block_ptr @@ -2155,7 +2155,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ character(len=strKIND), pointer :: & config_column_physics_type, & config_thermodynamics_type, & - config_ocean_surface_type + config_ocean_surface_type, & + config_frazil_coupling_type type (field1DReal), pointer :: & seaSurfaceTemperatureField, & @@ -2163,6 +2164,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ seaFreezingTemperatureField, & freezingMeltingPotentialField, & frazilMassAdjustField, & + frazilMassFluxField, & + frazilSaltFluxField, & + frazilEnthalpyFluxField, & uOceanVelocityField, & vOceanVelocityField, & seaSurfaceTiltUField, & @@ -2209,6 +2213,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ seaSurfaceSalinity, & seaFreezingTemperature, & freezingMeltingPotential, & + frazilMassFlux, & + frazilSaltFlux, & + frazilEnthalpyFlux, & frazilMassAdjust, & uOceanVelocity, & vOceanVelocity, & @@ -2281,6 +2288,7 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ call mpas_pool_get_config(configs, "config_couple_biogeochemistry_fields", config_couple_biogeochemistry_fields) call mpas_pool_get_config(configs, "config_use_zaerosols", config_use_zaerosols) call mpas_pool_get_config(configs, "config_use_column_waves", config_use_column_waves) + call mpas_pool_get_config(configs, "config_frazil_coupling_type", config_frazil_coupling_type) call mpas_pool_get_subpool(block_ptr % structs, 'mesh', meshPool) call mpas_pool_get_subpool(block_ptr % structs, 'ocean_coupling', oceanCoupling) @@ -2293,6 +2301,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ call mpas_pool_get_array(oceanCoupling, 'seaSurfaceSalinity', seaSurfaceSalinity) call mpas_pool_get_array(oceanCoupling, 'seaFreezingTemperature', seaFreezingTemperature) call mpas_pool_get_array(oceanCoupling, 'freezingMeltingPotential', freezingMeltingPotential) + call mpas_pool_get_array(oceanCoupling, 'frazilMassFlux', frazilMassFlux) + call mpas_pool_get_array(oceanCoupling, 'frazilSaltFlux', frazilSaltFlux) + call mpas_pool_get_array(oceanCoupling, 'frazilEnthalpyFlux', frazilEnthalpyFlux) call mpas_pool_get_array(oceanCoupling, 'frazilMassAdjust', frazilMassAdjust) call mpas_pool_get_array(oceanCoupling, 'uOceanVelocity', uOceanVelocity) call mpas_pool_get_array(oceanCoupling, 'vOceanVelocity', vOceanVelocity) @@ -2384,8 +2395,12 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ freezingMeltingPotential(i) = x2i_i(index_x2i_Fioo_q, n) - frazilMassFlux = x2i_i(index_x2i_Fioo_frazil, n) - !frazilSaltMassFlux = x2i_i(index_x2i_Fioo_frazils, n) + frazilMassFlux(i) = x2i_i(index_x2i_Fioo_frazil, n) + + if (trim(config_frazil_coupling_type) == "omega-fluxes") then + frazilSaltFlux(i) = x2i_i(index_x2i_Fioo_frazils, n) + frazilEnthalpyFlux(i) = x2i_i(index_x2i_Fioo_frazilh, n) + frazilMassAdjust(i) = 0.0_RKIND ! Now determine the sea ice mass associated with the frazil heat flux given when ! freezingMeltingPotential(i) is positive. This produces a revised mass flux, given @@ -2394,14 +2409,23 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ ! coupling step as a freshwater and salt flux. This step is required to balance mass ! and heat with the ocean. - call frazil_mass(freezingMeltingPotential(i), frazilMassFluxRev, seaSurfaceSalinity(i)) + else + call frazil_mass(freezingMeltingPotential(i), frazilMassFluxRev, seaSurfaceSalinity(i)) - frazilMassAdjust(i) = frazilMassFlux-frazilMassFluxRev + frazilMassAdjust(i) = frazilMassFlux(i)-frazilMassFluxRev + frazilSaltFlux(i) = 0.0_RKIND + frazilEnthalpyFlux(i) = 0.0_RKIND + + endif else ! non-free surface (SOM) freezingMeltingPotential(i) = x2i_i(index_x2i_Fioo_q, n) + frazilSaltFlux(i) = 0.0_RKIND + frazilEnthalpyFlux(i) = 0.0_RKIND + frazilMassAdjust(i) = 0.0_RKIND + endif airLevelHeight(i) = x2i_i(index_x2i_Sa_z, n) @@ -2566,6 +2590,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ call mpas_pool_get_field(oceanCoupling, 'seaFreezingTemperature', seaFreezingTemperatureField) call mpas_pool_get_field(oceanCoupling, 'freezingMeltingPotential', freezingMeltingPotentialField) call mpas_pool_get_field(oceanCoupling, 'frazilMassAdjust', frazilMassAdjustField) + call mpas_pool_get_field(oceanCoupling, 'frazilMassFlux', frazilMassFluxField) + call mpas_pool_get_field(oceanCoupling, 'frazilSaltFlux', frazilSaltFluxField) + call mpas_pool_get_field(oceanCoupling, 'frazilEnthalpyFlux', frazilEnthalpyFluxField) call mpas_pool_get_field(oceanCoupling, 'uOceanVelocity', uOceanVelocityField) call mpas_pool_get_field(oceanCoupling, 'vOceanVelocity', vOceanVelocityField) call mpas_pool_get_field(oceanCoupling, 'seaSurfaceTiltU', seaSurfaceTiltUField) @@ -2629,6 +2656,9 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ call mpas_dmpar_exch_halo_field(seaFreezingTemperatureField) call mpas_dmpar_exch_halo_field(freezingMeltingPotentialField) call mpas_dmpar_exch_halo_field(frazilMassAdjustField) + call mpas_dmpar_exch_halo_field(frazilMassFluxField) + call mpas_dmpar_exch_halo_field(frazilSaltFluxField) + call mpas_dmpar_exch_halo_field(frazilEnthalpyFluxField) call mpas_dmpar_exch_halo_field(uOceanVelocityField) call mpas_dmpar_exch_halo_field(vOceanVelocityField) call mpas_dmpar_exch_halo_field(seaSurfaceTiltUField) diff --git a/components/mpas-seaice/driver/mpassi_cpl_indices.F b/components/mpas-seaice/driver/mpassi_cpl_indices.F index cc57b0bf427d..c38387f31883 100644 --- a/components/mpas-seaice/driver/mpassi_cpl_indices.F +++ b/components/mpas-seaice/driver/mpassi_cpl_indices.F @@ -90,8 +90,8 @@ module mpassi_cpl_indices integer :: index_x2i_Faxa_swvdf ! sw: vis diffuse downward integer :: index_x2i_Faxa_swnet ! sw: net integer :: index_x2i_Fioo_q ! ocn freezing melting potential - integer :: index_x2i_Fioo_frazil ! ocn frazil ice formation - integer :: index_x2i_Fioo_frazils ! ocn frazil salt formation + integer :: index_x2i_Fioo_frazil ! ocn frazil ice mass flux + integer :: index_x2i_Fioo_frazils ! ocn frazil ice salt flux integer :: index_x2i_Fioo_frazilh ! ocn frazil heat flux integer :: index_x2i_Faxa_bcphidry ! flux: Black Carbon hydrophilic dry deposition integer :: index_x2i_Faxa_bcphodry ! flux: Black Carbon hydrophobic dry deposition diff --git a/components/mpas-seaice/src/Registry.xml b/components/mpas-seaice/src/Registry.xml index de91fd55b530..46a8bd8bd8b5 100644 --- a/components/mpas-seaice/src/Registry.xml +++ b/components/mpas-seaice/src/Registry.xml @@ -566,7 +566,7 @@ /> + + + @@ -2457,6 +2460,9 @@ + + + @@ -4364,6 +4370,21 @@ dimensions="nCells Time" units="kg m-2 s-1" /> + + + Date: Mon, 1 Jun 2026 09:51:48 -0700 Subject: [PATCH 04/11] Update sea ice config checks Sea ice initialize now allows for the config_frazil_coupling_type option: "omega-fluxes" --- components/elm/src/external_models/fates | 2 +- components/mpas-seaice/src/shared/mpas_seaice_initialize.F | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/elm/src/external_models/fates b/components/elm/src/external_models/fates index e027a4030d2a..83863e9398e2 160000 --- a/components/elm/src/external_models/fates +++ b/components/elm/src/external_models/fates @@ -1 +1 @@ -Subproject commit e027a4030d2a0f09039fb337ad67ced7461dd4f0 +Subproject commit 83863e9398e2098b5ef04a8b8525733a881c1ca3 diff --git a/components/mpas-seaice/src/shared/mpas_seaice_initialize.F b/components/mpas-seaice/src/shared/mpas_seaice_initialize.F index 2a4510bea396..8709aede0ebc 100644 --- a/components/mpas-seaice/src/shared/mpas_seaice_initialize.F +++ b/components/mpas-seaice/src/shared/mpas_seaice_initialize.F @@ -2780,9 +2780,10 @@ subroutine seaice_check_configs_coupled(domain) messageType=MPAS_LOG_CRIT) endif - if (trim(config_frazil_coupling_type) /= "external") then + if (trim(config_frazil_coupling_type) /= "external" .or. & + trim(config_frazil_coupling_type) /= "omega-fluxes") then call mpas_log_write(& - 'seaice_check_configs_coupled: config_frazil_coupling_type must be external', & + 'seaice_check_configs_coupled: config_frazil_coupling_type must be external or omega-fluxes', & messageType=MPAS_LOG_CRIT) endif From 51b99ecdc133d0616792a9adfa34ddb70ecc5a3f Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Wed, 3 Jun 2026 07:05:58 -0700 Subject: [PATCH 05/11] Corrects update sea ice config options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sea ice initialize NOW allows for config_frazil_coupling_type option: “omega-fluxes” --- components/mpas-seaice/src/shared/mpas_seaice_initialize.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mpas-seaice/src/shared/mpas_seaice_initialize.F b/components/mpas-seaice/src/shared/mpas_seaice_initialize.F index 8709aede0ebc..db56e5f012d9 100644 --- a/components/mpas-seaice/src/shared/mpas_seaice_initialize.F +++ b/components/mpas-seaice/src/shared/mpas_seaice_initialize.F @@ -2780,7 +2780,7 @@ subroutine seaice_check_configs_coupled(domain) messageType=MPAS_LOG_CRIT) endif - if (trim(config_frazil_coupling_type) /= "external" .or. & + if (trim(config_frazil_coupling_type) /= "external" .and. & trim(config_frazil_coupling_type) /= "omega-fluxes") then call mpas_log_write(& 'seaice_check_configs_coupled: config_frazil_coupling_type must be external or omega-fluxes', & From 76e673e7faa8c22775956a02779f5f3d84295572 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Wed, 3 Jun 2026 11:40:58 -0700 Subject: [PATCH 06/11] Fixes salt flux units error --- components/mpas-ocean/driver/ocn_comp_mct.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F index 29abbb836e9b..7527a95cb680 100644 --- a/components/mpas-ocean/driver/ocn_comp_mct.F +++ b/components/mpas-ocean/driver/ocn_comp_mct.F @@ -3405,7 +3405,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ o2x_o(index_o2x_Fioo_q, n) = seaIceEnergy(i) / ocn_cpl_dt o2x_o(index_o2x_Fioo_frazil, n) = accumulatedFrazilIceMass(i) / ocn_cpl_dt - o2x_o(index_o2x_Fioo_frazils, n) = accumulatedFrazilIceMass(i)* & + o2x_o(index_o2x_Fioo_frazils, n) = accumulatedFrazilIceMass(i)/ 1000.0_RKIND * & config_frazil_sea_ice_reference_salinity / ocn_cpl_dt o2x_o(index_o2x_Fioo_frazilh, n) = max(seaIceEnergy(i) / ocn_cpl_dt, 0.0_RKIND) From b4d14acdfe141fdf5576fdb0f20875309a862d6f Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 19 Jun 2026 12:28:10 -0700 Subject: [PATCH 07/11] Make frazil energy consistent with the ocean energy change Removes double counting of frazil energy in coupler budget. Corrects possible but in temperature tendency of frazil melt. nBFB --- components/mpas-ocean/driver/ocn_comp_mct.F | 8 ++++-- components/mpas-ocean/src/Registry.xml | 5 ++++ .../mpas_ocn_conservation_check.F | 14 ++++++++--- .../src/shared/mpas_ocn_frazil_forcing.F | 25 +++++++++++++++---- components/mpas-seaice/src/icepack | 2 +- driver-mct/main/seq_diag_mct.F90 | 9 ++++--- 6 files changed, 48 insertions(+), 15 deletions(-) diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F index 7527a95cb680..0b19b4da3100 100644 --- a/components/mpas-ocean/driver/ocn_comp_mct.F +++ b/components/mpas-ocean/driver/ocn_comp_mct.F @@ -3166,6 +3166,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ integer, dimension(:), pointer :: landIceMask real (kind=RKIND), dimension(:), pointer :: seaIceEnergy, accumulatedFrazilIceMass, frazilSurfacePressure, & + accumulatedFrazilIceEnergy, & avgTotalFreshWaterTemperatureFlux, & avgCO2_gas_flux, DMSFlux, surfaceUpwardCO2Flux, & avgOceanSurfaceDIC, & @@ -3286,6 +3287,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ call mpas_pool_get_array(forcingPool, 'seaIceEnergy', seaIceEnergy) call mpas_pool_get_array(forcingPool, 'frazilSurfacePressure', frazilSurfacePressure) call mpas_pool_get_array(statePool, 'accumulatedFrazilIceMass', accumulatedFrazilIceMass, 1) + call mpas_pool_get_array(statePool, 'accumulatedFrazilIceEnergy', accumulatedFrazilIceEnergy, 1) end if ! Cryo fields @@ -3389,7 +3391,8 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ ! Calculate energy associated with frazil mass transfer to sea ice if frazil has accumulated if ( accumulatedFrazilIceMass(i) > 0.0_RKIND ) then - seaIceEnergy(i) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion + !seaIceEnergy(i) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion + seaIceEnergy(i) = accumulatedFrazilIceEnergy(i) ! Otherwise calculate the melt potential where avgTracersSurfaceValue represents only the ! top layer of the ocean @@ -3407,7 +3410,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ o2x_o(index_o2x_Fioo_frazil, n) = accumulatedFrazilIceMass(i) / ocn_cpl_dt o2x_o(index_o2x_Fioo_frazils, n) = accumulatedFrazilIceMass(i)/ 1000.0_RKIND * & config_frazil_sea_ice_reference_salinity / ocn_cpl_dt - o2x_o(index_o2x_Fioo_frazilh, n) = max(seaIceEnergy(i) / ocn_cpl_dt, 0.0_RKIND) + o2x_o(index_o2x_Fioo_frazilh, n) = accumulatedFrazilIceEnergy(i)/ ocn_cpl_dt else @@ -3425,6 +3428,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ ! Reset SeaIce Energy and Accumulated Frazil Ice seaIceEnergy(i) = 0.0_RKIND accumulatedFrazilIceMass(i) = 0.0_RKIND + accumulatedFrazilIceEnergy(i) = 0.0_RKIND frazilSurfacePressure(i) = 0.0_RKIND end if diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml index 00f15a2961f9..31f950349fa8 100644 --- a/components/mpas-ocean/src/Registry.xml +++ b/components/mpas-ocean/src/Registry.xml @@ -2146,6 +2146,7 @@ + @@ -2517,6 +2518,10 @@ description="Mass per unit area of frazil ice produced. Reset to zero at each coupling interval" packages="frazilIce" /> + 0.0_RKIND) endif ! if (freezingEnergy < 0) @@ -711,6 +724,8 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP accumulatedFrazilIceMassNew(iCell) = accumulatedFrazilIceMassOld(iCell) + sumNewFrazilIceThickness & * config_frazil_ice_density + accumulatedFrazilIceEnergyNew(iCell) = accumulatedFrazilIceEnergyOld(iCell) + sumNewFrazilEnergy + accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + & (1-usePorosity) * sumNewThicknessWeightedSaltContent diff --git a/components/mpas-seaice/src/icepack b/components/mpas-seaice/src/icepack index e88169765fab..30b06200adaa 160000 --- a/components/mpas-seaice/src/icepack +++ b/components/mpas-seaice/src/icepack @@ -1 +1 @@ -Subproject commit e88169765fabf21645c9556d7fbd89f76b461740 +Subproject commit 30b06200adaaa3bb5fb60605d840b23163766a51 diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 142d4527bbf8..9b4db34bdb83 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -1522,9 +1522,10 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa ca_c = dom_o%data%rAttr(kArea,n) nf = f_area; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_o nf = f_wfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazil,n)) - nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) + ! double counts frazil energy + nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) !+ (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) nf = f_hfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazilh,n)) - nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Fioo_frazils,n) + nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazils,n) nf = f_hh2ot; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Faoo_h2otemp,n) if (flds_polar) then nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_c*o2x_o%rAttr(index_o2x_Foxo_frazil_li,n) @@ -1883,8 +1884,8 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazils,n)) nf = f_hfrazo ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - & (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazilh,n)) - nf = f_hfrz ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - & - (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_q,n)) + nf = f_hfrz ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip)! - & + ! (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_q,n)) if ( flds_wiso_ice_x2i )then nf = f_wrain_16O; From cd9595fd33c86e86fe82f633d5df2f6b64c04476 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 19 Jun 2026 13:05:08 -0700 Subject: [PATCH 08/11] fixed type introduced in last commit --- driver-mct/main/seq_diag_mct.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 9b4db34bdb83..0ac02c65f170 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -1525,7 +1525,7 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa ! double counts frazil energy nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) !+ (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) nf = f_hfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazilh,n)) - nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazils,n) + nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Fioo_frazils,n) nf = f_hh2ot; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Faoo_h2otemp,n) if (flds_polar) then nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_c*o2x_o%rAttr(index_o2x_Foxo_frazil_li,n) From 02ea1b6d7478a7694320f9142686f511a2bdb276 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Tue, 30 Jun 2026 10:22:48 -0700 Subject: [PATCH 09/11] Corrections to ensure BFB Adds optional formulation in frazil. --- components/mpas-ocean/driver/ocn_comp_mct.F | 4 +- .../Registry_conservation_check.xml | 2 +- .../mpas_ocn_conservation_check.F | 5 +-- .../src/shared/mpas_ocn_frazil_forcing.F | 39 ++++++++++++------- components/mpas-seaice/driver/ice_comp_mct.F | 5 ++- driver-mct/main/seq_diag_mct.F90 | 11 +++--- 6 files changed, 39 insertions(+), 27 deletions(-) diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F index 0b19b4da3100..9de9c00e0f7b 100644 --- a/components/mpas-ocean/driver/ocn_comp_mct.F +++ b/components/mpas-ocean/driver/ocn_comp_mct.F @@ -3391,8 +3391,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ ! Calculate energy associated with frazil mass transfer to sea ice if frazil has accumulated if ( accumulatedFrazilIceMass(i) > 0.0_RKIND ) then - !seaIceEnergy(i) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion - seaIceEnergy(i) = accumulatedFrazilIceEnergy(i) + seaIceEnergy(i) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion ! Otherwise calculate the melt potential where avgTracersSurfaceValue represents only the ! top layer of the ocean @@ -3410,6 +3409,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{ o2x_o(index_o2x_Fioo_frazil, n) = accumulatedFrazilIceMass(i) / ocn_cpl_dt o2x_o(index_o2x_Fioo_frazils, n) = accumulatedFrazilIceMass(i)/ 1000.0_RKIND * & config_frazil_sea_ice_reference_salinity / ocn_cpl_dt + !defined positive to be consistent with Fioo_q when frazil is formed o2x_o(index_o2x_Fioo_frazilh, n) = accumulatedFrazilIceEnergy(i)/ ocn_cpl_dt else diff --git a/components/mpas-ocean/src/analysis_members/Registry_conservation_check.xml b/components/mpas-ocean/src/analysis_members/Registry_conservation_check.xml index f0096d237593..9795b52379f4 100644 --- a/components/mpas-ocean/src/analysis_members/Registry_conservation_check.xml +++ b/components/mpas-ocean/src/analysis_members/Registry_conservation_check.xml @@ -86,7 +86,7 @@ description="Iceberg heat flux from coupler, integrated in space and time. Positive into the ocean." /> 0.0_RKIND) @@ -724,6 +736,7 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP accumulatedFrazilIceMassNew(iCell) = accumulatedFrazilIceMassOld(iCell) + sumNewFrazilIceThickness & * config_frazil_ice_density + !frazilIceEnergy > 0 accumulatedFrazilIceEnergyNew(iCell) = accumulatedFrazilIceEnergyOld(iCell) + sumNewFrazilEnergy accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + & diff --git a/components/mpas-seaice/driver/ice_comp_mct.F b/components/mpas-seaice/driver/ice_comp_mct.F index 163c029e99de..2693e3e32a8c 100644 --- a/components/mpas-seaice/driver/ice_comp_mct.F +++ b/components/mpas-seaice/driver/ice_comp_mct.F @@ -3059,10 +3059,11 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{ ! field frazilMassAdjust. i2x_i(index_i2x_Fioi_melth ,n) = oceanHeatFlux(i) i2x_i(index_i2x_Fioi_swpen ,n) = oceanShortwaveFlux(i) - i2x_i(index_i2x_Fioi_meltw ,n) = oceanFreshWaterFlux(i) + i2x_i(index_i2x_Fioi_meltw ,n) = oceanFreshWaterFlux(i) + frazilMassAdjust(i)/ailohi i2x_i(index_i2x_Fioi_frazil ,n) = frazilMassAdjust(i)/ailohi - i2x_i(index_i2x_Fioi_salt ,n) = oceanSaltFlux(i) + i2x_i(index_i2x_Fioi_salt ,n) = oceanSaltFlux(i) + seaiceReferenceSalinity*0.001_RKIND*frazilMassAdjust(i)/ailohi i2x_i(index_i2x_Fioi_frazils,n) = seaiceReferenceSalinity*0.001_RKIND*frazilMassAdjust(i)/ailohi + i2x_i(index_i2x_Fioi_frazilh,n) = 0.0_RKIND i2x_i(index_i2x_Fioi_taux ,n) = tauxo i2x_i(index_i2x_Fioi_tauy ,n) = tauyo diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 0ac02c65f170..9c5761ee9392 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -1522,10 +1522,9 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa ca_c = dom_o%data%rAttr(kArea,n) nf = f_area; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_o nf = f_wfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazil,n)) - ! double counts frazil energy - nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) !+ (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) + nf = f_hfrz; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_q,n)) nf = f_hfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*max(0.0_r8,o2x_o%rAttr(index_o2x_Fioo_frazilh,n)) - nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Fioo_frazils,n) + nf = f_sfrazo; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Fioo_frazils,n) nf = f_hh2ot; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Faoo_h2otemp,n) if (flds_polar) then nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_c*o2x_o%rAttr(index_o2x_Foxo_frazil_li,n) @@ -1814,7 +1813,7 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) nf = f_salt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_salt,n) nf = f_wfrzi ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_frazil,n) nf = f_sfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_frazils,n) - nf = f_hfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - ca_i*i2x_i%rAttr(index_i2x_Fioi_frazilh,n) + nf = f_hfrazi; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Fioi_frazilh,n) if ( flds_wiso_ice )then nf = f_wmelt_16O; @@ -1884,8 +1883,8 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i) (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazils,n)) nf = f_hfrazo ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - & (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_frazilh,n)) - nf = f_hfrz ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip)! - & - ! (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_q,n)) + nf = f_hfrz ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - & + (ca_o+ca_i)*max(0.0_r8,x2i_i%rAttr(index_x2i_Fioo_q,n)) if ( flds_wiso_ice_x2i )then nf = f_wrain_16O; From 8630cdfc4cf055875dcf047d07cf8197db0a44c6 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Wed, 1 Jul 2026 10:31:25 -0700 Subject: [PATCH 10/11] Clean up ocean frazil routine Revert to original formulation with comments. --- .../src/shared/mpas_ocn_frazil_forcing.F | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F index f302fdb4e2bf..5861f35cc98a 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F @@ -487,16 +487,10 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP logical :: underFloatingLandIce, underLandIce ! indicates if we are under land ice - logical :: reduceResidual !if True, ice formation brings layer temperature closer to Tfreeze - !if False, original formulation that does not account for mass loss, - !leaving the layer supercooled - real (kind=RKIND) :: potential ! scalar holding freezing/melt potential real (kind=RKIND) :: freezingEnergy ! energy available for freezing, positive definite real (kind=RKIND) :: meltingEnergy ! energy available for melting, positive definite - reduceResidual = .false. - ! if frazil is not enabled, return if(.not. frazilFormationOn) return @@ -645,14 +639,7 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP frazilSalinity = min( frazilSalinity, activeTracers(indexSalinity, k, iCell) ) ! new frazil ice formation measured in meters - if (reduceResidual == .true.) then - newFrazilIceThickness = freezingEnergy / & - (config_frazil_ice_density * config_frazil_heat_of_fusion + & - rho_sw * config_specific_heat_sea_water * oceanFreezingTemperature * & - config_frazil_ice_density / density(k,iCell)) - else - newFrazilIceThickness = freezingEnergy / (config_frazil_heat_of_fusion * config_frazil_ice_density) - end if + newFrazilIceThickness = freezingEnergy / (config_frazil_heat_of_fusion * config_frazil_ice_density) ! limit the frazil formed appropriately newFrazilIceThickness = min(newFrazilIceThickness, layerThickness(k,iCell) * config_frazil_fractional_thickness_limit) @@ -712,10 +699,10 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP / dt ! ocean fluid temperature is modified due to mixing of existing water with meltwater at the freezing point - ! NJ: more consistent with the layer tendency + ! more consistent with the layer tendency !frazilTemperatureTendency(k,iCell) = frazilTemperatureTendency(k,iCell) + & ! meltedFrazilIceThickness * oceanFreezingTemperature * config_frazil_ice_density / density(k,iCell) / dt - ! NJ: original + ! original formulation frazilTemperatureTendency(k,iCell) = frazilTemperatureTendency(k,iCell) + & meltedFrazilIceThickness * oceanFreezingTemperature / dt ! keep track of new frazil ice From 9ae18ee58d42ba5e02f68cb8d1b106d9ccbe5f32 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Wed, 29 Jul 2026 14:01:54 -0500 Subject: [PATCH 11/11] corrects typo in frazil routine --- components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F index 5861f35cc98a..d8cb7042b597 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F @@ -557,7 +557,7 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP !$omp sumNewThicknessWeightedSaltContent, oceanFreezingTemperature, potential, & !$omp freezingEnergy, meltingEnergy, frazilSalinity, newFrazilIceThickness, & !$omp newThicknessWeightedSaltContent, meltedFrazilIceThickness, & - !$omp meltedThicknessWeightedSaltContent, newFrazilEnergy, meltedFrazilEnergy) + !$omp meltedThicknessWeightedSaltContent, newFrazilEnergy, meltedFrazilEnergy, & !$omp sumNewFrazilEnergy, newFrazilEnergy) do iCell=1,nCells