Skip to content

Commit 86671b1

Browse files
committed
Update excess_ice from single column value to depth varying
Changes dimension on excess_ice parameter in water state types from being one value per column to having dimensions (columns, depth in soil)
1 parent d088122 commit 86671b1

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

components/elm/src/biogeophys/CanopyHydrologyMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ subroutine FracH2OSfc(bounds, num_h2osfc, filter_h2osfc, &
804804
micro_sigma => col_pp%micro_sigma , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m)
805805

806806
h2osno => col_ws%h2osno , & ! Input: [real(r8) (:) ] snow water (mm H2O)
807-
excess_ice => col_ws%excess_ice , & ! Input: [real(r8) (:) ] excess ground ice [kg/m2]
807+
excess_ice => col_ws%excess_ice , & ! Input: [real(r8) (:,:) ] excess ground ice [kg/m2]
808808

809809
h2osoi_liq => col_ws%h2osoi_liq , & ! Output: [real(r8) (:,:) ] liquid water (col,lyr) [kg/m2]
810810
h2osfc => col_ws%h2osfc , & ! Output: [real(r8) (:) ] surface water (mm)

components/elm/src/biogeophys/WaterStateType.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module WaterstateType
3535
real(r8), pointer :: bw_col (:,:) ! col partial density of water in the snow pack (ice + liquid) [kg/m3]
3636
real(r8), pointer :: finundated_col (:) ! fraction of column that is inundated, this is for bgc caclulation in betr
3737
real(r8), pointer :: h2osoi_tend_tsl_col (:) ! col moisture tendency due to vertical movement at topmost layer (m3/m3/s)
38-
real(r8), pointer :: excess_ice (:) ! excess ground ice in polygonal tundra areas [kg/m2]
38+
real(r8), pointer :: excess_ice (:,:) ! excess ground ice in polygonal tundra areas [kg/m2]
3939

4040
real(r8), pointer :: rhvap_soi_col (:,:)
4141
real(r8), pointer :: rho_vap_col (:,:)
@@ -212,7 +212,7 @@ subroutine InitAllocate(this, bounds)
212212
if (use_fan) then
213213
allocate(this%h2osoi_tend_tsl_col(begc:endc)) ; this%h2osoi_tend_tsl_col (:) = nan
214214
end if
215-
allocate(this%excess_ice (begc:endc)) ; this%excess_ice (:) = nan
215+
allocate(this%excess_ice (begc:endc, 1:nlevgrnd)) ; this%excess_ice (:,:) = nan
216216

217217
allocate(this%h2osno_col (begc:endc)) ; this%h2osno_col (:) = nan
218218
allocate(this%h2osno_old_col (begc:endc)) ; this%h2osno_old_col (:) = nan

components/elm/src/data_types/ColumnDataType.F90

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ module ColumnDataType
108108
real(r8), pointer :: h2osoi_liq (:,:) => null() ! liquid water (-nlevsno+1:nlevgrnd) (kg/m2)
109109
real(r8), pointer :: h2osoi_ice (:,:) => null() ! ice lens (-nlevsno+1:nlevgrnd) (kg/m2)
110110
real(r8), pointer :: h2osoi_vol (:,:) => null() ! volumetric soil water (0<=h2osoi_vol<=watsat) (1:nlevgrnd) (m3/m3)
111+
real(r8), pointer :: excess_ice (:,:) => null() ! NGEE Arctic: excess ground ice in column (1:nlevgrnd) (0 to 1)
111112
real(r8), pointer :: h2osfc (:) => null() ! surface water (kg/m2)
112113
real(r8), pointer :: h2ocan (:) => null() ! canopy water integrated to column (kg/m2)
113114
real(r8), pointer :: total_plant_stored_h2o(:)=> null() ! total water in plants (kg/m2)
@@ -143,7 +144,6 @@ module ColumnDataType
143144
real(r8), pointer :: snw_rds_top (:) => null() ! snow grain radius (top layer) (m^-6, microns)
144145
logical , pointer :: do_capsnow (:) => null() ! true => do snow capping
145146
real(r8), pointer :: h2osoi_tend_tsl_col(:) => null() ! col moisture tendency due to vertical movement at topmost layer (m3/m3/s)
146-
real(r8), pointer :: excess_ice (:) => null() ! NGEE-Arctic: tracking excess ground ice
147147
! Area fractions
148148
real(r8), pointer :: frac_sno (:) => null() ! fraction of ground covered by snow (0 to 1)
149149
real(r8), pointer :: frac_sno_eff (:) => null() ! fraction of ground covered by snow (0 to 1)
@@ -1384,6 +1384,7 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
13841384
allocate(this%h2osoi_liq (begc:endc,-nlevsno+1:nlevgrnd)) ; this%h2osoi_liq (:,:) = spval
13851385
allocate(this%h2osoi_ice (begc:endc,-nlevsno+1:nlevgrnd)) ; this%h2osoi_ice (:,:) = spval
13861386
allocate(this%h2osoi_vol (begc:endc, 1:nlevgrnd)) ; this%h2osoi_vol (:,:) = spval
1387+
allocate(this%excess_ice (begc:endc, 1:nlevgrnd)) ; this%excess_ice (:,:) = spval
13871388
allocate(this%h2osfc (begc:endc)) ; this%h2osfc (:) = spval
13881389
allocate(this%h2ocan (begc:endc)) ; this%h2ocan (:) = spval
13891390
allocate(this%wslake_col (begc:endc)) ; this%wslake_col (:) = spval
@@ -1417,7 +1418,6 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
14171418
if (use_fan) then
14181419
allocate(this%h2osoi_tend_tsl_col(begc:endc)) ; this%h2osoi_tend_tsl_col(:) = spval
14191420
end if
1420-
allocate(this%excess_ice (begc:endc)) ; this%excess_ice (:) = spval
14211421
allocate(this%snw_rds_top (begc:endc)) ; this%snw_rds_top (:) = spval
14221422
allocate(this%do_capsnow (begc:endc))
14231423
allocate(this%frac_sno (begc:endc)) ; this%frac_sno (:) = spval
@@ -1473,9 +1473,14 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
14731473
ptr_col=this%h2osoi_ice, l2g_scale_type='veg')
14741474

14751475
this%h2osoi_ice(begc:endc,:) = spval
1476-
call hist_addfld2d (fname='SOILICE_ICE', units='kg/m2', type2d='levgrnd', &
1477-
avgflag='A', long_name='soil ice (ice landunits only)', &
1478-
ptr_col=this%h2osoi_ice, l2g_scale_type='ice')
1476+
call hist_addfld2d (fname='SOILICE_ICE', units='kg/m2', type2d='levgrnd', &
1477+
avgflag='A', long_name='soil ice (ice landunits only)', &
1478+
ptr_col=this%h2osoi_ice, l2g_scale_type='ice')
1479+
1480+
this%excess_ice(begc:endc, :) = spval
1481+
call hist_addfld2d (fname='EXCESS_ICE', units = '1', type2d='levgrnd', &
1482+
avgflag='A', long_name='Excess ground ice (0 to 1)', &
1483+
ptr_col=this%excess_ice, l2g_scale_type='veg') ! <- RPF: should this be natveg?
14791484

14801485
this%h2osfc(begc:endc) = spval
14811486
call hist_addfld1d (fname='H2OSFC', units='mm', &
@@ -1565,11 +1570,6 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
15651570
default='inactive')
15661571
end if
15671572

1568-
this%excess_ice(begc:endc) = spval
1569-
call hist_addfld1d (fname='EXCESS_ICE', units = '1', &
1570-
avgflag='A', long_name='Excess ground ice (0 to 1)', &
1571-
ptr_col=this%excess_ice, l2g_scale_type='veg') ! <- RPF: should this be natveg?
1572-
15731573
this%frac_sno(begc:endc) = spval
15741574
call hist_addfld1d (fname='FSNO', units='1', &
15751575
avgflag='A', long_name='fraction of ground covered by snow', &
@@ -1641,7 +1641,6 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
16411641
this%frac_h2osfc_act(c) = 0._r8
16421642
this%h2orof(c) = 0._r8
16431643
this%frac_h2orof(c) = 0._r8
1644-
this%excess_ice(c) = 0.5_r8
16451644

16461645
if (lun_pp%urbpoi(l)) then
16471646
! From Bonan 1996 (LSM technical note)
@@ -1787,6 +1786,17 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
17871786
this%h2osoi_ice(c,j) = 0._r8
17881787
this%h2osoi_liq(c,j) = col_pp%dz(c,j)*denh2o*this%h2osoi_vol(c,j)
17891788
endif
1789+
! RPF - to do: a) apply to only polygonal ground
1790+
! b) pull in ALT information to get starting point right.
1791+
! for now, assuming no excess ice in top meter, 0.5 for 1-4 m,
1792+
! 0.2 below 4 m. Also: need to check signs!
1793+
if (col_pp%z(c,j) > -1._r8) then
1794+
this%excess_ice(c,j) = 0._r8
1795+
else if (col_pp%z(c,j) > -4._r8 .and. col_pp%z(c,j) < -1._r8) then
1796+
this%excess_ice(c,j) = 0.5_r8
1797+
else
1798+
this%excess_ice(c,j) = 0.2_r8
1799+
end if
17901800
end do
17911801

17921802
this%h2osoi_liq_old(c,:) = this%h2osoi_liq(c,:)
@@ -1844,6 +1854,11 @@ subroutine col_ws_restart(this, bounds, ncid, flag, watsat_input)
18441854
long_name='ice lens', units='kg/m2', &
18451855
interpinic_flag='interp', readvar=readvar, data=this%h2osoi_ice)
18461856

1857+
call restartvar(ncid=ncid, flag=flag, varname='EXCESS_ICE', xtype=ncd_double, &
1858+
dim1name='column', dim2name='levgrnd', switchdim=.true., &
1859+
long_name='excess ground ice (0 to 1)', units='1', &
1860+
interpinic_flag='interp', readvar=readvar, data=this%excess_ice)
1861+
18471862
call restartvar(ncid=ncid, flag=flag, varname='SOILP', xtype=ncd_double, &
18481863
dim1name='column', dim2name='levgrnd', switchdim=.true., &
18491864
long_name='soil pressure ', units='Pa', &
@@ -1907,11 +1922,6 @@ subroutine col_ws_restart(this, bounds, ncid, flag, watsat_input)
19071922
this%snow_persistence(:) = 0.0_r8
19081923
end if
19091924

1910-
call restartvar(ncid=ncid, flag=flag, varname='EXCESS_ICE', xtype=ncd_double, &
1911-
dim1name='column', &
1912-
long_name='excess ground ice (0 to 1)', units='1', &
1913-
interpinic_flag='interp', readvar=readvar, data=this%excess_ice)
1914-
19151925
call restartvar(ncid=ncid, flag=flag, varname='frac_sno', xtype=ncd_double, &
19161926
dim1name='column', &
19171927
long_name='fraction of ground covered by snow (0 to 1)',units='1',&

0 commit comments

Comments
 (0)