Skip to content

Commit 230c889

Browse files
Time avg ice-shelf melt flux and connect it and time-avg facemelt to coupler
1 parent b14f9bf commit 230c889

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

components/mpas-albany-landice/driver/glc_comp_mct.F

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,13 +1408,11 @@ subroutine glc_import_mct(x2g_g, errorCode)
14081408
OceanDensity
14091409
real (kind=RKIND), dimension(:,:), pointer :: ismip6shelfMelt_3dThermalForcing
14101410
integer, dimension(:,:), pointer :: orig3dOceanMask
1411-
real(kind=RKIND), pointer :: config_ice_density
14121411
real(kind=RKIND), pointer :: config_invalid_value_TF
14131412
real(kind=RKIND) :: fractionalMaskVal
14141413

14151414
errorCode = 0
14161415

1417-
call mpas_pool_get_config(domain % configs, 'config_ice_density', config_ice_density)
14181416
call mpas_pool_get_config(domain % configs, 'config_invalid_value_TF', config_invalid_value_TF)
14191417

14201418
n = 0
@@ -1493,7 +1491,6 @@ subroutine glc_export_mct(g2x_g, errorCode)
14931491
type (block_type), pointer :: block
14941492

14951493
real (kind=RKIND), pointer :: config_sea_level
1496-
real (kind=RKIND), pointer :: config_ice_density
14971494
character(len=StrKIND), pointer :: config_basal_mass_bal_float
14981495

14991496
type (mpas_pool_type), pointer :: meshPool
@@ -1508,10 +1505,9 @@ subroutine glc_export_mct(g2x_g, errorCode)
15081505
real (kind=RKIND), dimension(:), pointer :: thickness
15091506
real (kind=RKIND), dimension(:), pointer :: avgBareIceAblationApplied
15101507
real (kind=RKIND), dimension(:), pointer :: avgCalvingFlux
1508+
real (kind=RKIND), dimension(:), pointer :: avgFaceMeltFlux
1509+
real (kind=RKIND), dimension(:), pointer :: avgFloatingBMBFlux
15111510
real (kind=RKIND), dimension(:,:), pointer :: temperature
1512-
real (kind=RKIND), dimension(:), pointer :: faceMeltingThickness
1513-
real (kind=RKIND), dimension(:), pointer :: floatingBasalMassBalApplied
1514-
real (kind=RKIND), pointer :: deltat !< time step (s)
15151511
integer, dimension(:), pointer :: cellMask
15161512
!-------------------------------------------------------------------
15171513

@@ -1521,7 +1517,6 @@ subroutine glc_export_mct(g2x_g, errorCode)
15211517
block => domain % blocklist
15221518

15231519
call mpas_pool_get_config(domain % configs, 'config_sea_level', config_sea_level)
1524-
call mpas_pool_get_config(domain % configs, 'config_ice_density', config_ice_density)
15251520
call mpas_pool_get_config(domain % configs, 'config_basal_mass_bal_float', config_basal_mass_bal_float)
15261521

15271522
do while (associated(block))
@@ -1534,16 +1529,15 @@ subroutine glc_export_mct(g2x_g, errorCode)
15341529
call mpas_pool_get_subpool(block % structs, 'thermal', thermalPool)
15351530
call mpas_pool_get_subpool(block % structs, 'timeAveraging', timeAveragingPool)
15361531

1537-
call mpas_pool_get_array(meshPool, 'deltat', deltat)
15381532
call mpas_pool_get_array(geometryPool, 'upperSurface', upperSurface)
15391533
call mpas_pool_get_array(meshPool, 'layerThicknessFractions', layerThicknessFractions)
15401534
call mpas_pool_get_array(geometryPool, 'thickness', Thickness, timeLevel = 1)
15411535
call mpas_pool_get_array(thermalPool, 'temperature', temperature)
1542-
call mpas_pool_get_array(geometryPool, 'faceMeltingThickness', faceMeltingThickness)
1543-
call mpas_pool_get_array(geometryPool, 'floatingBasalMassBalApplied', floatingBasalMassBalApplied)
15441536

1545-
call mpas_pool_get_array(timeAveragingPool, 'avgBareIceAblationApplied', avgBareIceAblationApplied)
1546-
call mpas_pool_get_array(timeAveragingPool, 'avgCalvingFlux', avgCalvingFlux)
1537+
call mpas_pool_get_array(timeAveragingPool, 'avgBareIceAblationApplied', avgBareIceAblationApplied)
1538+
call mpas_pool_get_array(timeAveragingPool, 'avgCalvingFlux', avgCalvingFlux)
1539+
call mpas_pool_get_array(timeAveragingPool, 'avgFaceMeltFlux', avgFaceMeltFlux)
1540+
call mpas_pool_get_array(timeAveragingPool, 'avgFloatingBMBFlux', avgFloatingBMBFlux)
15471541

15481542
call mpas_pool_get_array(geometryPool, 'cellMask', cellMask)
15491543

@@ -1556,13 +1550,11 @@ subroutine glc_export_mct(g2x_g, errorCode)
15561550
g2x_g % rAttr(index_g2x_Figg_rofi,n) = 0.0 ! placeholder
15571551
! Fogg_rofi
15581552
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = avgCalvingFlux(i)
1559-
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = g2x_g % rAttr(index_g2x_Fogg_rofi,n) + &
1560-
faceMeltingThickness(i) * config_ice_density / deltat ! units: kg/m2/s
1553+
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = g2x_g % rAttr(index_g2x_Fogg_rofi,n) + avgFaceMeltFlux(i)
15611554
if (trim(config_basal_mass_bal_float) == 'ismip6') then
15621555
! if MALI is calculating ISMF, add that to rofl
15631556
! In some configurations, ISMF will be calculated in coupler or MPAS-Ocean
1564-
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = g2x_g % rAttr(index_g2x_Fogg_rofi,n) + &
1565-
floatingBasalMassBalApplied(i) ! units: kg/m2/s
1557+
g2x_g % rAttr(index_g2x_Fogg_rofi,n) = g2x_g % rAttr(index_g2x_Fogg_rofi,n) + avgFloatingBMBFlux(i)
15661558
endif
15671559

15681560
g2x_g % rAttr(index_g2x_Sg_topo, n) = max(0.0, upperSurface(i)) !updated to avoid warning for values below sea level

components/mpas-albany-landice/src/Registry.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,9 @@ is the value of that variable from the *previous* time level!
14901490
<var name="avgFaceMeltFlux" type="real" dimensions="nCells Time" units="kg m^{-2} s^{-1}"
14911491
description="time averaged thickness of ice thickness lost from face melting (using faceMeltingThickness from 'geometry' pool)"
14921492
/>
1493+
<var name="avgFloatingBMBFlux" type="real" dimensions="nCells Time" units="kg m^{-2} s^{-1}"
1494+
description="time averaged floating basal mass balance"
1495+
/>
14931496
<var name="avgBareIceAblation" type="real" dimensions="nCells Time" units="kg m^{-2} s^{-1}"
14941497
description="time averaged potential negative surface mass balance for melting of bare ice (using BareIceAblation from 'geometry' pool)"
14951498
/>

components/mpas-albany-landice/src/shared/mpas_li_time_average_coupled.F

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ subroutine li_time_average_coupled_init(meshPool,timeAveragingPool)
5151
type (mpas_pool_type), intent(in) :: meshPool
5252
type (mpas_pool_type), intent(inout) :: timeAveragingPool
5353

54-
real (kind=RKIND), dimension(:), pointer :: avgBareIceAblationApplied, avgCalvingFlux, avgFaceMeltFlux
54+
real (kind=RKIND), dimension(:), pointer :: avgBareIceAblationApplied, avgCalvingFlux, &
55+
avgFaceMeltFlux, avgFloatingBMBFlux
5556

5657
integer, pointer :: nCells
5758

@@ -65,11 +66,13 @@ subroutine li_time_average_coupled_init(meshPool,timeAveragingPool)
6566
call mpas_pool_get_array(timeAveragingPool, 'avgBareIceAblationApplied', avgBareIceAblationApplied)
6667
call mpas_pool_get_array(timeAveragingPool, 'avgCalvingFlux', avgCalvingFlux)
6768
call mpas_pool_get_array(timeAveragingPool, 'avgFaceMeltFlux', avgFaceMeltFlux)
69+
call mpas_pool_get_array(timeAveragingPool, 'avgFloatingBMBFlux', avgFloatingBMBFlux)
6870

6971
do iCell = 1, nCells
7072
avgBareIceAblationApplied(iCell) = 0.0_RKIND
7173
avgCalvingFlux(iCell) = 0.0_RKIND
7274
avgFaceMeltFlux(iCell) = 0.0_RKIND
75+
avgFloatingBMBFlux(iCell) = 0.0_RKIND
7376
end do
7477

7578
timeAccumulatedCoupled = 0.0_RKIND
@@ -97,7 +100,8 @@ subroutine li_time_average_coupled_accumulate(timeAveragingPool, geometryPool, m
97100

98101
real (kind=RKIND), dimension(:), pointer :: bareIceAblationApplied, avgBareIceAblationApplied, &
99102
calvingThickness, avgCalvingFlux, &
100-
faceMeltingThickness, avgFaceMeltFlux
103+
faceMeltingThickness, avgFaceMeltFlux, avgFloatingBMBFlux, &
104+
floatingBasalMassBalApplied
101105
integer, pointer :: nCells
102106

103107
real (kind=RKIND), pointer :: timeAccumulatedCoupled, rhoi, deltat
@@ -111,9 +115,11 @@ subroutine li_time_average_coupled_accumulate(timeAveragingPool, geometryPool, m
111115
call mpas_pool_get_array(geometryPool, 'bareIceAblationApplied', bareIceAblationApplied)
112116
call mpas_pool_get_array(geometryPool, 'calvingThickness', calvingThickness)
113117
call mpas_pool_get_array(geometryPool, 'faceMeltingThickness', faceMeltingThickness)
118+
call mpas_pool_get_array(geometryPool, 'floatingBasalMassBalApplied', floatingBasalMassBalApplied)
114119
call mpas_pool_get_array(timeAveragingPool, 'avgBareIceAblationApplied', avgBareIceAblationApplied)
115120
call mpas_pool_get_array(timeAveragingPool, 'avgCalvingFlux', avgCalvingFlux)
116121
call mpas_pool_get_array(timeAveragingPool, 'avgFaceMeltFlux', avgFaceMeltFlux)
122+
call mpas_pool_get_array(timeAveragingPool, 'avgFloatingBMBFlux', avgFloatingBMBFlux)
117123

118124
do iCell = 1, nCells
119125

@@ -126,6 +132,8 @@ subroutine li_time_average_coupled_accumulate(timeAveragingPool, geometryPool, m
126132
avgFaceMeltFlux(iCell) = ( avgFaceMeltFlux(iCell) * timeAccumulatedCoupled &
127133
+ faceMeltingThickness(iCell) * deltat * (rhoi / deltat) ) / ( timeAccumulatedCoupled + deltat )
128134

135+
avgFloatingBMBFlux(iCell) = ( avgFloatingBMBFlux(iCell) * timeAccumulatedCoupled &
136+
+ floatingBasalMassBalApplied(iCell) * deltat) / ( timeAccumulatedCoupled + deltat )
129137
end do
130138

131139
timeAccumulatedCoupled = timeAccumulatedCoupled + deltat

0 commit comments

Comments
 (0)