Skip to content

Commit f0e1cc2

Browse files
moved apond = apnd*alvl calculation to icepack_step_therm1
1 parent 29f1d2d commit f0e1cc2

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

columnphysics/icepack_therm_mushy.F90

+20-36
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ subroutine temperature_changes_salinity(dt, &
4646
fswsfc, fswint, &
4747
Sswabs, Iswabs, &
4848
hilyr, hslyr, &
49-
apnd, hpond, &
49+
apond, hpond, &
5050
zqin, zTin, &
5151
zqsn, zTsn, &
5252
zSin, &
@@ -56,8 +56,7 @@ subroutine temperature_changes_salinity(dt, &
5656
flwoutn, fsurfn, &
5757
fcondtop, fcondbot, &
5858
fadvheat, snoice, &
59-
smice, smliq, &
60-
alvl)
59+
smice, smliq)
6160

6261
! solve the enthalpy and bulk salinity of the ice for a single column
6362

@@ -72,17 +71,16 @@ subroutine temperature_changes_salinity(dt, &
7271
shcoef , & ! transfer coefficient for sensible heat
7372
lhcoef , & ! transfer coefficient for latent heat
7473
Tbot , & ! ice bottom surfce temperature (deg C)
75-
sss , & ! sea surface salinity (PSU)
76-
alvl ! melt pond area fraction
77-
74+
sss ! sea surface salinity (PSU)
75+
7876
real (kind=dbl_kind), intent(inout) :: &
7977
fswsfc , & ! SW absorbed at ice/snow surface (W m-2)
8078
fswint ! SW absorbed in ice interior below surface (W m-2)
8179

8280
real (kind=dbl_kind), intent(inout) :: &
8381
hilyr , & ! ice layer thickness (m)
8482
hslyr , & ! snow layer thickness (m)
85-
apnd , & ! melt pond area fraction tracer
83+
apond , & ! melt pond area fraction of category
8684
hpond ! melt pond depth (m)
8785

8886
real (kind=dbl_kind), dimension (:), intent(inout) :: &
@@ -184,8 +182,8 @@ subroutine temperature_changes_salinity(dt, &
184182
! calculate vertical bulk darcy flow
185183
call flushing_velocity(zTin, phi, &
186184
hin, hsn, &
187-
hilyr, alvl, &
188-
hpond, apnd, &
185+
hilyr, &
186+
hpond, apond, &
189187
dt, w)
190188
if (icepack_warnings_aborted(subname)) return
191189

@@ -330,7 +328,7 @@ subroutine temperature_changes_salinity(dt, &
330328
endif
331329

332330
! drain ponds from flushing
333-
call flush_pond(w, hpond, apnd, dt, alvl)
331+
call flush_pond(w, hpond, apond, dt)
334332
if (icepack_warnings_aborted(subname)) return
335333

336334
! flood snow ice
@@ -3066,8 +3064,8 @@ end subroutine explicit_flow_velocities
30663064

30673065
subroutine flushing_velocity(zTin, phi, &
30683066
hin, hsn, &
3069-
hilyr, alvl, &
3070-
hpond, apnd, &
3067+
hilyr, &
3068+
hpond, apond, &
30713069
dt, w)
30723070

30733071
! calculate the vertical flushing Darcy velocity (positive downward)
@@ -3078,9 +3076,8 @@ subroutine flushing_velocity(zTin, phi, &
30783076

30793077
real(kind=dbl_kind), intent(in) :: &
30803078
hilyr , & ! ice layer thickness (m)
3081-
alvl , & ! level ice area tracer
30823079
hpond , & ! melt pond thickness (m)
3083-
apnd , & ! melt pond area (-)
3080+
apond , & ! melt pond area fraction of category (-)
30843081
hsn , & ! snow thickness (m)
30853082
hin , & ! ice thickness (m)
30863083
dt ! time step (s)
@@ -3141,12 +3138,8 @@ subroutine flushing_velocity(zTin, phi, &
31413138
perm_harm = real(nilyr,dbl_kind) / perm_harm
31423139

31433140
! calculate ocean surface height above bottom of ice
3144-
if (tr_pond_lvl) then
3145-
hocn = (ice_mass + hpond * apnd * rhofresh * alvl + hsn * rhos) / rhow
3146-
else
3147-
hocn = (ice_mass + hpond * apnd * rhofresh + hsn * rhos) / rhow
3148-
endif
3149-
3141+
hocn = (ice_mass + hpond * apond * rhofresh + hsn * rhos) / rhow
3142+
31503143
! calculate brine height above bottom of ice
31513144
hbrine = hin + hpond
31523145

@@ -3157,12 +3150,8 @@ subroutine flushing_velocity(zTin, phi, &
31573150
w = (perm_harm * rhow * gravit * (dhhead / hin)) / viscosity_dyn
31583151

31593152
! maximum down flow to drain pond
3160-
if (tr_pond_lvl) then
3161-
w_down_max = (hpond * apnd * alvl) / dt
3162-
else
3163-
w_down_max = (hpond * apnd) / dt
3164-
endif
3165-
3153+
w_down_max = (hpond * apond) / dt
3154+
31663155
! limit flow
31673156
w = min(w,w_down_max)
31683157

@@ -3183,15 +3172,14 @@ end subroutine flushing_velocity
31833172

31843173
!=======================================================================
31853174

3186-
subroutine flush_pond(w, hpond, apnd, dt, alvl)
3175+
subroutine flush_pond(w, hpond, apond, dt)
31873176

31883177
! given a flushing velocity drain the meltponds
31893178

31903179
real(kind=dbl_kind), intent(in) :: &
31913180
w , & ! vertical flushing Darcy flow rate (m s-1)
3192-
apnd , & ! melt pond area (-)
3193-
dt , & ! time step (s)
3194-
alvl ! level ice area tracer
3181+
apond , & ! melt pond area fraction of category (-)
3182+
dt ! time step (s)
31953183

31963184
real(kind=dbl_kind), intent(inout) :: &
31973185
hpond ! melt pond thickness (m)
@@ -3205,14 +3193,10 @@ subroutine flush_pond(w, hpond, apnd, dt, alvl)
32053193
character(len=*),parameter :: subname='(flush_pond)'
32063194

32073195
if (tr_pond) then
3208-
if (apnd > c0 .and. hpond > c0) then
3196+
if (apond > c0 .and. hpond > c0) then
32093197

32103198
! flush pond through mush
3211-
if (tr_pond_lvl) then
3212-
hpond = hpond - w * dt / (apnd * alvl)
3213-
else
3214-
hpond = hpond - w * dt / apnd
3215-
endif
3199+
hpond = hpond - w * dt / apond
32163200

32173201
hpond = max(hpond, c0)
32183202

columnphysics/icepack_therm_vertical.F90

+28-12
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ subroutine thermo_vertical (dt, aicen, &
8383
vicen, vsnon, &
8484
Tsf, zSin, &
8585
zqin, zqsn, &
86-
apnd, hpond, &
87-
alvl, &
86+
apond, hpond, &
8887
flw, potT, &
8988
Qa, rhoa, &
9089
fsnow, fpond, &
@@ -123,9 +122,8 @@ subroutine thermo_vertical (dt, aicen, &
123122
! tracers
124123
real (kind=dbl_kind), intent(inout) :: &
125124
Tsf , & ! ice/snow top surface temp, same as Tsfcn (deg C)
126-
apnd , & ! melt pond area fraction
127-
hpond , & ! melt pond depth (m)
128-
alvl ! level ice area fraction
125+
apond , & ! melt pond area fraction of category
126+
hpond ! melt pond depth (m)
129127
! iage ! ice age (s)
130128

131129
logical (kind=log_kind), intent(in), optional :: &
@@ -316,7 +314,7 @@ subroutine thermo_vertical (dt, aicen, &
316314
fswsfc, fswint, &
317315
Sswabs, Iswabs, &
318316
hilyr, hslyr, &
319-
apnd, hpond, &
317+
apond, hpond, &
320318
zqin, zTin, &
321319
zqsn, zTsn, &
322320
zSin, &
@@ -326,8 +324,7 @@ subroutine thermo_vertical (dt, aicen, &
326324
flwoutn, fsurfn, &
327325
fcondtopn, fcondbotn, &
328326
fadvocn, snoice, &
329-
smice, smliq, &
330-
alvl)
327+
smice, smliq)
331328
if (icepack_warnings_aborted(subname)) return
332329

333330
else ! ktherm
@@ -454,7 +451,7 @@ subroutine thermo_vertical (dt, aicen, &
454451
fhocnn = fhocnn + fadvocn ! for ktherm=2
455452

456453
if (hin == c0) then
457-
if (tr_pond_topo) fpond = fpond - aicen * apnd * hpond
454+
if (tr_pond_topo) fpond = fpond - aicen * apond * hpond
458455
endif
459456

460457
!-----------------------------------------------------------------
@@ -2339,7 +2336,7 @@ subroutine icepack_step_therm1(dt, &
23392336
Tsfc , & ! ice/snow surface temperature, Tsfcn
23402337
alvl , & ! level ice area fraction
23412338
vlvl , & ! level ice volume fraction
2342-
apnd , & ! melt pond area fraction
2339+
apnd , & ! melt pond area fraction tracer
23432340
hpnd , & ! melt pond depth (m)
23442341
ipnd , & ! melt pond refrozen lid thickness (m)
23452342
iage , & ! volume-weighted ice age
@@ -2440,6 +2437,7 @@ subroutine icepack_step_therm1(dt, &
24402437
smliq ! tracer for mass of liquid in snow (kg/m^3)
24412438

24422439
real (kind=dbl_kind), dimension(ncat) :: &
2440+
apond , & ! melt pond area fraction of category
24432441
l_meltsliqn ! mass of snow melt local (kg/m^2)
24442442

24452443
real (kind=dbl_kind) :: &
@@ -2529,6 +2527,17 @@ subroutine icepack_step_therm1(dt, &
25292527
massicen(:,:) = c0
25302528
massliqn(:,:) = c0
25312529

2530+
!-----------------------------------------------------------------
2531+
! Initialize pond area fractions
2532+
!-----------------------------------------------------------------
2533+
do n= 1, ncat
2534+
if (tr_pond_lvl) then
2535+
apond(n) = apnd(n) * alvl(n)
2536+
else
2537+
apond(n) = apnd(n)
2538+
endif
2539+
enddo
2540+
25322541
!-----------------------------------------------------------------
25332542
! Initialize rate of snow loss to leads
25342543
!-----------------------------------------------------------------
@@ -2559,6 +2568,7 @@ subroutine icepack_step_therm1(dt, &
25592568
!-----------------------------------------------------------------
25602569

25612570
if (formdrag) then
2571+
!!!! This should take apond, not apnd, will fix in the next commit
25622572
call neutral_drag_coeffs (apnd , &
25632573
hpnd , ipnd , &
25642574
alvl , vlvl , &
@@ -2707,8 +2717,7 @@ subroutine icepack_step_therm1(dt, &
27072717
vicen=vicen (n), vsnon=vsnon (n), &
27082718
Tsf=Tsfc (n), zSin=zSin (:,n), &
27092719
zqin=zqin (:,n), zqsn=zqsn (:,n), &
2710-
apnd=apnd (n), hpond=hpnd (n), &
2711-
alvl=alvl (n), &
2720+
apond=apond (n), hpond=hpnd (n), &
27122721
flw=flw, potT=potT, &
27132722
Qa=Qa, rhoa=rhoa, &
27142723
fsnow=fsnow, fpond=fpond, &
@@ -2740,6 +2749,13 @@ subroutine icepack_step_therm1(dt, &
27402749
return
27412750
endif
27422751

2752+
! Translate changes in apond into apnd tracer
2753+
if (tr_pond_lvl) then
2754+
apnd(n) = apond(n) / alvl(n)
2755+
else
2756+
apnd(n) = apond(n)
2757+
endif
2758+
27432759
if (snwgrain) then
27442760
rsnwn (:,n) = rsnw (:)
27452761
smicen(:,n) = smice(:)

0 commit comments

Comments
 (0)