From 7a838c047e112ef3a1db84674368541623617f1f Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Thu, 10 Oct 2024 13:17:31 -0500 Subject: [PATCH 1/5] Second test of frazil ice treatment in mpaso These changes assume frazil ice retains salt until precipitating at the surface. Treatment under land ice remains the same. nonBFB --- components/mpas-ocean/src/Registry.xml | 4 ++ .../src/shared/mpas_ocn_frazil_forcing.F | 39 +++++++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml index 2a21e22f40d2..28b2b25372df 100644 --- a/components/mpas-ocean/src/Registry.xml +++ b/components/mpas-ocean/src/Registry.xml @@ -4076,6 +4076,10 @@ description="surface pressure forcing due to weight of frazil ice" packages="frazilIce" /> + 0) then ! get frazil salinity if (underLandIce) then - frazilSalinity = 0.0_RKIND + frazilSalinity = 0.0_RKIND ! activeTracers(indexSalinity, k, iCell) !0.0_RKIND else - frazilSalinity = config_frazil_sea_ice_reference_salinity + frazilSalinity = activeTracers(indexSalinity, k, iCell) !config_frazil_sea_ice_reference_salinity end if frazilSalinity = min( frazilSalinity, activeTracers(indexSalinity, k, iCell) ) @@ -564,7 +570,6 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP sumNewThicknessWeightedSaltContent = sumNewThicknessWeightedSaltContent + newThicknessWeightedSaltContent else - ! ocean water is warm enough to melt frazil ! test to see if there is frazil to be melted @@ -600,8 +605,8 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP / dt ! keep track of new frazil ice - sumNewThicknessWeightedSaltContent = sumNewThicknessWeightedSaltContent - meltedThicknessWeightedSaltContent - sumNewFrazilIceThickness = sumNewFrazilIceThickness - meltedFrazilIceThickness + sumNewThicknessWeightedSaltContent = max(0.0_RKIND,sumNewThicknessWeightedSaltContent - meltedThicknessWeightedSaltContent) + sumNewFrazilIceThickness = max(0.0_RKIND,sumNewFrazilIceThickness - meltedFrazilIceThickness) endif ! if (sumNewFrazilIceThickness > 0.0_RKIND) @@ -615,16 +620,36 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP ! note: the accumulatedFrazilIceMass (at both time levels) is reset to zero after being sent to the coupler accumulatedFrazilIceMassNew(iCell) = accumulatedFrazilIceMassOld(iCell) + sumNewFrazilIceThickness & * config_frazil_ice_density - accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + sumNewThicknessWeightedSaltContent + !accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + sumNewThicknessWeightedSaltContent + !accumulatedFrazilIceSalinityTmp = sumNewThicknessWeightedSaltContent if ( underLandIce ) then ! accumulate frazil formed under land ice in case we're not coupling and we need to keep track of it ! for freshwater budgets accumulatedLandIceFrazilMassNew(iCell) = accumulatedLandIceFrazilMassOld(iCell) & + sumNewFrazilIceThickness * config_frazil_ice_density ! There is no accumulatedLandIceFrazilSalinity because it is always 0 + frazilSalinity = 0.0_RKIND + else + frazilSalinity = config_frazil_sea_ice_reference_salinity end if + ! Determine true salt in frazil + if (sumNewFrazilIceThickness > 0.0_RKIND) then + newThicknessWeightedSaltContent = sumNewFrazilIceThickness * frazilSalinity + if (newThicknessWeightedSaltContent > sumNewThicknessWeightedSaltContent) then + lowSalinityFrazilIce(iCell) = newThicknessWeightedSaltContent - sumNewThicknessWeightedSaltContent + ! Warning: May lead to a salt conservation error + accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + max(0.0_RKIND, sumNewThicknessWeightedSaltContent) + else + ! salt expelled at the surface + frazilSalinityTendency(minLevelCell(iCell),iCell) = frazilSalinityTendency(minLevelCell(iCell),iCell) + & + max(0.0_RKIND,(sumNewThicknessWeightedSaltContent - newThicknessWeightedSaltContent) ) / dt + accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + newThicknessWeightedSaltContent + endif + else + accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + endif ! if frazil ice is formed enddo ! do iCell = 1, nCells !$omp end do !$omp end parallel From 4f6e36c33501fe1bc7f02851c08ce5dc52fcc59a Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 11 Oct 2024 09:29:41 -0500 Subject: [PATCH 2/5] Add frazil change for under land ice nonBFB --- 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 b32d373bab65..84de0938f415 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F @@ -535,7 +535,7 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP ! get frazil salinity if (underLandIce) then - frazilSalinity = 0.0_RKIND ! activeTracers(indexSalinity, k, iCell) !0.0_RKIND + frazilSalinity = activeTracers(indexSalinity, k, iCell) !0.0_RKIND else frazilSalinity = activeTracers(indexSalinity, k, iCell) !config_frazil_sea_ice_reference_salinity end if From e00aebde2c3395a53cc0c0771688628ceb147cd8 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Wed, 16 Oct 2024 16:46:41 -0500 Subject: [PATCH 3/5] Add frazil porosity Adds namelist field config_frazil_ice_porosity Modifies the internal frazil salinity nonBFB --- components/mpas-ocean/bld/build-namelist | 1 + components/mpas-ocean/bld/build-namelist-section | 1 + .../bld/namelist_files/namelist_defaults_mpaso.xml | 1 + .../bld/namelist_files/namelist_definition_mpaso.xml | 8 ++++++++ components/mpas-ocean/src/Registry.xml | 6 +++++- .../mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F | 12 +++++------- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/components/mpas-ocean/bld/build-namelist b/components/mpas-ocean/bld/build-namelist index 460b9ecda428..984f624f6530 100755 --- a/components/mpas-ocean/bld/build-namelist +++ b/components/mpas-ocean/bld/build-namelist @@ -783,6 +783,7 @@ add_default($nl, 'config_frazil_in_open_ocean'); add_default($nl, 'config_frazil_under_land_ice'); add_default($nl, 'config_frazil_heat_of_fusion'); add_default($nl, 'config_frazil_ice_density'); +add_default($nl, 'config_frazil_ice_porosity'); add_default($nl, 'config_frazil_fractional_thickness_limit'); add_default($nl, 'config_specific_heat_sea_water'); add_default($nl, 'config_frazil_maximum_depth'); diff --git a/components/mpas-ocean/bld/build-namelist-section b/components/mpas-ocean/bld/build-namelist-section index c5dad5d935a9..af6209e0771f 100644 --- a/components/mpas-ocean/bld/build-namelist-section +++ b/components/mpas-ocean/bld/build-namelist-section @@ -291,6 +291,7 @@ add_default($nl, 'config_frazil_in_open_ocean'); add_default($nl, 'config_frazil_under_land_ice'); add_default($nl, 'config_frazil_heat_of_fusion'); add_default($nl, 'config_frazil_ice_density'); +add_default($nl, 'config_frazil_ice_porosity'); add_default($nl, 'config_frazil_fractional_thickness_limit'); add_default($nl, 'config_specific_heat_sea_water'); add_default($nl, 'config_frazil_maximum_depth'); diff --git a/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml index 4f9b5d8fe4d3..9a57d6c287a8 100644 --- a/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml +++ b/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml @@ -394,6 +394,7 @@ .true. 3.337e5 1000.0 +0.85 0.1 3.996e3 100.0 diff --git a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml index bea1e98d9de8..c69a72c203b5 100644 --- a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml +++ b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml @@ -1539,6 +1539,14 @@ Valid values: Any positive real number. Default: Defined in namelist_defaults.xml + +Assumed porosity of frazil + +Valid values: Any positive real number from 0 to 1. +Default: Defined in namelist_defaults.xml + + maximum fraction of layer thickness than can be used or created at an instant by frazil. diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml index 28b2b25372df..e3965c7e12ee 100644 --- a/components/mpas-ocean/src/Registry.xml +++ b/components/mpas-ocean/src/Registry.xml @@ -984,11 +984,15 @@ + /> + 0.0_RKIND) then newThicknessWeightedSaltContent = sumNewFrazilIceThickness * frazilSalinity if (newThicknessWeightedSaltContent > sumNewThicknessWeightedSaltContent) then From 8f9d90db9c96d57ed4fc10a146cba0e553b9c095 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Fri, 15 Nov 2024 12:28:47 -0600 Subject: [PATCH 4/5] Compute frazil all through the column nonBFB --- .../src/shared/mpas_ocn_frazil_forcing.F | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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 63d4cf9f5679..fefe45ba33a5 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F @@ -493,13 +493,15 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP ! find deepest level where frazil can be created kBottomFrazil=maxLevelCell(iCell) - do k=maxLevelCell(iCell), minLevelCell(iCell), -1 + !do k=maxLevelCell(iCell), minLevelCell(iCell), -1 ! add the ssh so frazil can form below land ice, where the ssh is depressed - if (-zMid(k,iCell) < -ssh(iCell) + config_frazil_maximum_depth) then - kBottomFrazil=k - exit - endif - enddo + ! if (-zMid(k,iCell) < -ssh(iCell) + config_frazil_maximum_depth) then + ! kBottomFrazil=k + ! exit + ! endif + !enddo + !NJ: Compute frazil all through the column + kBottomFrazil=maxLevelCell(iCell) ! find minimum temperature between 1:kBottomFrazil columnTemperatureMin = 1.0e30_RKIND From ac5fe3eff59a163d13a324fb2acb409bb5cdaef9 Mon Sep 17 00:00:00 2001 From: Nicole Jeffery Date: Thu, 21 Nov 2024 12:53:36 -0600 Subject: [PATCH 5/5] Removes forced compute of frazil throughout the entire column Depth of maximum frazil determined by config_frazil_maximum_depth Uses config_frazil_ice_porosity to compute internal frazil salinity nonBFB --- .../src/shared/mpas_ocn_frazil_forcing.F | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 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 fefe45ba33a5..2ddd81bf930f 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_frazil_forcing.F @@ -493,15 +493,15 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP ! find deepest level where frazil can be created kBottomFrazil=maxLevelCell(iCell) - !do k=maxLevelCell(iCell), minLevelCell(iCell), -1 - ! add the ssh so frazil can form below land ice, where the ssh is depressed - ! if (-zMid(k,iCell) < -ssh(iCell) + config_frazil_maximum_depth) then - ! kBottomFrazil=k - ! exit - ! endif - !enddo + do k=maxLevelCell(iCell), minLevelCell(iCell), -1 + ! add the ssh so frazil can form below land ice, where the ssh is depressed + if (-zMid(k,iCell) < -ssh(iCell) + config_frazil_maximum_depth) then + kBottomFrazil=k + exit + endif + enddo !NJ: Compute frazil all through the column - kBottomFrazil=maxLevelCell(iCell) + !kBottomFrazil=max(maxLevelCell(iCell)-1,kBottomFrazil) ! find minimum temperature between 1:kBottomFrazil columnTemperatureMin = 1.0e30_RKIND @@ -622,7 +622,7 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP accumulatedFrazilIceMassNew(iCell) = accumulatedFrazilIceMassOld(iCell) + sumNewFrazilIceThickness & * config_frazil_ice_density - !NJ: Assumed frazil salinity in coupling with sea ice + !NJ: Assume frazil salinity is the coupling salinity if ( underLandIce ) then ! accumulate frazil formed under land ice in case we're not coupling and we need to keep track of it ! for freshwater budgets @@ -638,11 +638,11 @@ subroutine ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, stateP if (sumNewFrazilIceThickness > 0.0_RKIND) then newThicknessWeightedSaltContent = sumNewFrazilIceThickness * frazilSalinity if (newThicknessWeightedSaltContent > sumNewThicknessWeightedSaltContent) then + !NJ: Warning: salt conservation error. Track with lowSalinityFrazilIce lowSalinityFrazilIce(iCell) = newThicknessWeightedSaltContent - sumNewThicknessWeightedSaltContent - ! Warning: May lead to a salt conservation error accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + max(0.0_RKIND, sumNewThicknessWeightedSaltContent) else - ! salt expelled at the surface + !NJ: salt expelled at the surface frazilSalinityTendency(minLevelCell(iCell),iCell) = frazilSalinityTendency(minLevelCell(iCell),iCell) + & max(0.0_RKIND,(sumNewThicknessWeightedSaltContent - newThicknessWeightedSaltContent) ) / dt accumulatedFrazilIceSalinityNew(iCell) = accumulatedFrazilIceSalinityOld(iCell) + newThicknessWeightedSaltContent