From eccb199d64ff5a19c71ad645d23ee89b34b1145c Mon Sep 17 00:00:00 2001 From: Erin Thomas Date: Wed, 27 May 2026 09:40:43 -0700 Subject: [PATCH 01/16] add index_x2i_Fioo_frazils (frazil salt flux) to ice_comp_mct.F,mpassi_cpl_indices.F,seq_flds_mod.F90 --- components/mpas-seaice/driver/ice_comp_mct.F | 3 ++- components/mpas-seaice/driver/mpassi_cpl_indices.F | 2 ++ driver-mct/shr/seq_flds_mod.F90 | 9 +++++++++ driver-moab/shr/seq_flds_mod.F90 | 9 +++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/components/mpas-seaice/driver/ice_comp_mct.F b/components/mpas-seaice/driver/ice_comp_mct.F index 12e84a107bb1..cae4f9f54ea1 100644 --- a/components/mpas-seaice/driver/ice_comp_mct.F +++ b/components/mpas-seaice/driver/ice_comp_mct.F @@ -2383,7 +2383,8 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ freezingMeltingPotential(i) = x2i_i(index_x2i_Fioo_q, n) - frazilMassFlux = x2i_i(index_x2i_Fioo_frazil, n) + frazilMassFlux = x2i_i(index_x2i_Fioo_frazil, n) + frazilSaltMassFlux = x2i_i(index_x2i_Fioo_frazils, n) ! 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 diff --git a/components/mpas-seaice/driver/mpassi_cpl_indices.F b/components/mpas-seaice/driver/mpassi_cpl_indices.F index 6e84fcba8533..682951728056 100644 --- a/components/mpas-seaice/driver/mpassi_cpl_indices.F +++ b/components/mpas-seaice/driver/mpassi_cpl_indices.F @@ -88,6 +88,7 @@ module mpassi_cpl_indices 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_Faxa_bcphidry ! flux: Black Carbon hydrophilic dry deposition integer :: index_x2i_Faxa_bcphodry ! flux: Black Carbon hydrophobic dry deposition integer :: index_x2i_Faxa_bcphiwet ! flux: Black Carbon hydrophilic wet deposition @@ -228,6 +229,7 @@ subroutine mpassi_cpl_indices_set( ) index_x2i_Faxa_swvdf = mct_avect_indexra(x2i,'Faxa_swvdf') index_x2i_Fioo_q = mct_avect_indexra(x2i,'Fioo_q') index_x2i_Fioo_frazil = mct_avect_indexra(x2i,'Fioo_frazil') + index_x2i_Fioo_frazils = mct_avect_indexra(x2i,'Fioo_frazils') index_x2i_Faxa_bcphidry = mct_avect_indexra(x2i,'Faxa_bcphidry') index_x2i_Faxa_bcphodry = mct_avect_indexra(x2i,'Faxa_bcphodry') index_x2i_Faxa_bcphiwet = mct_avect_indexra(x2i,'Faxa_bcphiwet') diff --git a/driver-mct/shr/seq_flds_mod.F90 b/driver-mct/shr/seq_flds_mod.F90 index f9960c1761ec..8cf7ea5ccac8 100644 --- a/driver-mct/shr/seq_flds_mod.F90 +++ b/driver-mct/shr/seq_flds_mod.F90 @@ -1602,6 +1602,15 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioo_frazil' call metadata_set(attname, longname, stdname, units) + ! Ocean frazil production + call seq_flds_add(o2x_fluxes,"Fioo_frazils") + call seq_flds_add(x2i_fluxes,"Fioo_frazils") + longname = 'Ocean frazil production' + stdname = 'ocean_frazil_ice_production' + units = 'kg m-2 s-1' + attname = 'Fioo_frazils' + call metadata_set(attname, longname, stdname, units) + ! Heat flux from melting call seq_flds_add(i2x_fluxes,"Fioi_melth") call seq_flds_add(x2o_fluxes,"Fioi_melth") diff --git a/driver-moab/shr/seq_flds_mod.F90 b/driver-moab/shr/seq_flds_mod.F90 index 99d6580183e9..f2c25ac0a0b6 100644 --- a/driver-moab/shr/seq_flds_mod.F90 +++ b/driver-moab/shr/seq_flds_mod.F90 @@ -1617,6 +1617,15 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioo_frazil' call metadata_set(attname, longname, stdname, units) + ! Ocean frazil production + call seq_flds_add(o2x_fluxes,"Fioo_frazils") + call seq_flds_add(x2i_fluxes,"Fioo_frazils") + longname = 'Ocean frazil production' + stdname = 'ocean_frazil_ice_production' + units = 'kg m-2 s-1' + attname = 'Fioo_frazils' + call metadata_set(attname, longname, stdname, units) + ! Heat flux from melting call seq_flds_add(i2x_fluxes,"Fioi_melth") call seq_flds_add(x2o_fluxes,"Fioi_melth") From a70661817a40e85986cd5745b894b24e5e309131 Mon Sep 17 00:00:00 2001 From: Kara Peterson Date: Wed, 27 May 2026 14:44:35 -0700 Subject: [PATCH 02/16] Add additional frazil coupler fields. add index_x2i_Fioo_frazilh (frazil heat flux from ocean) add index_x2i_Fioi_frazil (frazil mass flux from sea ice) add index_x2i_Fioi_frazils (frazil salt flux from sea ice) add index_x2i_Fioi_frazilh (frazil heat flux from sea ice) All added to mpassi_cpl_indices.F and seq_flds_mod.F90. Fioi_frazil and Fioi_frazils added to ice_comp_mct.F --- components/mpas-seaice/driver/ice_comp_mct.F | 15 +++--- .../mpas-seaice/driver/mpassi_cpl_indices.F | 10 +++- driver-mct/shr/seq_flds_mod.F90 | 42 +++++++++++++-- driver-moab/shr/seq_flds_mod.F90 | 52 ++++++++++++++++--- 4 files changed, 101 insertions(+), 18 deletions(-) diff --git a/components/mpas-seaice/driver/ice_comp_mct.F b/components/mpas-seaice/driver/ice_comp_mct.F index cae4f9f54ea1..16c334ef96a9 100644 --- a/components/mpas-seaice/driver/ice_comp_mct.F +++ b/components/mpas-seaice/driver/ice_comp_mct.F @@ -2126,6 +2126,7 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ real (kind=RKIND) :: & frazilMassFlux, & + frazilSaltMassFlux, & frazilMassFluxRev type (block_type), pointer :: block_ptr @@ -3026,12 +3027,14 @@ subroutine ice_export_mct(i2x_i, errorCode) !{{{ ! i/o fluxes computed by ice, as well as additional freshwater and salt calculated at the last ! coupling import and needed to grow sea ice from frazil passed from the ocean model in the ! 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) + frazilMassAdjust(i)/ailohi - i2x_i(index_i2x_Fioi_salt ,n) = oceanSaltFlux(i) + seaiceReferenceSalinity*0.001_RKIND*frazilMassAdjust(i)/ailohi - i2x_i(index_i2x_Fioi_taux ,n) = tauxo - i2x_i(index_i2x_Fioi_tauy ,n) = tauyo + 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_frazil ,n) = frazilMassAdjust(i)/ailohi + i2x_i(index_i2x_Fioi_salt ,n) = oceanSaltFlux(i) + i2x_i(index_i2x_Fioi_frazils,n) = seaiceReferenceSalinity*0.001_RKIND*frazilMassAdjust(i)/ailohi + i2x_i(index_i2x_Fioi_taux ,n) = tauxo + i2x_i(index_i2x_Fioi_tauy ,n) = tauyo ! export biogeochemistry fields, if configured if (config_use_column_biogeochemistry .and. config_couple_biogeochemistry_fields) then diff --git a/components/mpas-seaice/driver/mpassi_cpl_indices.F b/components/mpas-seaice/driver/mpassi_cpl_indices.F index 682951728056..cc57b0bf427d 100644 --- a/components/mpas-seaice/driver/mpassi_cpl_indices.F +++ b/components/mpas-seaice/driver/mpassi_cpl_indices.F @@ -34,7 +34,10 @@ module mpassi_cpl_indices integer :: index_i2x_Fioi_swpen ! sw: net penetrating ice integer :: index_i2x_Fioi_melth ! heat flux from melting ice (<0) integer :: index_i2x_Fioi_meltw ! water flux from melting ice - integer :: index_i2x_Fioi_salt ! salt flux from meting ice + integer :: index_i2x_Fioi_salt ! salt flux from melting ice + integer :: index_i2x_Fioi_frazil ! water flux from frazil ice + integer :: index_i2x_Fioi_frazils ! salt flux from frazil ice + integer :: index_i2x_Fioi_frazilh ! heat flux from frazil ice integer :: index_i2x_Fioi_taux ! ice/ocn stress, zonal integer :: index_i2x_Fioi_tauy ! ice/ocn stress, zonal integer :: index_i2x_Fioi_bergh ! heat flux from melting icebergs (<0) @@ -89,6 +92,7 @@ module mpassi_cpl_indices 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_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 integer :: index_x2i_Faxa_bcphiwet ! flux: Black Carbon hydrophilic wet deposition @@ -177,6 +181,9 @@ subroutine mpassi_cpl_indices_set( ) index_i2x_Fioi_melth = mct_avect_indexra(i2x,'Fioi_melth') index_i2x_Fioi_meltw = mct_avect_indexra(i2x,'Fioi_meltw') index_i2x_Fioi_salt = mct_avect_indexra(i2x,'Fioi_salt') + index_i2x_Fioi_frazil = mct_avect_indexra(i2x,'Fioi_frazil') + index_i2x_Fioi_frazils = mct_avect_indexra(i2x,'Fioi_frazils') + index_i2x_Fioi_frazilh = mct_avect_indexra(i2x,'Fioi_frazilh') index_i2x_Fioi_taux = mct_avect_indexra(i2x,'Fioi_taux') index_i2x_Fioi_tauy = mct_avect_indexra(i2x,'Fioi_tauy') index_i2x_Fioi_bergh = mct_avect_indexra(i2x,'PFioi_bergh') @@ -230,6 +237,7 @@ subroutine mpassi_cpl_indices_set( ) index_x2i_Fioo_q = mct_avect_indexra(x2i,'Fioo_q') index_x2i_Fioo_frazil = mct_avect_indexra(x2i,'Fioo_frazil') index_x2i_Fioo_frazils = mct_avect_indexra(x2i,'Fioo_frazils') + index_x2i_Fioo_frazilh = mct_avect_indexra(x2i,'Fioo_frazilh') index_x2i_Faxa_bcphidry = mct_avect_indexra(x2i,'Faxa_bcphidry') index_x2i_Faxa_bcphodry = mct_avect_indexra(x2i,'Faxa_bcphodry') index_x2i_Faxa_bcphiwet = mct_avect_indexra(x2i,'Faxa_bcphiwet') diff --git a/driver-mct/shr/seq_flds_mod.F90 b/driver-mct/shr/seq_flds_mod.F90 index 8cf7ea5ccac8..8da09511c434 100644 --- a/driver-mct/shr/seq_flds_mod.F90 +++ b/driver-mct/shr/seq_flds_mod.F90 @@ -1602,13 +1602,22 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioo_frazil' call metadata_set(attname, longname, stdname, units) - ! Ocean frazil production + ! Ocean frazil salt production call seq_flds_add(o2x_fluxes,"Fioo_frazils") call seq_flds_add(x2i_fluxes,"Fioo_frazils") - longname = 'Ocean frazil production' - stdname = 'ocean_frazil_ice_production' + longname = 'Ocean frazil salt production' + stdname = 'ocean_frazil_salt_production' units = 'kg m-2 s-1' attname = 'Fioo_frazils' + call metadata_set(attname, longname, stdname, units) + + ! Ocean frazil head flux + call seq_flds_add(o2x_fluxes,"Fioo_frazilh") + call seq_flds_add(x2i_fluxes,"Fioo_frazilh") + longname = 'Ocean frazil heat flux' + stdname = 'ocean_frazil_heat_flux' + units = 'W m-2' + attname = 'Fioo_frazilh' call metadata_set(attname, longname, stdname, units) ! Heat flux from melting @@ -1720,6 +1729,33 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioi_salt' call metadata_set(attname, longname, stdname, units) + ! Frazil Mass flux + call seq_flds_add(i2x_fluxes,"Fioi_frazil") + call seq_flds_add(x2o_fluxes,"Fioi_frazil") + longname = 'Frazil mass flux' + stdname = 'frazil_mass_flux_into_sea_water' + units = 'kg m-2 s-1' + attname = 'Fioi_frazil' + call metadata_set(attname, longname, stdname, units) + + ! Frazil Salt flux + call seq_flds_add(i2x_fluxes,"Fioi_frazils") + call seq_flds_add(x2o_fluxes,"Fioi_frazils") + longname = 'Frazil salt flux' + stdname = 'frazil_salt_flux_into_sea_water' + units = 'kg m-2 s-1' + attname = 'Fioi_frazils' + call metadata_set(attname, longname, stdname, units) + + ! Frazil Heat flux + call seq_flds_add(i2x_fluxes,"Fioi_frazilh") + call seq_flds_add(x2o_fluxes,"Fioi_frazilh") + longname = 'Frazil heat flux' + stdname = 'frazil_heat_flux_into_sea_water' + units = 'W m-2' + attname = 'Fioi_frazilh' + call metadata_set(attname, longname, stdname, units) + ! Black Carbon hydrophilic deposition call seq_flds_add(i2x_fluxes,"Fioi_bcphi" ) call seq_flds_add(x2o_fluxes,"Fioi_bcphi" ) diff --git a/driver-moab/shr/seq_flds_mod.F90 b/driver-moab/shr/seq_flds_mod.F90 index f2c25ac0a0b6..70bf634d672a 100644 --- a/driver-moab/shr/seq_flds_mod.F90 +++ b/driver-moab/shr/seq_flds_mod.F90 @@ -1617,14 +1617,23 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioo_frazil' call metadata_set(attname, longname, stdname, units) - ! Ocean frazil production - call seq_flds_add(o2x_fluxes,"Fioo_frazils") - call seq_flds_add(x2i_fluxes,"Fioo_frazils") - longname = 'Ocean frazil production' - stdname = 'ocean_frazil_ice_production' - units = 'kg m-2 s-1' - attname = 'Fioo_frazils' - call metadata_set(attname, longname, stdname, units) + ! Ocean frazil salt production + call seq_flds_add(o2x_fluxes,"Fioo_frazils") + call seq_flds_add(x2i_fluxes,"Fioo_frazils") + longname = 'Ocean frazil salt production' + stdname = 'ocean_frazil_salt_production' + units = 'kg m-2 s-1' + attname = 'Fioo_frazils' + call metadata_set(attname, longname, stdname, units) + + ! Ocean frazil heat flux + call seq_flds_add(o2x_fluxes,"Fioo_frazilh") + call seq_flds_add(x2i_fluxes,"Fioo_frazilh") + longname = 'Ocean frazil heat flux' + stdname = 'ocean_frazil_heat_flux' + units = 'W m-2' + attname = 'Fioo_frazilh' + call metadata_set(attname, longname, stdname, units) ! Heat flux from melting call seq_flds_add(i2x_fluxes,"Fioi_melth") @@ -1734,6 +1743,33 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioi_salt' call metadata_set(attname, longname, stdname, units) + ! Frazil mass flux + call seq_flds_add(i2x_fluxes,"Fioi_frazil") + call seq_flds_add(x2o_fluxes,"Fioi_frazil") + longname = 'Frazil mass flux' + stdname = 'frazil_mass_flux_into_sea_water' + units = 'kg m-2 s-1' + attname = 'Fioi_frazil' + call metadata_set(attname, longname, stdname, units) + + ! Frazil salt flux + call seq_flds_add(i2x_fluxes,"Fioi_frazils") + call seq_flds_add(x2o_fluxes,"Fioi_frazils") + longname = 'Frazil salt flux' + stdname = 'frazil_salt_flux_into_sea_water' + units = 'kg m-2 s-1' + attname = 'Fioi_frazils' + call metadata_set(attname, longname, stdname, units) + + ! Frazil heat flux + call seq_flds_add(i2x_fluxes,"Fioi_frazilh") + call seq_flds_add(x2o_fluxes,"Fioi_frazilh") + longname = 'Frazil heat flux' + stdname = 'frazil_heat_flux_into_sea_water' + units = 'W m-2' + attname = 'Fioi_frazilh' + call metadata_set(attname, longname, stdname, units) + ! Black Carbon hydrophilic deposition call seq_flds_add(i2x_fluxes,"Fioi_bcphi" ) call seq_flds_add(x2o_fluxes,"Fioi_bcphi" ) From 69be9285f54d47dea78ffd4d58c3ff722216837d Mon Sep 17 00:00:00 2001 From: Erin Thomas Date: Thu, 28 May 2026 12:36:57 -0700 Subject: [PATCH 03/16] adding o2x_Fioo_frazilh/o2x_Fioo_frazils to mpaso --- components/mpas-ocean/driver/mpaso_cpl_indices.F | 4 ++++ components/mpas-ocean/driver/ocn_comp_mct.F | 4 ++++ components/mpas-seaice/driver/ice_comp_mct.F | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/components/mpas-ocean/driver/mpaso_cpl_indices.F b/components/mpas-ocean/driver/mpaso_cpl_indices.F index de86b439c2ea..e7daa4f9b57b 100644 --- a/components/mpas-ocean/driver/mpaso_cpl_indices.F +++ b/components/mpas-ocean/driver/mpaso_cpl_indices.F @@ -21,6 +21,8 @@ module mpaso_cpl_indices integer :: index_o2x_Fioo_q integer :: index_o2x_Foxo_q_li integer :: index_o2x_Fioo_frazil + integer :: index_o2x_Fioo_frazils + integer :: index_o2x_Fioo_frazilh integer :: index_o2x_Foxo_frazil_li integer :: index_o2x_Faoo_h2otemp integer :: index_o2x_Faoo_fco2_ocn @@ -215,6 +217,8 @@ subroutine mpaso_cpl_indices_set( ) index_o2x_Fioo_q = mct_avect_indexra(o2x,'Fioo_q',perrWith='quiet') index_o2x_Foxo_q_li = mct_avect_indexra(o2x,'Foxo_q_li',perrWith='quiet') index_o2x_Fioo_frazil = mct_avect_indexra(o2x,'Fioo_frazil',perrWith='quiet') + index_o2x_Fioo_frazils = mct_avect_indexra(o2x,'Fioo_frazils',perrWith='quiet') + index_o2x_Fioo_frazilh = mct_avect_indexra(o2x,'Fioo_frazilh',perrWith='quiet') index_o2x_Foxo_frazil_li= mct_avect_indexra(o2x,'Foxo_frazil_li',perrWith='quiet') index_o2x_Faoo_h2otemp = mct_avect_indexra(o2x,'Faoo_h2otemp',perrWith='quiet') index_o2x_Faoo_fco2_ocn = mct_avect_indexra(o2x,'Faoo_fco2_ocn',perrWith='quiet') diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F index fc3c4edda820..b95947c2efb5 100644 --- a/components/mpas-ocean/driver/ocn_comp_mct.F +++ b/components/mpas-ocean/driver/ocn_comp_mct.F @@ -3405,11 +3405,15 @@ 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 else o2x_o(index_o2x_Fioo_q, n) = 0.0_RKIND o2x_o(index_o2x_Fioo_frazil, n) = 0.0_RKIND + o2x_o(index_o2x_Fioo_frazils, n) = 0.0_RKIND + o2x_o(index_o2x_Fioo_frazilh, n) = 0.0_RKIND if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then o2x_o(index_o2x_Foxo_q_li, n) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion / ocn_cpl_dt o2x_o(index_o2x_Foxo_frazil_li, n) = accumulatedFrazilIceMass(i) / ocn_cpl_dt diff --git a/components/mpas-seaice/driver/ice_comp_mct.F b/components/mpas-seaice/driver/ice_comp_mct.F index 16c334ef96a9..ce8a7f745d41 100644 --- a/components/mpas-seaice/driver/ice_comp_mct.F +++ b/components/mpas-seaice/driver/ice_comp_mct.F @@ -2385,7 +2385,7 @@ 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) + !frazilSaltMassFlux = x2i_i(index_x2i_Fioo_frazils, n) ! 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 From 32602c05a1449422fc6459aa90f83637f7fba6a0 Mon Sep 17 00:00:00 2001 From: Kara Peterson Date: Thu, 28 May 2026 14:36:19 -0700 Subject: [PATCH 04/16] 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 05/16] 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 06/16] 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 07/16] 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 08/16] 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 09/16] 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 10/16] 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 11/16] 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 12/16] 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 13/16] 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 14/16] 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 From 1c366696f15014fe1ded27a3f1e6d5f320f67e64 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 14 Aug 2026 07:52:43 -0700 Subject: [PATCH 15/16] Remove redundant newFrazilEnergy --- 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 d8cb7042b597..5d0a442da7da 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F @@ -558,7 +558,7 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP !$omp freezingEnergy, meltingEnergy, frazilSalinity, newFrazilIceThickness, & !$omp newThicknessWeightedSaltContent, meltedFrazilIceThickness, & !$omp meltedThicknessWeightedSaltContent, newFrazilEnergy, meltedFrazilEnergy, & - !$omp sumNewFrazilEnergy, newFrazilEnergy) + !$omp sumNewFrazilEnergy) do iCell=1,nCells underLandIce = .false. From 58b80313c3bce1e91fa1512914403fbb31317a7f Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 14 Aug 2026 08:29:08 -0700 Subject: [PATCH 16/16] Added copilot suggestions 1. Initialized frazilMassFlux to 0 for SOM 2. Corrected indexing of component-level salt budget sum 3. Type in comment 4. Corrected definition of Fioo_frazils in MOAB to be consistent with mct --- components/mpas-seaice/driver/ice_comp_mct.F | 1 + driver-mct/main/seq_diag_mct.F90 | 8 ++++---- driver-mct/shr/seq_flds_mod.F90 | 2 +- driver-moab/shr/seq_flds_mod.F90 | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/mpas-seaice/driver/ice_comp_mct.F b/components/mpas-seaice/driver/ice_comp_mct.F index 2693e3e32a8c..75c7f05cbefb 100644 --- a/components/mpas-seaice/driver/ice_comp_mct.F +++ b/components/mpas-seaice/driver/ice_comp_mct.F @@ -2422,6 +2422,7 @@ subroutine ice_import_mct(x2i_i, errorCode)!{{{ freezingMeltingPotential(i) = x2i_i(index_x2i_Fioo_q, n) + frazilMassFlux(i) = 0.0_RKIND frazilSaltFlux(i) = 0.0_RKIND frazilEnthalpyFlux(i) = 0.0_RKIND frazilMassAdjust(i) = 0.0_RKIND diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90 index 9c5761ee9392..73658285ab5d 100644 --- a/driver-mct/main/seq_diag_mct.F90 +++ b/driver-mct/main/seq_diag_mct.F90 @@ -2255,10 +2255,10 @@ SUBROUTINE seq_diag_print_mct(EClock, stop_alarm, do_bgc_budg, & -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,FA1) ' *SUM*',-sum(dataGpr(f_s:f_s_end,icar,ip)),sum(dataGpr(f_s:f_s_end,icxs,ip)), & + sum(dataGpr(f_s:f_s_end,icxr,ip)),-sum(dataGpr(f_s:f_s_end,icas,ip)), & + -sum(dataGpr(f_s:f_s_end,icar,ip))+sum(dataGpr(f_s:f_s_end,icxs,ip))+ & + sum(dataGpr(f_s:f_s_end,icxr,ip))-sum(dataGpr(f_s:f_s_end,icas,ip)) write(logunit,*) ' ' enddo diff --git a/driver-mct/shr/seq_flds_mod.F90 b/driver-mct/shr/seq_flds_mod.F90 index 7eca8224f923..18bea432c49e 100644 --- a/driver-mct/shr/seq_flds_mod.F90 +++ b/driver-mct/shr/seq_flds_mod.F90 @@ -1611,7 +1611,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioo_frazils' call metadata_set(attname, longname, stdname, units) - ! Ocean frazil head flux + ! Ocean frazil heat flux call seq_flds_add(o2x_fluxes,"Fioo_frazilh") call seq_flds_add(x2i_fluxes,"Fioo_frazilh") longname = 'Ocean frazil heat flux' diff --git a/driver-moab/shr/seq_flds_mod.F90 b/driver-moab/shr/seq_flds_mod.F90 index 70bf634d672a..efc8883f91a5 100644 --- a/driver-moab/shr/seq_flds_mod.F90 +++ b/driver-moab/shr/seq_flds_mod.F90 @@ -1617,11 +1617,11 @@ subroutine seq_flds_set(nmlfile, ID, infodata) attname = 'Fioo_frazil' call metadata_set(attname, longname, stdname, units) - ! Ocean frazil salt production + ! Ocean frazil salt flux call seq_flds_add(o2x_fluxes,"Fioo_frazils") call seq_flds_add(x2i_fluxes,"Fioo_frazils") - longname = 'Ocean frazil salt production' - stdname = 'ocean_frazil_salt_production' + longname = 'Ocean frazil salt flux' + stdname = 'ocean_frazil_salt_flux' units = 'kg m-2 s-1' attname = 'Fioo_frazils' call metadata_set(attname, longname, stdname, units)