diff --git a/components/mpas-ocean/driver/mpaso_cpl_indices.F b/components/mpas-ocean/driver/mpaso_cpl_indices.F
index 968a4090fe4a..f099cf8ea46a 100644
--- a/components/mpas-ocean/driver/mpaso_cpl_indices.F
+++ b/components/mpas-ocean/driver/mpaso_cpl_indices.F
@@ -17,12 +17,18 @@ module mpaso_cpl_indices
integer :: index_o2x_So_dhdx
integer :: index_o2x_So_dhdy
integer :: index_o2x_Fioo_q
+ integer :: index_o2x_Foxo_q_li
integer :: index_o2x_Fioo_frazil
+ integer :: index_o2x_Foxo_frazil_li
integer :: index_o2x_Faoo_h2otemp
integer :: index_o2x_Faoo_fco2_ocn
integer :: index_o2x_Faoo_fdms_ocn
integer :: index_o2x_So_ssh
-
+ integer :: index_o2x_Foxo_ismw
+ integer :: index_o2x_Foxo_rrofl
+ integer :: index_o2x_Foxo_rrofi
+ integer :: index_o2x_Foxo_ismh
+ integer :: index_o2x_Foxo_rrofih
! ocn -> drv for calculation of ocean-ice sheet interactions
@@ -182,12 +188,21 @@ subroutine mpaso_cpl_indices_set( )
index_o2x_So_dhdx = mct_avect_indexra(o2x,'So_dhdx')
index_o2x_So_dhdy = mct_avect_indexra(o2x,'So_dhdy')
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_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')
index_o2x_Faoo_fdms_ocn = mct_avect_indexra(o2x,'Faoo_fdms_ocn',perrWith='quiet')
index_o2x_So_ssh = mct_avect_indexra(o2x,'So_ssh')
+ index_o2x_Foxo_ismw = mct_avect_indexra(o2x,'Foxo_ismw',perrWith='quiet')
+ index_o2x_Foxo_rrofl = mct_avect_indexra(o2x,'Foxo_rrofl',perrWith='quiet')
+ index_o2x_Foxo_rrofi = mct_avect_indexra(o2x,'Foxo_rrofi',perrWith='quiet')
+
+ index_o2x_Foxo_ismh = mct_avect_indexra(o2x,'Foxo_ismh',perrWith='quiet')
+ index_o2x_Foxo_rrofih = mct_avect_indexra(o2x,'Foxo_rrofih',perrWith='quiet')
+
index_o2x_So_blt = mct_avect_indexra(o2x,'So_blt')
index_o2x_So_bls = mct_avect_indexra(o2x,'So_bls')
index_o2x_So_htv = mct_avect_indexra(o2x,'So_htv')
diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F
index ec02127f7cab..0097ac3f302a 100644
--- a/components/mpas-ocean/driver/ocn_comp_mct.F
+++ b/components/mpas-ocean/driver/ocn_comp_mct.F
@@ -2700,7 +2700,12 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{
avgOceanSurfaceDOCSemiLabile, &
avgOceanSurfaceFeParticulate, &
avgOceanSurfaceFeDissolved, &
- ssh
+ ssh, &
+ avgLandIceFreshwaterFlux, &
+ avgRemovedRiverRunoffFlux, &
+ avgRemovedIceRunoffFlux, &
+ avgLandIceHeatFlux, &
+ avgRemovedIceRunoffHeatFlux
real (kind=RKIND), dimension(:,:), pointer :: avgTracersSurfaceValue, avgSurfaceVelocity, &
avgSSHGradient, avgOceanSurfacePhytoC, &
@@ -2709,6 +2714,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{
real (kind=RKIND) :: surfaceFreezingTemp
logical, pointer :: frazilIceActive, &
+ config_remove_AIS_coupler_runoff, &
config_use_ecosysTracers, &
config_use_DMSTracers, &
config_use_MacroMoleculesTracers, &
@@ -2725,6 +2731,7 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{
call mpas_pool_get_package(domain % packages, 'frazilIceActive', frazilIceActive)
call mpas_pool_get_config(domain % configs, 'config_use_ecosysTracers', config_use_ecosysTracers)
call mpas_pool_get_config(domain % configs, 'config_land_ice_flux_mode', config_land_ice_flux_mode)
+ call mpas_pool_get_config(domain % configs, 'config_remove_AIS_coupler_runoff', config_remove_AIS_coupler_runoff)
call mpas_pool_get_config(domain % configs, 'config_use_DMSTracers', config_use_DMSTracers)
call mpas_pool_get_config(domain % configs, 'config_use_MacroMoleculesTracers', config_use_MacroMoleculesTracers)
call mpas_pool_get_config(domain % configs, 'config_use_ecosysTracers_sea_ice_coupling', &
@@ -2767,6 +2774,17 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{
call mpas_pool_get_array(statePool, 'accumulatedFrazilIceMass', accumulatedFrazilIceMass, 1)
end if
+ ! Cryo fields
+ if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ call mpas_pool_get_array(forcingPool, 'avgLandIceFreshwaterFlux', avgLandIceFreshwaterFlux)
+ call mpas_pool_get_array(forcingPool, 'avgLandIceHeatFlux', avgLandIceHeatFlux)
+ endif
+ if (config_remove_AIS_coupler_runoff) then
+ call mpas_pool_get_array(forcingPool, 'avgRemovedRiverRunoffFlux', avgRemovedRiverRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffFlux', avgRemovedIceRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffHeatFlux', avgRemovedIceRunoffHeatFlux)
+ endif
+
! BGC fields
if (config_use_ecosysTracers) then
@@ -2818,6 +2836,17 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{
o2x_o % rAttr(index_o2x_Faoo_h2otemp, n) = avgTotalFreshWaterTemperatureFlux(i) * rho_sw * cp_sw
+ ! Cryo fields
+ if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ o2x_o % rAttr(index_o2x_Foxo_ismw, n) = avgLandIceFreshwaterFlux(i)
+ o2x_o % rAttr(index_o2x_Foxo_ismh, n) = avgLandIceHeatFlux(i)
+ endif
+ if (config_remove_AIS_coupler_runoff) then
+ o2x_o % rAttr(index_o2x_Foxo_rrofl, n) = avgRemovedRiverRunoffFlux(i)
+ o2x_o % rAttr(index_o2x_Foxo_rrofi, n) = avgRemovedIceRunoffFlux(i)
+ o2x_o % rAttr(index_o2x_Foxo_rrofih, n) = avgRemovedIceRunoffHeatFlux(i)
+ endif
+
if ( frazilIceActive ) then
! negative when frazil ice can be melted
keepFrazil = .true.
@@ -2853,6 +2882,10 @@ subroutine ocn_export_mct(o2x_o, errorCode) !{{{
o2x_o % rAttr(index_o2x_Fioo_q, n) = 0.0_RKIND
o2x_o % rAttr(index_o2x_Fioo_frazil, n) = 0.0_RKIND
+ if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ o2x_o % rAttr(index_o2x_Foxo_q_li, n) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion / ocn_cpl_dt
+ o2x_o % rAttr(index_o2x_Foxo_frazil_li, n) = accumulatedFrazilIceMass(i) / ocn_cpl_dt
+ endif
end if
@@ -3981,7 +4014,12 @@ subroutine ocn_export_moab(EClock) !{{{
avgOceanSurfaceDOCSemiLabile, &
avgOceanSurfaceFeParticulate, &
avgOceanSurfaceFeDissolved, &
- ssh
+ ssh, &
+ avgLandIceFreshwaterFlux, &
+ avgRemovedRiverRunoffFlux, &
+ avgRemovedIceRunoffFlux, &
+ avgLandIceHeatFlux, &
+ avgRemovedIceRunoffHeatFlux
real (kind=RKIND), dimension(:,:), pointer :: avgTracersSurfaceValue, avgSurfaceVelocity, &
avgSSHGradient, avgOceanSurfacePhytoC, &
@@ -3990,6 +4028,7 @@ subroutine ocn_export_moab(EClock) !{{{
real (kind=RKIND) :: surfaceFreezingTemp
logical, pointer :: frazilIceActive, &
+ config_remove_AIS_coupler_runoff, &
config_use_ecosysTracers, &
config_use_DMSTracers, &
config_use_MacroMoleculesTracers, &
@@ -4006,6 +4045,7 @@ subroutine ocn_export_moab(EClock) !{{{
call mpas_pool_get_package(domain % packages, 'frazilIceActive', frazilIceActive)
call mpas_pool_get_config(domain % configs, 'config_use_ecosysTracers', config_use_ecosysTracers)
call mpas_pool_get_config(domain % configs, 'config_land_ice_flux_mode', config_land_ice_flux_mode)
+ call mpas_pool_get_config(domain % configs, 'config_remove_AIS_coupler_runoff', config_remove_AIS_coupler_runoff)
call mpas_pool_get_config(domain % configs, 'config_use_DMSTracers', config_use_DMSTracers)
call mpas_pool_get_config(domain % configs, 'config_use_MacroMoleculesTracers', config_use_MacroMoleculesTracers)
call mpas_pool_get_config(domain % configs, 'config_use_ecosysTracers_sea_ice_coupling', &
@@ -4047,6 +4087,16 @@ subroutine ocn_export_moab(EClock) !{{{
call mpas_pool_get_array(forcingPool, 'frazilSurfacePressure', frazilSurfacePressure)
call mpas_pool_get_array(statePool, 'accumulatedFrazilIceMass', accumulatedFrazilIceMass, 1)
end if
+
+ if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ call mpas_pool_get_array(forcingPool, 'avgLandIceFreshwaterFlux', avgLandIceFreshwaterFlux)
+ call mpas_pool_get_array(forcingPool, 'avgLandIceHeatFlux', avgLandIceHeatFlux)
+ endif
+ if (config_remove_AIS_coupler_runoff) then
+ call mpas_pool_get_array(forcingPool, 'avgRemovedRiverRunoffFlux', avgRemovedRiverRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffFlux', avgRemovedIceRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffHeatFlux', avgRemovedIceRunoffHeatFlux)
+ endif
! BGC fields
if (config_use_ecosysTracers) then
@@ -4098,7 +4148,17 @@ subroutine ocn_export_moab(EClock) !{{{
o2x_om(n, index_o2x_So_dhdy) = avgSSHGradient(index_avgMeridionalSSHGradient, i)
o2x_om(n, index_o2x_Faoo_h2otemp) = avgTotalFreshWaterTemperatureFlux(i) * rho_sw * cp_sw
-
+
+ if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ o2x_om(n, index_o2x_Foxo_ismw) = avgLandIceFreshwaterFlux(i)
+ o2x_om(n, index_o2x_Foxo_ismh) = avgLandIceHeatFlux(i)
+ endif
+ if (config_remove_AIS_coupler_runoff) then
+ o2x_om(n, index_o2x_Foxo_rrofl) = avgRemovedRiverRunoffFlux(i)
+ o2x_om(n, index_o2x_Foxo_rrofi) = avgRemovedIceRunoffFlux(i)
+ o2x_om(n, index_o2x_Foxo_rrofih) = avgRemovedIceRunoffHeatFlux(i)
+ endif
+
if ( frazilIceActive ) then
! negative when frazil ice can be melted
keepFrazil = .true.
@@ -4134,7 +4194,10 @@ subroutine ocn_export_moab(EClock) !{{{
o2x_om(n, index_o2x_Fioo_q) = 0.0_RKIND
o2x_om(n, index_o2x_Fioo_frazil) = 0.0_RKIND
-
+ if (trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ o2x_om(n, index_o2x_Foxo_q_li) = accumulatedFrazilIceMass(i) * config_frazil_heat_of_fusion / ocn_cpl_dt
+ o2x_om(n, index_o2x_Foxo_frazil_li) = accumulatedFrazilIceMass(i) / ocn_cpl_dt
+ endif
end if
! Reset SeaIce Energy and Accumulated Frazil Ice
diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml
index f8b56c083d44..a953b64d8f8e 100644
--- a/components/mpas-ocean/src/Registry.xml
+++ b/components/mpas-ocean/src/Registry.xml
@@ -3608,6 +3608,7 @@
packages="activeTracersBulkRestoringPKG;thicknessBulkPKG"
/>
+
+
+
+
+
+
-
@@ -305,7 +302,6 @@
-
@@ -362,7 +358,6 @@
-
diff --git a/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F b/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F
index a4f2a0b7ab5d..bdd07e799b5d 100644
--- a/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F
+++ b/components/mpas-ocean/src/analysis_members/mpas_ocn_conservation_check.F
@@ -598,16 +598,14 @@ subroutine energy_conservation(domain, err)
enddo
end if
- if (landIceFreshwaterFluxesOn &
- .and.config_use_frazil_ice_formation &
- .and.config_frazil_under_land_ice) then
+ if (config_use_frazil_ice_formation .and. config_frazil_under_land_ice) then
call mpas_pool_get_array(statePool, 'accumulatedLandIceFrazilMass', accumulatedLandIceFrazilMassOld, 1)
call mpas_pool_get_array(statePool, 'accumulatedLandIceFrazilMass', accumulatedLandIceFrazilMassNew, 2)
do iCell = 1, nCellsSolve
! Frazil ice mass is negative. Negative coefficient makes heat
! flux positive, because freezing ice releases heat.
sumArray(18) = sumArray(18) - areaCell(iCell) * config_frazil_heat_of_fusion &
- * (accumulatedLandIceFrazilMassNew(iCell) - accumulatedLandIceFrazilMassOld(iCell))
+ * (accumulatedLandIceFrazilMassNew(iCell) - accumulatedLandIceFrazilMassOld(iCell))/dt
enddo
end if
@@ -748,9 +746,7 @@ subroutine energy_conservation(domain, err)
if (landIceFreshwaterFluxesOn) then
v=accumulatedLandIceHeatFlux ; write(m,"('landIceHeatFlux ',es16.8,' ',f16.8)") v,v/A; call mpas_log_write(m); s=s+v
end if
- if (landIceFreshwaterFluxesOn &
- .and.config_use_frazil_ice_formation &
- .and.config_frazil_under_land_ice) then
+ if (config_use_frazil_ice_formation .and. config_frazil_under_land_ice) then
v=accumulatedLandIceFrazilHeatFlux ; write(m,"(' landIceFrazilHeatFlux ',es16.8,' (already in hfreeze, do not sum )',f16.8)") v,v/A; call mpas_log_write(m); ! no sum: s=s+v
end if
write(m,"('SUM EXPLICIT HEAT FLUXES ',es16.8,' ',f16.8)") s, s/A; call mpas_log_write(m)
@@ -976,9 +972,7 @@ subroutine mass_conservation(domain, err)
enddo
end if
- if (landIceFreshwaterFluxesOn &
- .and.config_use_frazil_ice_formation &
- .and.config_frazil_under_land_ice) then
+ if (config_use_frazil_ice_formation .and. config_frazil_under_land_ice) then
call mpas_pool_get_array(statePool, 'accumulatedLandIceFrazilMass', accumulatedLandIceFrazilMassOld, 1)
call mpas_pool_get_array(statePool, 'accumulatedLandIceFrazilMass', accumulatedLandIceFrazilMassNew, 2)
do iCell = 1, nCellsSolve
@@ -1101,9 +1095,7 @@ subroutine mass_conservation(domain, err)
write(m,"(' SUM: ice runoff ',es16.8,' x2o_Foxx_rofi wfrzrof SUM ',f16.8)") v,v*c; call mpas_log_write(m)
v=accumulatedLandIceFlux ; write(m,"('landIceFreshwaterFlux ',es16.8,' ',f16.8)") v,v*c; call mpas_log_write(m); s=s+v
endif
- if (landIceFreshwaterFluxesOn &
- .and.config_use_frazil_ice_formation &
- .and.config_frazil_under_land_ice) then
+ if (config_use_frazil_ice_formation .and. config_frazil_under_land_ice) then
v=accumulatedLandIceFrazilFlux ; write(m,"(' landIceFrazilFlux ',es16.8,' (already in wfreeze, do not sum )',f16.8)") v,v*c; call mpas_log_write(m); ! no sum: s=s+v
endif
write(m,"('SUM VOLUME FLUXES ',es16.8,' ',f16.8,es16.8)") s, s*c; call mpas_log_write(m)
@@ -1170,8 +1162,8 @@ subroutine salt_conservation(domain, err)
real(kind=RKIND), pointer :: &
accumulatedSeaIceSalinityFlux, &
- accumulatedFrazilSalinityFlux, &
- accumulatedLandIceFrazilSalinityFlux
+ accumulatedFrazilSalinityFlux
+ ! accumulatedLandIceFrazilSalinityFlux is not present because it is always 0
real(kind=RKIND), dimension(:), allocatable :: &
sumArray, &
@@ -1217,7 +1209,6 @@ subroutine salt_conservation(domain, err)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedSeaIceSalinityFlux", accumulatedSeaIceSalinityFlux)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedFrazilSalinityFlux", accumulatedFrazilSalinityFlux)
- call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedLandIceFrazilSalinityFlux", accumulatedLandIceFrazilSalinityFlux)
!-------------------------------------------------------------
! Net salt flux to ice
@@ -1258,14 +1249,10 @@ subroutine salt_conservation(domain, err)
enddo
end if
- if (landIceFreshwaterFluxesOn &
- .and.config_use_frazil_ice_formation &
- .and.config_frazil_under_land_ice) then
- call mpas_pool_get_array(statePool, 'accumulatedLandIceFrazilMass', accumulatedLandIceFrazilMassOld, 1)
- call mpas_pool_get_array(statePool, 'accumulatedLandIceFrazilMass', accumulatedLandIceFrazilMassNew, 2)
+ if (config_use_frazil_ice_formation .and. config_frazil_under_land_ice) then
+ ! Land ice frazil salinity is always 0
do iCell = 1, nCellsSolve
- sumArray(3) = sumArray(3) + areaCell(iCell) &
- * (accumulatedLandIceFrazilMassNew(iCell) - accumulatedLandIceFrazilMassOld(iCell))/dt
+ sumArray(3) = sumArray(3) + 0.0_RKIND
enddo
end if
@@ -1278,7 +1265,6 @@ subroutine salt_conservation(domain, err)
! accumulate fluxes
accumulatedSeaIceSalinityFlux = accumulatedSeaIceSalinityFlux + sumArrayOut(1)
accumulatedFrazilSalinityFlux = accumulatedFrazilSalinityFlux + sumArrayOut(2)
- accumulatedLandIceFrazilSalinityFlux = accumulatedLandIceFrazilSalinityFlux + sumArrayOut(3)
! cleanup
deallocate(sumArray)
@@ -1295,7 +1281,6 @@ subroutine salt_conservation(domain, err)
! Average the fluxes
accumulatedSeaIceSalinityFlux = accumulatedSeaIceSalinityFlux /accumulatedFluxCounter
accumulatedFrazilSalinityFlux = accumulatedFrazilSalinityFlux /accumulatedFluxCounter
- accumulatedLandIceFrazilSalinityFlux = accumulatedLandIceFrazilSalinityFlux /accumulatedFluxCounter
! get initial salt content
call MPAS_pool_get_array(conservationCheckSaltAMPool, "initialSalt", initialSalt)
@@ -1312,8 +1297,7 @@ subroutine salt_conservation(domain, err)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "netSaltFlux", netSaltFlux)
netSaltFlux = accumulatedSeaIceSalinityFlux &
- + accumulatedFrazilSalinityFlux &
- + accumulatedLandIceFrazilSalinityFlux
+ + accumulatedFrazilSalinityFlux
! compute the final salt error
call MPAS_pool_get_array(conservationCheckSaltAMPool, "absoluteSaltError", absoluteSaltError)
@@ -1341,7 +1325,7 @@ subroutine salt_conservation(domain, err)
if (landIceFreshwaterFluxesOn &
.and.config_use_frazil_ice_formation &
.and.config_frazil_under_land_ice) then
-v=accumulatedLandIceFrazilSalinityFlux; write(m,"('LandIceFrazilSalinityFlux',es16.8,' (already in wmelt, do not sum) ',f16.8)") v,v*c; call mpas_log_write(m); !no sum: s=s+v
+v=0; write(m,"('LandIceFrazilSalinityFlux',es16.8,' (already in wmelt, do not sum) ',f16.8)") v,v*c; call mpas_log_write(m); !no sum: s=s+v
end if
write(m,"('SUM VOLUME FLUXES ',es16.8,' ',f16.8,es16.8)") s, s*c; call mpas_log_write(m)
@@ -2266,8 +2250,7 @@ subroutine reset_accumulated_variables(domain)
real(kind=RKIND), pointer :: &
accumulatedSeaIceSalinityFlux, &
- accumulatedFrazilSalinityFlux, &
- accumulatedLandIceFrazilSalinityFlux
+ accumulatedFrazilSalinityFlux
real(kind=RKIND), pointer :: &
accumulatedCarbonSourceSink, &
@@ -2353,11 +2336,9 @@ subroutine reset_accumulated_variables(domain)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedSeaIceSalinityFlux", accumulatedSeaIceSalinityFlux)
call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedFrazilSalinityFlux", accumulatedFrazilSalinityFlux)
- call MPAS_pool_get_array(conservationCheckSaltAMPool, "accumulatedLandIceFrazilSalinityFlux", accumulatedLandIceFrazilSalinityFlux)
accumulatedSeaIceSalinityFlux = 0.0_RKIND
accumulatedFrazilSalinityFlux = 0.0_RKIND
- accumulatedLandIceFrazilSalinityFlux = 0.0_RKIND
call MPAS_pool_get_subpool(domain % blocklist % structs, "conservationCheckCarbonAM", conservationCheckCarbonAMPool)
@@ -2432,7 +2413,8 @@ subroutine ocn_restart_conservation_check(domain, err)!{{{
err = 0
if ( trim(config_land_ice_flux_mode) == 'standalone' .or. &
- trim(config_land_ice_flux_mode) == 'coupled' ) then
+ trim(config_land_ice_flux_mode) == 'coupled' .or. &
+ trim(config_land_ice_flux_mode) == 'data' ) then
landIceFreshwaterFluxesOn = .true.
end if
diff --git a/components/mpas-ocean/src/shared/mpas_ocn_time_average_coupled.F b/components/mpas-ocean/src/shared/mpas_ocn_time_average_coupled.F
index b796c56fa1a6..751c547d95bd 100644
--- a/components/mpas-ocean/src/shared/mpas_ocn_time_average_coupled.F
+++ b/components/mpas-ocean/src/shared/mpas_ocn_time_average_coupled.F
@@ -53,7 +53,10 @@ subroutine ocn_time_average_coupled_init(forcingPool)!{{{
real (kind=RKIND), dimension(:,:), pointer :: avgTracersSurfaceValue, avgSurfaceVelocity, avgSSHGradient, &
avgLandIceBoundaryLayerTracers, avgLandIceTracerTransferVelocities
- real (kind=RKIND), dimension(:), pointer :: avgEffectiveDensityInLandIce, avgTotalFreshWaterTemperatureFlux
+ real (kind=RKIND), dimension(:), pointer :: avgEffectiveDensityInLandIce, avgTotalFreshWaterTemperatureFlux, &
+ avgLandIceFreshwaterFlux, &
+ avgRemovedRiverRunoffFlux, avgRemovedIceRunoffFlux, &
+ avgLandIceHeatFlux, avgRemovedIceRunoffHeatFlux
integer :: iCell
integer, pointer :: nAccumulatedCoupled, nCells
@@ -116,6 +119,37 @@ subroutine ocn_time_average_coupled_init(forcingPool)!{{{
!$omp end parallel
end if
+ ! Set up polar fields if necessary
+ if(trim(config_land_ice_flux_mode)=='standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ call mpas_pool_get_array(forcingPool, 'avgLandIceFreshwaterFlux', avgLandIceFreshwaterFlux)
+ call mpas_pool_get_array(forcingPool, 'avgLandIceHeatFlux', avgLandIceHeatFlux)
+
+ !$omp parallel
+ !$omp do schedule(runtime)
+ do iCell = 1, nCells
+ avgLandIceFreshwaterFlux(iCell) = 0.0_RKIND
+ avgLandIceHeatFlux(iCell) = 0.0_RKIND
+ end do
+ !$omp end do
+ !$omp end parallel
+ end if
+
+ if(config_remove_AIS_coupler_runoff) then
+ call mpas_pool_get_array(forcingPool, 'avgRemovedRiverRunoffFlux', avgRemovedRiverRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffFlux', avgRemovedIceRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffHeatFlux', avgRemovedIceRunoffHeatFlux)
+
+ !$omp parallel
+ !$omp do schedule(runtime)
+ do iCell = 1, nCells
+ avgRemovedRiverRunoffFlux(iCell) = 0.0_RKIND
+ avgRemovedIceRunoffFlux(iCell) = 0.0_RKIND
+ avgRemovedIceRunoffHeatFlux(iCell) = 0.0_RKIND
+ end do
+ !$omp end do
+ !$omp end parallel
+ end if
+
! set up BGC coupling fields if necessary
if (config_use_ecosysTracers) then
@@ -201,6 +235,9 @@ end subroutine ocn_time_average_coupled_init!}}}
!
!-----------------------------------------------------------------------
subroutine ocn_time_average_coupled_accumulate(statePool, forcingPool, timeLevel)!{{{
+ use ocn_constants, only: &
+ latent_heat_fusion_mks
+
type (mpas_pool_type), intent(in) :: statePool
type (mpas_pool_type), intent(inout) :: forcingPool
integer, intent(in) :: timeLevel
@@ -215,7 +252,12 @@ subroutine ocn_time_average_coupled_accumulate(statePool, forcingPool, timeLevel
real (kind=RKIND), dimension(:,:), pointer :: &
avgLandIceBoundaryLayerTracers, avgLandIceTracerTransferVelocities
real (kind=RKIND), dimension(:), pointer :: effectiveDensityInLandIce, avgEffectiveDensityInLandIce, &
- totalFreshWaterTemperatureFlux, avgTotalFreshWaterTemperatureFlux
+ totalFreshWaterTemperatureFlux, avgTotalFreshWaterTemperatureFlux, &
+ landIceFreshwaterFlux, avgLandIceFreshwaterFlux, &
+ landIceHeatFlux, avgLandIceHeatFlux, &
+ removedRiverRunoffFlux, avgRemovedRiverRunoffFlux, &
+ removedIceRunoffFlux, avgRemovedIceRunoffFlux, &
+ avgRemovedIceRunoffHeatFlux
type (mpas_pool_type), pointer :: tracersPool
@@ -311,6 +353,48 @@ subroutine ocn_time_average_coupled_accumulate(statePool, forcingPool, timeLevel
!$omp end parallel
end if
+ ! Accumulate polar fields if necessary
+ if(trim(config_land_ice_flux_mode) == 'standalone' .or. trim(config_land_ice_flux_mode) == 'data') then
+ call mpas_pool_get_array(forcingPool, 'avgLandIceFreshwaterFlux', avgLandIceFreshwaterFlux)
+ call mpas_pool_get_array(forcingPool, 'landIceFreshwaterFlux', landIceFreshwaterFlux)
+ call mpas_pool_get_array(forcingPool, 'avgLandIceHeatFlux', avgLandIceHeatFlux)
+ call mpas_pool_get_array(forcingPool, 'landIceHeatFlux', landIceHeatFlux)
+
+ !$omp parallel
+ !$omp do schedule(runtime)
+ do iCell = 1, nCells
+ avgLandIceFreshwaterFlux(iCell) = ( avgLandIceFreshwaterFlux(iCell) * nAccumulatedCoupled &
+ + landIceFreshwaterFlux(iCell) ) / ( nAccumulatedCoupled + 1)
+ avgLandIceHeatFlux(iCell) = ( avgLandIceHeatFlux(iCell) * nAccumulatedCoupled &
+ + landIceHeatFlux(iCell) ) / ( nAccumulatedCoupled + 1)
+ end do
+ !$omp end do
+ !$omp end parallel
+
+ end if
+
+ if (config_remove_AIS_coupler_runoff) then
+ call mpas_pool_get_array(forcingPool, 'avgRemovedRiverRunoffFlux', avgRemovedRiverRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffFlux', avgRemovedIceRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'avgRemovedIceRunoffHeatFlux', avgRemovedIceRunoffHeatFlux)
+ call mpas_pool_get_array(forcingPool, 'removedRiverRunoffFlux', removedRiverRunoffFlux)
+ call mpas_pool_get_array(forcingPool, 'removedIceRunoffFlux', removedIceRunoffFlux)
+
+ !$omp parallel
+ !$omp do schedule(runtime)
+ do iCell = 1, nCells
+ avgRemovedRiverRunoffFlux(iCell) = ( avgRemovedRiverRunoffFlux(iCell) * nAccumulatedCoupled &
+ + removedRiverRunoffFlux(iCell) ) / ( nAccumulatedCoupled + 1)
+ avgRemovedIceRunoffFlux(iCell) = ( avgRemovedIceRunoffFlux(iCell) * nAccumulatedCoupled &
+ + removedIceRunoffFlux(iCell) ) / ( nAccumulatedCoupled + 1)
+ avgRemovedIceRunoffHeatFlux(iCell) = ( avgRemovedIceRunoffHeatFlux(iCell) * nAccumulatedCoupled &
+ + removedIceRunoffFlux(iCell)*latent_heat_fusion_mks ) / ( nAccumulatedCoupled + 1)
+ end do
+ !$omp end do
+ !$omp end parallel
+
+ end if
+
! accumulate BGC coupling fields if necessary
if (config_use_ecosysTracers) then
diff --git a/driver-mct/cime_config/buildnml b/driver-mct/cime_config/buildnml
index 426995b8ffb6..4938e9da0b18 100755
--- a/driver-mct/cime_config/buildnml
+++ b/driver-mct/cime_config/buildnml
@@ -40,6 +40,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
config['CPL_ALBAV'] = case.get_value('CPL_ALBAV')
config['CPL_EPBAL'] = case.get_value('CPL_EPBAL')
config['FLDS_WISO'] = case.get_value('FLDS_WISO')
+ config['FLDS_POLAR'] = case.get_value('FLDS_POLAR')
config['BUDGETS'] = case.get_value('BUDGETS')
config['MACH'] = case.get_value('MACH')
config['MPILIB'] = case.get_value('MPILIB')
diff --git a/driver-mct/cime_config/config_component_e3sm.xml b/driver-mct/cime_config/config_component_e3sm.xml
index 5d582b41b438..b7a85c5e2cb7 100755
--- a/driver-mct/cime_config/config_component_e3sm.xml
+++ b/driver-mct/cime_config/config_component_e3sm.xml
@@ -172,6 +172,20 @@
Turn on the passing of water isotope fields through the coupler
+
+ logical
+ TRUE,FALSE
+ FALSE
+
+ TRUE
+ TRUE
+ TRUE
+
+ run_flags
+ env_run.xml
+ Turn on the passing of polar fields through the coupler
+
+
char
minus1p8,linear_salt,mushy
diff --git a/driver-mct/cime_config/namelist_definition_drv.xml b/driver-mct/cime_config/namelist_definition_drv.xml
index 038444efa94e..7fbf83688c8a 100644
--- a/driver-mct/cime_config/namelist_definition_drv.xml
+++ b/driver-mct/cime_config/namelist_definition_drv.xml
@@ -137,6 +137,18 @@
+
+ logical
+ seq_flds
+ seq_cplflds_inparm
+
+ If set to .true. Polar fields will be passed from the ocean to the coupler.
+
+
+ $FLDS_POLAR
+
+
+
logical
seq_flds
diff --git a/driver-mct/main/seq_diag_mct.F90 b/driver-mct/main/seq_diag_mct.F90
index 2a7d999ccc5e..8534008f9be7 100644
--- a/driver-mct/main/seq_diag_mct.F90
+++ b/driver-mct/main/seq_diag_mct.F90
@@ -138,13 +138,13 @@ module seq_diag_mct
integer(in),parameter :: f_hlatf = 8 ! heat : latent, fusion, snow
integer(in),parameter :: f_hioff = 9 ! heat : latent, fusion, frozen runoff
integer(in),parameter :: f_hsen =10 ! heat : sensible
- integer(in),parameter :: f_hberg =11 ! heat : data icebergs
+ integer(in),parameter :: f_hpolar =11 ! heat : AIS imbalance
integer(in),parameter :: f_hh2ot =12 ! heat : water temperature
integer(in),parameter :: f_wfrz =13 ! water: freezing
integer(in),parameter :: f_wmelt =14 ! water: melting
integer(in),parameter :: f_wrain =15 ! water: precip, liquid
integer(in),parameter :: f_wsnow =16 ! water: precip, frozen
- integer(in),parameter :: f_wberg =17 ! water: data icebergs
+ integer(in),parameter :: f_wpolar =17 ! water: AIS imbalance
integer(in),parameter :: f_wevap =18 ! water: evaporation
integer(in),parameter :: f_wroff =19 ! water: runoff/flood
integer(in),parameter :: f_wioff =20 ! water: frozen runoff
@@ -189,8 +189,8 @@ module seq_diag_mct
(/' area',' hfreeze',' hmelt',' hnetsw',' hlwdn', &
' hlwup',' hlatvap',' hlatfus',' hiroff',' hsen', &
- ' hberg',' hh2otemp',' wfreeze',' wmelt',' wrain', &
- ' wsnow',' wberg',' wevap',' wrunoff',' wfrzrof', &
+ ' hpolar',' hh2otemp',' wfreeze',' wmelt',' wrain', &
+ ' wsnow',' wpolar',' wevap',' wrunoff',' wfrzrof', &
' wirrig', &
' wfreeze_16O',' wmelt_16O',' wrain_16O',' wsnow_16O', &
' wevap_16O',' wrunoff_16O',' wfrzrof_16O', &
@@ -286,7 +286,15 @@ module seq_diag_mct
integer :: index_o2x_Faoo_h2otemp
integer :: index_o2x_Fioo_frazil
+ integer :: index_o2x_Foxo_frazil_li
integer :: index_o2x_Fioo_q
+ integer :: index_o2x_Foxo_q_li
+
+ integer :: index_o2x_Foxo_ismw
+ integer :: index_o2x_Foxo_rrofl
+ integer :: index_o2x_Foxo_rrofi
+ integer :: index_o2x_Foxo_ismh
+ integer :: index_o2x_Foxo_rrofih
integer :: index_xao_Faox_lwup
integer :: index_xao_Faox_lat
@@ -311,8 +319,6 @@ module seq_diag_mct
integer :: index_i2x_Fioi_melth
integer :: index_i2x_Fioi_meltw
- integer :: index_i2x_Fioi_bergh
- integer :: index_i2x_Fioi_bergw
integer :: index_i2x_Fioi_salt
integer :: index_i2x_Faii_swnet
integer :: index_i2x_Fioi_swpen
@@ -1337,9 +1343,10 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa
integer(in) :: kArea ! index of area field in aVect
integer(in) :: ko,ki ! fraction indices
integer(in) :: lSize ! size of aVect
- real(r8) :: ca_i,ca_o ! area of a grid cell
+ real(r8) :: ca_i,ca_o,ca_c ! area of a grid cell
logical,save :: first_time = .true.
logical,save :: flds_wiso_ocn = .false.
+ logical,save :: flds_polar = .false.
!----- formats -----
character(*),parameter :: subName = '(seq_diag_ocn_mct) '
@@ -1371,8 +1378,18 @@ 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_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')
index_o2x_Faoo_h2otemp = mct_aVect_indexRA(o2x_o,'Faoo_h2otemp')
+ index_o2x_Foxo_ismw = mct_aVect_indexRA(o2x_o,'Foxo_ismw',perrWith='quiet')
+ if ( index_o2x_Foxo_ismw /= 0 ) flds_polar = .true.
+ if ( flds_polar ) then
+ index_o2x_Foxo_rrofl = mct_aVect_indexRA(o2x_o,'Foxo_rrofl',perrWith='quiet')
+ index_o2x_Foxo_rrofi = mct_aVect_indexRA(o2x_o,'Foxo_rrofi',perrWith='quiet')
+ index_o2x_Foxo_ismh = mct_aVect_indexRA(o2x_o,'Foxo_ismh',perrWith='quiet')
+ index_o2x_Foxo_rrofih = mct_aVect_indexRA(o2x_o,'Foxo_rrofih',perrWith='quiet')
+ end if
end if
lSize = mct_avect_lSize(o2x_o)
@@ -1380,10 +1397,20 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa
do n=1,lSize
ca_o = dom_o%data%rAttr(kArea,n) * frac_o%rAttr(ko,n)
ca_i = dom_o%data%rAttr(kArea,n) * frac_o%rAttr(ki,n)
+ 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))
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)
+ nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismw,n)
+ nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofl,n)
+ nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofi,n)
+ nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_q_li,n)
+ nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismh,n)
+ nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_rrofih,n)
+ end if
end do
end if
@@ -1490,11 +1517,11 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa
nf = f_hmelt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_melth,n)
nf = f_hswnet; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Foxx_swnet,n)
nf = f_hlwdn ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Faxa_lwdn,n)
- nf = f_hberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergh,n)
+ nf = f_hpolar; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergh,n)
nf = f_wmelt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_meltw,n)
nf = f_wrain ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Faxa_rain,n)
nf = f_wsnow ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Faxa_snow,n)
- nf = f_wberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergw,n)
+ 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)
@@ -1613,8 +1640,6 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i)
if (present(do_i2x)) then
index_i2x_Fioi_melth = mct_aVect_indexRA(i2x_i,'Fioi_melth')
index_i2x_Fioi_meltw = mct_aVect_indexRA(i2x_i,'Fioi_meltw')
- index_i2x_Fioi_bergh = mct_aVect_indexRA(i2x_i,'PFioi_bergh')
- index_i2x_Fioi_bergw = mct_aVect_indexRA(i2x_i,'PFioi_bergw')
index_i2x_Fioi_swpen = mct_aVect_indexRA(i2x_i,'Fioi_swpen')
index_i2x_Faii_swnet = mct_aVect_indexRA(i2x_i,'Faii_swnet')
index_i2x_Faii_lwup = mct_aVect_indexRA(i2x_i,'Faii_lwup')
@@ -1650,9 +1675,7 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i)
nf = f_hlwup ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_lwup,n)
nf = f_hlatv ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_lat,n)
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_hberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*i2x_i%rAttr(index_i2x_Fioi_bergh,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_wberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*i2x_i%rAttr(index_i2x_Fioi_bergw,n)
nf = f_wevap ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_evap,n)
if ( flds_wiso_ice )then
diff --git a/driver-mct/shr/seq_flds_mod.F90 b/driver-mct/shr/seq_flds_mod.F90
index 4b37e40b7b3e..dbfba0889d0c 100644
--- a/driver-mct/shr/seq_flds_mod.F90
+++ b/driver-mct/shr/seq_flds_mod.F90
@@ -379,10 +379,11 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
logical :: flds_co2_dmsa
logical :: flds_bgc_oi
logical :: flds_wiso
+ logical :: flds_polar
integer :: glc_nec
namelist /seq_cplflds_inparm/ &
- flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, glc_nec, &
+ flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, flds_polar, glc_nec, &
ice_ncat, seq_flds_i2o_per_cat, flds_bgc_oi, &
nan_check_component_fields, rof_heat, atm_flux_method, atm_gustiness, &
rof2ocn_nutrients, lnd_rof_two_way, ocn_rof_two_way, rof_sed
@@ -416,6 +417,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
flds_co2_dmsa = .false.
flds_bgc_oi = .false.
flds_wiso = .false.
+ flds_polar = .false.
glc_nec = 0
ice_ncat = 1
seq_flds_i2o_per_cat = .false.
@@ -449,6 +451,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call shr_mpi_bcast(flds_co2_dmsa, mpicom)
call shr_mpi_bcast(flds_bgc_oi , mpicom)
call shr_mpi_bcast(flds_wiso , mpicom)
+ call shr_mpi_bcast(flds_polar , mpicom)
call shr_mpi_bcast(glc_nec , mpicom)
call shr_mpi_bcast(ice_ncat , mpicom)
call shr_mpi_bcast(seq_flds_i2o_per_cat, mpicom)
@@ -1583,6 +1586,70 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
attname = 'PFioi_bergw'
call metadata_set(attname, longname, stdname, units)
+ !--------------------------------
+ ! ocn<->cpl only exchange - Polar
+ !--------------------------------
+
+ if (flds_polar) then
+
+ ! Ocean Land ice freeze potential
+ call seq_flds_add(o2x_fluxes,"Foxo_q_li")
+ longname = 'Ocean land ice freeze potential'
+ stdname = 'ice_shelf_cavity_ice_heat_flux'
+ units = 'W m-2'
+ attname = 'Foxo_q_li'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Ocean land ice frazil production
+ call seq_flds_add(o2x_fluxes,"Foxo_frazil_li")
+ longname = 'Ocean land ice frazil production'
+ stdname = 'ocean_land_ice_frazil_ice_production'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_frazil_li'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Water flux from ice shelf melt
+ call seq_flds_add(o2x_fluxes,"Foxo_ismw")
+ longname = 'Water flux due to basal melting of ice shelves'
+ stdname = 'basal_iceshelf_melt_flux'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_ismw'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Heat flux from ice shelf melt
+ call seq_flds_add(o2x_fluxes,"Foxo_ismh")
+ longname = 'Heat flux due to basal melting of ice shelves'
+ stdname = 'basal_iceshelf_heat_flux'
+ units = 'W m-2'
+ attname = 'Foxo_ismh'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Water flux from removed liquid runoff
+ call seq_flds_add(o2x_fluxes,"Foxo_rrofl")
+ longname = 'Water flux due to removed liqiud runoff'
+ stdname = 'removed_liquid_runoff_flux'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_rrofl'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Water flux from removed solid runoff
+ call seq_flds_add(o2x_fluxes,"Foxo_rrofi")
+ longname = 'Water flux due to removed solid runoff'
+ stdname = 'removed_solid_runoff_flux'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_rrofi'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Heat flux from removed solid runoff
+ call seq_flds_add(o2x_fluxes,"Foxo_rrofih")
+ longname = 'Heat flux due to removed solid runoff'
+ stdname = 'removed_solid_runoff_heat_flux'
+ units = 'W m-2'
+ attname = 'Foxo_rrofih'
+ call metadata_set(attname, longname, stdname, units)
+
+ end if
+
! Salt flux
call seq_flds_add(i2x_fluxes,"Fioi_salt")
call seq_flds_add(x2o_fluxes,"Fioi_salt")
diff --git a/driver-moab/cime_config/buildnml b/driver-moab/cime_config/buildnml
index 0d282d402159..cfaa3c63f8bc 100755
--- a/driver-moab/cime_config/buildnml
+++ b/driver-moab/cime_config/buildnml
@@ -40,6 +40,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
config['CPL_ALBAV'] = case.get_value('CPL_ALBAV')
config['CPL_EPBAL'] = case.get_value('CPL_EPBAL')
config['FLDS_WISO'] = case.get_value('FLDS_WISO')
+ config['FLDS_POLAR'] = case.get_value('FLDS_POLAR')
config['BUDGETS'] = case.get_value('BUDGETS')
config['MACH'] = case.get_value('MACH')
config['MPILIB'] = case.get_value('MPILIB')
diff --git a/driver-moab/cime_config/config_component_e3sm.xml b/driver-moab/cime_config/config_component_e3sm.xml
index dd7a5ddb6c15..1d2b6b2e61d6 100644
--- a/driver-moab/cime_config/config_component_e3sm.xml
+++ b/driver-moab/cime_config/config_component_e3sm.xml
@@ -172,6 +172,20 @@
Turn on the passing of water isotope fields through the coupler
+
+ logical
+ TRUE,FALSE
+ FALSE
+
+ TRUE
+ TRUE
+ TRUE
+
+ run_flags
+ env_run.xml
+ Turn on the passing of polar fields through the coupler
+
+
char
minus1p8,linear_salt,mushy
diff --git a/driver-moab/cime_config/namelist_definition_drv.xml b/driver-moab/cime_config/namelist_definition_drv.xml
index 203c6cf5f075..5510783582f9 100644
--- a/driver-moab/cime_config/namelist_definition_drv.xml
+++ b/driver-moab/cime_config/namelist_definition_drv.xml
@@ -149,6 +149,18 @@
+
+ logical
+ seq_flds
+ seq_cplflds_inparm
+
+ If set to .true. Polar fields will be passed from the ocean to the coupler.
+
+
+ $FLDS_POLAR
+
+
+
char
seq_flds
diff --git a/driver-moab/main/seq_diag_mct.F90 b/driver-moab/main/seq_diag_mct.F90
index 2a7d999ccc5e..8534008f9be7 100644
--- a/driver-moab/main/seq_diag_mct.F90
+++ b/driver-moab/main/seq_diag_mct.F90
@@ -138,13 +138,13 @@ module seq_diag_mct
integer(in),parameter :: f_hlatf = 8 ! heat : latent, fusion, snow
integer(in),parameter :: f_hioff = 9 ! heat : latent, fusion, frozen runoff
integer(in),parameter :: f_hsen =10 ! heat : sensible
- integer(in),parameter :: f_hberg =11 ! heat : data icebergs
+ integer(in),parameter :: f_hpolar =11 ! heat : AIS imbalance
integer(in),parameter :: f_hh2ot =12 ! heat : water temperature
integer(in),parameter :: f_wfrz =13 ! water: freezing
integer(in),parameter :: f_wmelt =14 ! water: melting
integer(in),parameter :: f_wrain =15 ! water: precip, liquid
integer(in),parameter :: f_wsnow =16 ! water: precip, frozen
- integer(in),parameter :: f_wberg =17 ! water: data icebergs
+ integer(in),parameter :: f_wpolar =17 ! water: AIS imbalance
integer(in),parameter :: f_wevap =18 ! water: evaporation
integer(in),parameter :: f_wroff =19 ! water: runoff/flood
integer(in),parameter :: f_wioff =20 ! water: frozen runoff
@@ -189,8 +189,8 @@ module seq_diag_mct
(/' area',' hfreeze',' hmelt',' hnetsw',' hlwdn', &
' hlwup',' hlatvap',' hlatfus',' hiroff',' hsen', &
- ' hberg',' hh2otemp',' wfreeze',' wmelt',' wrain', &
- ' wsnow',' wberg',' wevap',' wrunoff',' wfrzrof', &
+ ' hpolar',' hh2otemp',' wfreeze',' wmelt',' wrain', &
+ ' wsnow',' wpolar',' wevap',' wrunoff',' wfrzrof', &
' wirrig', &
' wfreeze_16O',' wmelt_16O',' wrain_16O',' wsnow_16O', &
' wevap_16O',' wrunoff_16O',' wfrzrof_16O', &
@@ -286,7 +286,15 @@ module seq_diag_mct
integer :: index_o2x_Faoo_h2otemp
integer :: index_o2x_Fioo_frazil
+ integer :: index_o2x_Foxo_frazil_li
integer :: index_o2x_Fioo_q
+ integer :: index_o2x_Foxo_q_li
+
+ integer :: index_o2x_Foxo_ismw
+ integer :: index_o2x_Foxo_rrofl
+ integer :: index_o2x_Foxo_rrofi
+ integer :: index_o2x_Foxo_ismh
+ integer :: index_o2x_Foxo_rrofih
integer :: index_xao_Faox_lwup
integer :: index_xao_Faox_lat
@@ -311,8 +319,6 @@ module seq_diag_mct
integer :: index_i2x_Fioi_melth
integer :: index_i2x_Fioi_meltw
- integer :: index_i2x_Fioi_bergh
- integer :: index_i2x_Fioi_bergw
integer :: index_i2x_Fioi_salt
integer :: index_i2x_Faii_swnet
integer :: index_i2x_Fioi_swpen
@@ -1337,9 +1343,10 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa
integer(in) :: kArea ! index of area field in aVect
integer(in) :: ko,ki ! fraction indices
integer(in) :: lSize ! size of aVect
- real(r8) :: ca_i,ca_o ! area of a grid cell
+ real(r8) :: ca_i,ca_o,ca_c ! area of a grid cell
logical,save :: first_time = .true.
logical,save :: flds_wiso_ocn = .false.
+ logical,save :: flds_polar = .false.
!----- formats -----
character(*),parameter :: subName = '(seq_diag_ocn_mct) '
@@ -1371,8 +1378,18 @@ 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_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')
index_o2x_Faoo_h2otemp = mct_aVect_indexRA(o2x_o,'Faoo_h2otemp')
+ index_o2x_Foxo_ismw = mct_aVect_indexRA(o2x_o,'Foxo_ismw',perrWith='quiet')
+ if ( index_o2x_Foxo_ismw /= 0 ) flds_polar = .true.
+ if ( flds_polar ) then
+ index_o2x_Foxo_rrofl = mct_aVect_indexRA(o2x_o,'Foxo_rrofl',perrWith='quiet')
+ index_o2x_Foxo_rrofi = mct_aVect_indexRA(o2x_o,'Foxo_rrofi',perrWith='quiet')
+ index_o2x_Foxo_ismh = mct_aVect_indexRA(o2x_o,'Foxo_ismh',perrWith='quiet')
+ index_o2x_Foxo_rrofih = mct_aVect_indexRA(o2x_o,'Foxo_rrofih',perrWith='quiet')
+ end if
end if
lSize = mct_avect_lSize(o2x_o)
@@ -1380,10 +1397,20 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa
do n=1,lSize
ca_o = dom_o%data%rAttr(kArea,n) * frac_o%rAttr(ko,n)
ca_i = dom_o%data%rAttr(kArea,n) * frac_o%rAttr(ki,n)
+ 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))
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)
+ nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismw,n)
+ nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofl,n)
+ nf = f_wpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*o2x_o%rAttr(index_o2x_Foxo_rrofi,n)
+ nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_q_li,n)
+ nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_ismh,n)
+ nf = f_hpolar;budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_c*o2x_o%rAttr(index_o2x_Foxo_rrofih,n)
+ end if
end do
end if
@@ -1490,11 +1517,11 @@ subroutine seq_diag_ocn_mct( ocn, xao_o, frac_o, infodata, do_o2x, do_x2o, do_xa
nf = f_hmelt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_melth,n)
nf = f_hswnet; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Foxx_swnet,n)
nf = f_hlwdn ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Faxa_lwdn,n)
- nf = f_hberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergh,n)
+ nf = f_hpolar; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergh,n)
nf = f_wmelt ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_meltw,n)
nf = f_wrain ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Faxa_rain,n)
nf = f_wsnow ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Faxa_snow,n)
- nf = f_wberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + (ca_o+ca_i)*x2o_o%rAttr(index_x2o_Fioi_bergw,n)
+ 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)
@@ -1613,8 +1640,6 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i)
if (present(do_i2x)) then
index_i2x_Fioi_melth = mct_aVect_indexRA(i2x_i,'Fioi_melth')
index_i2x_Fioi_meltw = mct_aVect_indexRA(i2x_i,'Fioi_meltw')
- index_i2x_Fioi_bergh = mct_aVect_indexRA(i2x_i,'PFioi_bergh')
- index_i2x_Fioi_bergw = mct_aVect_indexRA(i2x_i,'PFioi_bergw')
index_i2x_Fioi_swpen = mct_aVect_indexRA(i2x_i,'Fioi_swpen')
index_i2x_Faii_swnet = mct_aVect_indexRA(i2x_i,'Faii_swnet')
index_i2x_Faii_lwup = mct_aVect_indexRA(i2x_i,'Faii_lwup')
@@ -1650,9 +1675,7 @@ subroutine seq_diag_ice_mct( ice, frac_i, infodata, do_i2x, do_x2i)
nf = f_hlwup ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_lwup,n)
nf = f_hlatv ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_lat,n)
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_hberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*i2x_i%rAttr(index_i2x_Fioi_bergh,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_wberg ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) - (ca_o+ca_i)*i2x_i%rAttr(index_i2x_Fioi_bergw,n)
nf = f_wevap ; budg_dataL(nf,ic,ip) = budg_dataL(nf,ic,ip) + ca_i*i2x_i%rAttr(index_i2x_Faii_evap,n)
if ( flds_wiso_ice )then
diff --git a/driver-moab/shr/seq_flds_mod.F90 b/driver-moab/shr/seq_flds_mod.F90
index e03771a7a9c6..7e8fb2282c80 100644
--- a/driver-moab/shr/seq_flds_mod.F90
+++ b/driver-moab/shr/seq_flds_mod.F90
@@ -395,10 +395,11 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
logical :: flds_co2_dmsa
logical :: flds_bgc_oi
logical :: flds_wiso
+ logical :: flds_polar
integer :: glc_nec
namelist /seq_cplflds_inparm/ &
- flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, glc_nec, &
+ flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, flds_polar, glc_nec, &
ice_ncat, seq_flds_i2o_per_cat, flds_bgc_oi, &
nan_check_component_fields, rof_heat, atm_flux_method, atm_gustiness, &
rof2ocn_nutrients, lnd_rof_two_way, ocn_rof_two_way, rof_sed
@@ -435,6 +436,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
flds_co2_dmsa = .false.
flds_bgc_oi = .false.
flds_wiso = .false.
+ flds_polar = .false.
glc_nec = 0
ice_ncat = 1
seq_flds_i2o_per_cat = .false.
@@ -468,6 +470,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call shr_mpi_bcast(flds_co2_dmsa, mpicom)
call shr_mpi_bcast(flds_bgc_oi , mpicom)
call shr_mpi_bcast(flds_wiso , mpicom)
+ call shr_mpi_bcast(flds_polar , mpicom)
call shr_mpi_bcast(glc_nec , mpicom)
call shr_mpi_bcast(ice_ncat , mpicom)
call shr_mpi_bcast(seq_flds_i2o_per_cat, mpicom)
@@ -1602,6 +1605,69 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
attname = 'PFioi_bergw'
call metadata_set(attname, longname, stdname, units)
+ !--------------------------------
+ ! ocn<->cpl only exchange - Polar
+ !--------------------------------
+ if (flds_polar) then
+
+ ! Ocean Land ice freeze potential
+ call seq_flds_add(o2x_fluxes,"Foxo_q_li")
+ longname = 'Ocean land ice freeze potential'
+ stdname = 'ice_shelf_cavity_ice_heat_flux'
+ units = 'W m-2'
+ attname = 'Foxo_q_li'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Ocean land ice frazil production
+ call seq_flds_add(o2x_fluxes,"Foxo_frazil_li")
+ longname = 'Ocean land ice frazil production'
+ stdname = 'ocean_land_ice_frazil_ice_production'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_frazil_li'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Water flux from ice shelf melt
+ call seq_flds_add(o2x_fluxes,"Foxo_ismw")
+ longname = 'Water flux due to basal melting of ice shelves'
+ stdname = 'basal_iceshelf_melt_flux'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_ismw'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Heat flux from ice shelf melt
+ call seq_flds_add(o2x_fluxes,"Foxo_ismh")
+ longname = 'Heat flux due to basal melting of ice shelves'
+ stdname = 'basal_iceshelf_heat_flux'
+ units = 'W m-2'
+ attname = 'Foxo_ismh'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Water flux from removed liquid runoff
+ call seq_flds_add(o2x_fluxes,"Foxo_rrofl")
+ longname = 'Water flux due to removed liqiud runoff'
+ stdname = 'removed_liquid_runoff_flux'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_rrofl'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Water flux from removed solid runoff
+ call seq_flds_add(o2x_fluxes,"Foxo_rrofi")
+ longname = 'Water flux due to removed solid runoff'
+ stdname = 'removed_solid_runoff_flux'
+ units = 'kg m-2 s-1'
+ attname = 'Foxo_rrofi'
+ call metadata_set(attname, longname, stdname, units)
+
+ ! Heat flux from removed solid runoff
+ call seq_flds_add(o2x_fluxes,"Foxo_rrofih")
+ longname = 'Heat flux due to removed solid runoff'
+ stdname = 'removed_solid_runoff_heat_flux'
+ units = 'W m-2'
+ attname = 'Foxo_rrofih'
+ call metadata_set(attname, longname, stdname, units)
+
+ end if
+
! Salt flux
call seq_flds_add(i2x_fluxes,"Fioi_salt")
call seq_flds_add(x2o_fluxes,"Fioi_salt")