Adds new ocean to ice coupling fields for frazil ice formation - #460
Adds new ocean to ice coupling fields for frazil ice formation #460njeffery wants to merge 16 commits into
Conversation
…i_cpl_indices.F,seq_flds_mod.F90
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
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
Sea ice initialize now allows for the config_frazil_coupling_type option: "omega-fluxes"
Sea ice initialize NOW allows for config_frazil_coupling_type option: “omega-fluxes”
Removes double counting of frazil energy in coupler budget. Corrects possible but in temperature tendency of frazil melt. nBFB
Adds optional formulation in frazil.
Revert to original formulation with comments.
| !$omp freezingEnergy, meltingEnergy, frazilSalinity, newFrazilIceThickness, & | ||
| !$omp newThicknessWeightedSaltContent, meltedFrazilIceThickness, & | ||
| !$omp meltedThicknessWeightedSaltContent) | ||
| !$omp meltedThicknessWeightedSaltContent, newFrazilEnergy, meltedFrazilEnergy) |
There was a problem hiding this comment.
typo here? is this line meant to end with ", &" rather than ")"?
There was a problem hiding this comment.
also newFrazilEnergy appears twice here, this line and next.
|
@darincomeau : Thanks for catching that! |
|
With the above two fixes, and using E3SM-Project/Icepack#43, this passes
with |
978e56f to
0ae578b
Compare
karapeterson
left a comment
There was a problem hiding this comment.
The PR looks good and builds and runs successfully after the changes that Darin suggested. The final change that needs to be committed before approval is to remove the extra 'newFrazilEnergy' on line 561 of mpas_ocn_frazil_forcing.F.
There was a problem hiding this comment.
Pull request overview
This PR extends the MPAS-Ocean ⇄ MPAS-Seaice coupling to support an “omega-fluxes”
mode for frazil formation, adding separate coupling fields for frazil mass, salt, and
energy/enthalpy fluxes and updating driver diagnostics/metadata accordingly.
Changes:
- Add new coupler fields for frazil salt and heat/enthalpy fluxes (ocean→ice) and frazil
mass/salt/heat fluxes (ice→ocean), including metadata registration in both MCT and
MOAB drivers. - Extend MPAS-Seaice coupling pools/Registry and driver import/export logic to pass and
use frazil fluxes whenconfig_frazil_coupling_type="omega-fluxes". - Accumulate and export frazil latent energy in MPAS-Ocean and update conservation/
diagnostic bookkeeping.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| driver-moab/shr/seq_flds_mod.F90 | Registers new frazil coupling fields/metadata for MOAB driver. |
| driver-mct/shr/seq_flds_mod.F90 | Registers new frazil coupling fields/metadata for MCT driver. |
| driver-mct/main/seq_diag_mct.F90 | Adds new budget terms for frazil heat/salt and prints salt budgets. |
| components/mpas-seaice/src/shared/mpas_seaice_initialize.F | Allows omega-fluxes as a valid frazil coupling type. |
| components/mpas-seaice/src/shared/mpas_seaice_icepack.F | Passes new frazil flux arrays into Icepack column call. |
| components/mpas-seaice/src/Registry.xml | Adds new ocean-coupling variables and exposes the new coupling type. |
| components/mpas-seaice/driver/mpassi_cpl_indices.F | Adds new MCT coupling indices for frazil flux fields. |
| components/mpas-seaice/driver/ice_comp_mct.F | Imports ocean frazil fluxes; exports ice-side frazil adjustment fluxes. |
| components/mpas-seaice/cime_config/buildnml | Adds new coupling vars to generated stream/IO lists. |
| components/mpas-seaice/bld/namelist_files/namelist_definition_mpassi.xml | Documents omega-fluxes as a valid namelist option. |
| components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F | Accumulates frazil latent energy alongside mass/salinity. |
| components/mpas-ocean/src/Registry.xml | Adds accumulatedFrazilIceEnergy state variable. |
| components/mpas-ocean/src/analysis_members/Registry_conservation_check.xml | Fixes a typo in frazil heat-flux description text. |
| components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F | Updates conservation check to use accumulated frazil energy. |
| components/mpas-ocean/driver/ocn_comp_mct.F | Exports frazil salt and heat/enthalpy fluxes to the coupler. |
| components/mpas-ocean/driver/mpaso_cpl_indices.F | Adds new coupling indices for frazil salt/heat flux exports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| freezingMeltingPotential(i) = x2i_i(index_x2i_Fioo_q, n) | ||
|
|
||
| frazilSaltFlux(i) = 0.0_RKIND | ||
| frazilEnthalpyFlux(i) = 0.0_RKIND | ||
| frazilMassAdjust(i) = 0.0_RKIND | ||
|
|
| 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)) |
| attname = 'Fioo_frazils' | ||
| call metadata_set(attname, longname, stdname, units) | ||
|
|
||
| ! Ocean frazil head flux |
| ! 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' |
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
|
Adding a note that a follow-up pull request will add a scaling factor in driver-mct/main/seq_diag_mct.F90, corresponding to the following line in E3SM master: |
Allows for the ocean model to compute the accumulated frazil mass, salt mass, and energy,
and passes to the sea ice model If mpas-seaice option, config_frazil_coupling_type = “omega-fluxes”.
Fioo_Frazils – total accumulated frazil salt mass per time
Fioo_Frazilh – total accumulated frazil energy per time (defined as positive to be consistent with ‘q’ the sea ice potential)
The new implementation has a requirement that the new frazil salinity be greater than 0.1 ppt.
Works with icepack https://github.com/E3SM-Project/Icepack/tree/njeffery/omega-coupling-frazil in E3SM-Project/Icepack#43
Includes updates from @erinethomas and @karapeterson (https://github.com/erinethomas/E3SM/tree/omega/ice-coupling)
Tested in mpas-ocean and confirmed BFB for default config_frazil_coupling_type = “external”
Stealth.