Skip to content

Commit

Permalink
Merge branch 'sealvlponds' into sealevelponds. sealvlponds is DCS bra…
Browse files Browse the repository at this point in the history
…nch which has had the hocn issue changes from main merged in.
  • Loading branch information
davidclemenssewall committed Jan 6, 2025
2 parents 615276a + c9b7cf3 commit 0ef2aa0
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 132 deletions.
9 changes: 3 additions & 6 deletions columnphysics/icepack_atmo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,7 @@ end subroutine atmo_boundary_const
!
! changes: Andrew Roberts, NPS (RASM/CESM coupling and documentation)

subroutine neutral_drag_coeffs (apnd, hpnd, &
ipnd, &
subroutine neutral_drag_coeffs (apondn, &
alvl, vlvl, &
aice, vice, &
vsno, aicen, &
Expand All @@ -526,9 +525,7 @@ subroutine neutral_drag_coeffs (apnd, hpnd, &
use icepack_tracers, only: tr_pond

real (kind=dbl_kind), dimension (:), intent(in) :: &
apnd ,& ! melt pond fraction of sea ice
hpnd ,& ! mean melt pond depth over sea ice
ipnd ,& ! mean ice pond depth over sea ice in cat n
apondn ,& ! melt pond fraction of sea ice category
alvl ,& ! level ice area fraction (of grid cell ?)
vlvl ! level ice mean thickness

Expand Down Expand Up @@ -666,7 +663,7 @@ subroutine neutral_drag_coeffs (apnd, hpnd, &
if (tr_pond) then
do n = 1,ncat
! area of pond per unit area of grid cell
apond = apond+apnd(n)*aicen(n)
apond = apond+apondn(n)*aicen(n)
enddo
endif

Expand Down
42 changes: 23 additions & 19 deletions columnphysics/icepack_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ subroutine merge_fluxes (aicen, &
dsnown , & ! change in snow depth (m)
congeln , & ! congelation ice growth (m)
snoicen , & ! snow-ice growth (m)
fswthrun_vdr, & ! vis dir sw radiation through ice bot (W/m**2)
fswthrun_vdf, & ! vis dif sw radiation through ice bot (W/m**2)
fswthrun_idr, & ! nir dir sw radiation through ice bot (W/m**2)
fswthrun_idf, & ! nir dif sw radiation through ice bot (W/m**2)
Urefn , & ! air speed reference level (m/s)
flpndn , & ! pond flushing rate due to ice permeability (m/step)
expndn , & ! exponential pond drainage rate (m/step)
frpndn , & ! pond drainage rate due to freeboard constraint (m/step)
rfpndn , & ! runoff rate due to rfrac (m/step)
ilpndn ! pond loss/gain due to ice lid (m/step)
ilpndn , & ! pond loss/gain due to ice lid (m/step)
fswthrun_vdr, & ! vis dir sw radiation through ice bot (W/m**2)
fswthrun_vdf, & ! vis dif sw radiation through ice bot (W/m**2)
fswthrun_idr, & ! nir dir sw radiation through ice bot (W/m**2)
fswthrun_idf, & ! nir dif sw radiation through ice bot (W/m**2)
Urefn ! air speed reference level (m/s)

! cumulative fluxes
real (kind=dbl_kind), optional, intent(inout) :: &
Expand Down Expand Up @@ -141,17 +141,17 @@ subroutine merge_fluxes (aicen, &
meltsliq, & ! mass of snow melt (kg/m^2)
congel , & ! congelation ice growth (m)
snoice , & ! snow-ice growth (m)
fswthru_vdr, & ! vis dir sw radiation through ice bot (W/m**2)
fswthru_vdf, & ! vis dif sw radiation through ice bot (W/m**2)
fswthru_idr, & ! nir dir sw radiation through ice bot (W/m**2)
fswthru_idf, & ! nir dif sw radiation through ice bot (W/m**2)
dsnow , & ! change in snow depth (m)
Uref , & ! air speed reference level (m/s)
flpnd , & ! pond flushing rate due to ice permeability (m/step)
expnd , & ! exponential pond drainage rate (m/step)
frpnd , & ! pond drainage rate due to freeboard constraint (m/step)
rfpnd , & ! runoff rate due to rfrac (m/step)
ilpnd ! pond loss/gain (+/-) to ice lid freezing/melting (m/step)
ilpnd , & ! pond loss/gain (+/-) to ice lid freezing/melting (m/step)
fswthru_vdr , & ! vis dir sw radiation through ice bot (W/m**2)
fswthru_vdf , & ! vis dif sw radiation through ice bot (W/m**2)
fswthru_idr , & ! nir dir sw radiation through ice bot (W/m**2)
fswthru_idf , & ! nir dif sw radiation through ice bot (W/m**2)
dsnow, & ! change in snow depth (m)
Uref ! air speed reference level (m/s)

real (kind=dbl_kind), dimension(:), intent(in), optional :: &
Qrefn_iso, & ! isotope air sp hum ref level (kg/kg)
Expand Down Expand Up @@ -262,14 +262,18 @@ subroutine merge_fluxes (aicen, &
congel = congel + congeln * aicen
if (present(snoicen) .and. present(snoice)) &
snoice = snoice + snoicen * aicen

! Meltwater fluxes
if (tr_pond) then
flpnd = flpnd + flpndn * aicen
expnd = expnd + expndn * aicen
frpnd = frpnd + frpndn * aicen
rfpnd = rfpnd + rfpndn * aicen
ilpnd = ilpnd + ilpndn * aicen
if (present(flpndn) .and. present(flpnd)) &
flpnd = flpnd + flpndn * aicen
if (present(expndn) .and. present(expnd)) &
expnd = expnd + expndn * aicen
if (present(frpndn) .and. present(frpnd)) &
frpnd = frpnd + frpndn * aicen
if (present(rfpndn) .and. present(rfpnd)) &
rfpnd = rfpnd + rfpndn * aicen
if (present(ilpndn) .and. present(ilpnd)) &
ilpnd = ilpnd + ilpndn * aicen
endif

end subroutine merge_fluxes
Expand Down
2 changes: 1 addition & 1 deletion columnphysics/icepack_fsd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ subroutine icepack_init_fsd_bounds( &
floe_area_c (nfsd), & ! fsd area at bin centre (m^2)
floe_area_binwidth (nfsd), & ! floe area bin width (m^2)
floe_binwidth (nfsd), & ! floe bin width (m)
c_fsd_range (nfsd), & !
c_fsd_range (nfsd), & !
iweld (nfsd, nfsd), & ! fsd categories that can weld
stat=ierr)
if (ierr/=0) then
Expand Down
10 changes: 10 additions & 0 deletions columnphysics/icepack_mechred.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,16 @@ subroutine ridge_shift (dt, hin_max, &
enddo
endif

if (z_tracers .and. nbtrcr > 0) then
dzssl = p5/real(nslyr,kind=dbl_kind)
dzint = c1-dzssl
do it = 1, nbtrcr
mbio(it) = mbio(it) + vsrdgn*(c1-fsnowrdg) &
* (trcrn(bio_index(it) + nblyr + 1,n) * dzssl &
+ trcrn(bio_index(it) + nblyr + 2,n) * dzint)
enddo
endif

if (tr_pond_topo .or. tr_pond_sealvl) then
mpond = mpond + ardg1n * trcrn(nt_apnd,n) &
* trcrn(nt_hpnd,n)
Expand Down
16 changes: 8 additions & 8 deletions columnphysics/icepack_therm_itd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1025,15 +1025,15 @@ subroutine lateral_melt (dt, fpond, &
fpond = fpond - dfpond
endif

if (tr_pond) then
if (tr_pond_lvl) then
mipnd = mipnd + aicen(n)*trcrn(nt_apnd,n)*trcrn(nt_hpnd,n) &
*rsiden(n)*trcrn(nt_alvl,n)
else
mipnd = mipnd + aicen(n)*trcrn(nt_apnd,n)*trcrn(nt_hpnd,n) &
*rsiden(n)
if (tr_pond) then
if (tr_pond_lvl) then
mipnd = mipnd + aicen(n)*trcrn(nt_apnd,n)*trcrn(nt_hpnd,n) &
*rsiden(n)*trcrn(nt_alvl,n)
else
mipnd = mipnd + aicen(n)*trcrn(nt_apnd,n)*trcrn(nt_hpnd,n) &
*rsiden(n)
endif
endif
endif

! history diagnostics
meltl = meltl + vicen_init(n)*rsiden(n)
Expand Down
Loading

0 comments on commit 0ef2aa0

Please sign in to comment.