SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
ice_soildif.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE ice_soildif(PTSTEP, PTAUICE, PKSFC_IVEG, PLEGI, &
7  psoilhcapz, pwsatz, pmpotsatz, pbcoefz, &
8  ptg, pwgi, pwg, kwg_layer, &
9  pdzg, pwgi_excess )
10 ! ##########################################################################
11 !
12 !!**** *ICE_SOILDIF*
13 !
14 !! PURPOSE
15 !! -------
16 ! This subroutine calculates soil water phase changes using the
17 ! available/excess energy approach. Soil temperature and volumetric
18 ! ice content are adjusted due to phase changes. See the references
19 ! Boone et al., 39, JAM, 2000 and Giard and Bazile, 128, MWR, 2000.
20 ! NOTE that more recently a modification was made: freeze/thaw follows
21 ! a relationship between liquid water and temperature derriving from
22 ! the Clausius Clapeyron Eq. This results in little to no freezing for
23 ! sufficiently dry but cold (below freezing) soils. Scatter about this
24 ! curve results due to 'phase change efficiencies' and the surface insolation
25 ! coefficient.
26 !
27 !!** METHOD
28 !! ------
29 !
30 ! Direct calculation
31 !
32 !! EXTERNAL
33 !! --------
34 !
35 ! None
36 !!
37 !! IMPLICIT ARGUMENTS
38 !! ------------------
39 !!
40 !!
41 !! REFERENCE
42 !! ---------
43 !!
44 !! Boone (2000)
45 !! Boone et al., (2000)
46 !!
47 !! AUTHOR
48 !! ------
49 !! A. Boone * Meteo-France *
50 !!
51 !! MODIFICATIONS
52 !! -------------
53 !! Original 28/02/00 Boone
54 !! Modified 24/11/09 Boone
55 !! Limit energy available for phase change by
56 ! local amount owing to diffusion. Has almost
57 ! no impact except under rare circumstances
58 ! (avoids rare but possible oscillatory behavior)
59 ! Also, add minimum (numerical) melt/freeze efficieny to prevent
60 ! prolonged periods of small ice amounts approaching zero.
61 !
62 !! Modified 01/06/11 Boone
63 ! Use apparent heat capacity linearization for freezing
64 ! (when temperature depenence on ice change is direct)
65 ! Do away with efficiency coefficients as they acted to provide
66 ! numerical stability: not needed as apparent heat capacity increases
67 ! the effective heat capacity thus increasing stability.
68 ! NOTE: for now considers Brooks & Corey type water retention.
69 !
70 ! Modified 08/2011 Decharme
71 ! Optimization
72 ! Modified 10/2013 Boone
73 ! Slight edit to phase computation to improve enthalpy conservation
74 !
75 !-------------------------------------------------------------------------------
76 !
77 !* 0. DECLARATIONS
78 ! ------------
79 !
80 USE modd_csts, ONLY : xlmtt, xtt, xg, xci, xrholi, xrholw
81 USE modd_isba_par, ONLY : xwgmin
82 !
83 USE yomhook ,ONLY : lhook, dr_hook
84 USE parkind1 ,ONLY : jprb
85 !
86 IMPLICIT NONE
87 !
88 !* 0.1 declarations of arguments
89 !
90 REAL, INTENT(IN) :: ptstep ! Model time step (s)
91 !
92 REAL, DIMENSION(:), INTENT(IN) :: ptauice, pksfc_iveg, plegi
93 ! PKSFC_IVEG = effect of surface layer insolation on phase changes
94 ! Giard and Bazile (2000): non-dimensional
95 ! PTAUICE = soil phase change characteristic time scale (s)
96 ! PLEGI = ice sublimation (m s-1)
97 !
98 REAL, DIMENSION(:,:), INTENT(IN) :: psoilhcapz, pwsatz
99 ! PSOILHCAPZ = soil heat capacity [J/(m3 K)]
100 ! PWSATZ = soil porosity (m3/m3)
101 !
102 REAL, DIMENSION(:,:), INTENT(IN) :: pdzg
103 ! PDZG = Layer thickness (DIF option)
104 !
105 REAL, DIMENSION(:,:), INTENT(IN) :: pmpotsatz, pbcoefz
106 ! PMPOTSATZ = matric potential at saturation (m)
107 ! PBCOEFZ = slope of the water retention curve (-)
108 !
109 REAL, DIMENSION(:,:), INTENT(INOUT) :: ptg, pwgi, pwg
110 ! PTG = soil temperature (K)
111 ! PWGI = soil volumetric ice content (m3/m3)
112 ! PWGI = soil volumetric liquid water content (m3/m3)
113 !
114 INTEGER, DIMENSION(:), INTENT(IN) :: kwg_layer
115 ! KWG_LAYER = Number of soil moisture layers (DIF option)
116 !
117 REAL, DIMENSION(:), INTENT(OUT) :: pwgi_excess
118 ! PWGI_EXCESS = Soil ice excess water content
119 !
120 !* 0.2 declarations of local variables
121 !
122 INTEGER :: jj, jl ! loop control
123 !
124 INTEGER :: ini ! Number of point
125 INTEGER :: inl ! Number of explicit soil layers
126 INTEGER :: idepth ! Total moisture soil depth
127 !
128 REAL, DIMENSION(SIZE(PTG,1),SIZE(PTG,2)) :: zk, zexcessfc
129 !
130 REAL, DIMENSION(SIZE(PTG,1)) :: zexcess
131 !
132 REAL :: zwgmax, zpsimax, zpsi, zdeltat, &
133  zphase, ztgm, zwgm, zwgim, zlog, &
134  zeffic, zphasem, zphasef, zwork, &
135  zappheatcap
136 !
137 REAL(KIND=JPRB) :: zhook_handle
138 !-------------------------------------------------------------------------------
139 !
140 ! Initialization:
141 ! ---------------
142 !
143 IF (lhook) CALL dr_hook('ICE_SOILDIF',0,zhook_handle)
144 !
145 ini = SIZE(ptg(:,:),1)
146 inl = maxval(kwg_layer(:))
147 !
148 zexcessfc(:,:)=0.0
149 zexcess(: )=0.0
150 pwgi_excess(: )=0.0
151 !
152 !-------------------------------------------------------------------------------
153 !
154 ! 1. Surface layer vegetation insulation coefficient (-)
155 ! ---------------------------------------------------
156 !
157 zk(:,:) = 1.0
158 zk(:,1) = pksfc_iveg(:)
159 !
160 ! 2. Soil ice evolution computation:
161 ! -------------------------------
162 !
163 DO jl=1,inl
164  DO jj=1,ini
165  idepth=kwg_layer(jj)
166  IF(jl<=idepth)THEN
167 !
168  zwgim = pwgi(jj,jl)
169  zwgm = pwg(jj,jl)
170  ztgm = ptg(jj,jl)
171 
172 ! The maximum liquid water content as
173 ! as function of temperature (sub-freezing)
174 ! based on Gibbs free energy (Fuchs et al., 1978):
175 !
176  zpsimax = min(pmpotsatz(jj,jl),xlmtt*(ptg(jj,jl)-xtt)/(xg*ptg(jj,jl)))
177 !
178  zwork = zpsimax/pmpotsatz(jj,jl)
179  zlog = log(zwork)/pbcoefz(jj,jl)
180  zwgmax = pwsatz(jj,jl)*exp(-zlog)
181 !
182 ! Calculate maximum temperature for ice based on Gibbs free energy: first
183 ! compute soil water potential using Brook and Corey (1966) model:
184 ! psi=mpotsat*(w/wsat)**(-bcoef)
185 !
186  zwork = pwg(jj,jl)/pwsatz(jj,jl)
187  zlog = pbcoefz(jj,jl)*log(zwork)
188  zpsi = pmpotsatz(jj,jl)*exp(-zlog)
189 !
190  zdeltat = ptg(jj,jl) - xlmtt*xtt/(xlmtt-xg*zpsi)
191 !
192 ! Compute apparent heat capacity. This is considered
193 ! only when there is available energy (cold) and liquid water
194 ! available...freezing front.
195 ! This also has the secondary effect of increasing numerical stability
196 ! during freezing (as there is a strong temperature dependence) by
197 ! i) potentially significantly increasing the "apparent" heat capacity and
198 ! ii) this part is also treated implicitly herein.
199 !
200  zwork = (xci*xrholi/(xlmtt*xrholw))*zk(jj,jl)*max(0.0,-zdeltat)
201 !
202  zappheatcap=0.0
203  IF(zdeltat<0.0.AND.zwgm>=zwgmax.AND.zwork>=max(0.0,zwgm-zwgmax))THEN
204  zappheatcap = -(xtt*xrholw*xlmtt*xlmtt/xg)*zwgmax/(zpsimax*pbcoefz(jj,jl)*ztgm*ztgm)
205  ENDIF
206 !
207 ! *Melt* ice if energy and ice available:
208  zphasem = (ptstep/ptauice(jj))*min(zk(jj,jl)*xci*xrholi*max(0.0,zdeltat),zwgim*xlmtt*xrholw)
209 !
210 ! *Freeze* liquid water if energy and water available:
211  zphasef = (ptstep/ptauice(jj))*min(zk(jj,jl)*xci*xrholi*max(0.0,-zdeltat),max(0.0,zwgm-zwgmax)*xlmtt*xrholw)
212 !
213 ! Update heat content if melting or freezing
214  ptg(jj,jl) = ztgm + (zphasef - zphasem)/(psoilhcapz(jj,jl)+zappheatcap)
215 !
216 ! Get estimate of actual total phase change (J/m3) for equivalent soil water changes:
217  zphase = (psoilhcapz(jj,jl)+zappheatcap)*(ptg(jj,jl)-ztgm)
218 !
219 ! Adjust ice and liquid water conents (m3/m3) accordingly :
220  pwgi(jj,jl) = zwgim + zphase/(xlmtt*xrholw)
221  pwg(jj,jl) = zwgm - zphase/(xlmtt*xrholw)
222 !
223  ENDIF
224  ENDDO
225 ENDDO
226 !
227 ! 3. Adjust surface soil ice content for sublimation
228 ! -----------------------------------------------
229 !
230 pwgi(:,1) = pwgi(:,1) - plegi(:)*ptstep/pdzg(:,1)
231 !
232 ! The remaining code in this block are merely constraints to ensure a highly
233 ! accurate water budget: most of the time this code will not have any
234 ! effect on the soil water profile.
235 ! If sublimation causes all of the remaining ice to be extracted, remove
236 ! some of the liquid (a correction): NOTE that latent heating already accounted
237 ! for in sublimation term, so no need to alter soil temperature.
238 !
239 zexcess(:) = max(0.0, - pwgi(:,1))
240 pwg(:,1) = pwg(:,1) - zexcess(:)
241 pwgi(:,1) = pwgi(:,1) + zexcess(:)
242 zexcessfc(:,1)= zexcessfc(:,1) - zexcess(:)
243 !
244 ! 4. Prevent some possible problems
245 ! ------------------------------
246 !
247 ! If sublimation is negative (condensation), make sure ice does not
248 ! exceed maximum possible. If it does, then put excess ice into layer below:
249 ! This correction should rarely if ever cause any ice accumulation in the
250 ! sub-surface layer: this is especially true of deeper layers but it is
251 ! accounted for none-the-less.
252 !
253 DO jl=1,inl
254  DO jj=1,ini
255  idepth=kwg_layer(jj)
256  IF(jl<=idepth)THEN
257  zexcess(jj) = max(0.0, pwgi(jj,jl) - (pwsatz(jj,jl)-xwgmin) )
258  pwgi(jj,jl) = pwgi(jj,jl) - zexcess(jj)
259  zexcessfc(jj,jl) = zexcessfc(jj,jl) + zexcess(jj)
260  IF(jl<idepth)THEN
261  pwgi(jj,jl+1) = pwgi(jj,jl+1) + zexcess(jj)*(pdzg(jj,jl)/pdzg(jj,jl+1))
262  zexcessfc(jj,jl+1)= zexcessfc(jj,jl+1) - zexcess(jj)*(pdzg(jj,jl)/pdzg(jj,jl+1))
263  ELSE
264  pwgi_excess(jj) = zexcess(jj)*pdzg(jj,idepth)*xrholw/ptstep
265  ENDIF
266  ENDIF
267  ENDDO
268 ENDDO
269 !
270 ! Prevent keeping track of very small numbers for ice content: (melt it)
271 ! and conserve energy:
272 !
273 DO jl=1,inl
274  DO jj=1,ini
275  idepth=kwg_layer(jj)
276  IF(jl<=idepth.AND.pwgi(jj,jl)>0.0.AND.pwgi(jj,jl)<1.0e-6)THEN
277  pwg(jj,jl) = pwg(jj,jl) + pwgi(jj,jl)
278  zexcessfc(jj,jl) = zexcessfc(jj,jl) + pwgi(jj,jl)
279  pwgi(jj,jl) = 0.0
280  ENDIF
281  ptg(jj,jl) = ptg(jj,jl) - zexcessfc(jj,jl)*xlmtt*xrholw/psoilhcapz(jj,jl)
282  ENDDO
283 ENDDO
284 !
285 !
286 IF (lhook) CALL dr_hook('ICE_SOILDIF',1,zhook_handle)
287 !
288 !-------------------------------------------------------------------------------
289 !
290 END SUBROUTINE ice_soildif
subroutine ice_soildif(PTSTEP, PTAUICE, PKSFC_IVEG, PLEGI, PSOILHCAPZ, PWSATZ, PMPOTSATZ, PBCOEFZ, PTG, PWGI, PWG, KWG_LAYER, PDZG, PWGI_EXCESS)
Definition: ice_soildif.F90:6