SURFEX v8.1
General documentation of Surfex
hydro_snow.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 hydro_snow(OGLACIER, PTSTEP, PVEGTYPE, PSR, PLES, PMELT, TPSNOW, PPG_MELT )
7 ! #####################################################################
8 !
9 !!**** *HYDRO_SNOW*
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 ! Calculates i) Snow water transfer to soil for both snow scheme options.
15 ! ii) the evolution of the snowpack using the Force-Restore
16 ! option of Douville et al. (1995): 'DEF'
17 ! Calculate the snow cover liquid water equivalent (Ws), the albedo and density of
18 ! the snow (i.e., SNOWALB and SNOWRHO). Also determine the runoff and drainage
19 ! into the soil.
20 !
21 !
22 !!** METHOD
23 !! ------
24 !
25 !! EXTERNAL
26 !! --------
27 !!REAL, DIMENSION(:), INTENT(INOUT) :: PTG
28 ! PTG = surface temperature at 't'
29 
30 !! none
31 !!
32 !! IMPLICIT ARGUMENTS
33 !! ------------------
34 !!
35 !!
36 !!
37 !! REFERENCE
38 !! ---------
39 !!
40 !! Noilhan and Planton (1989)
41 !! Belair (1995)
42 !!
43 !! AUTHOR
44 !! ------
45 !!
46 !! S. Belair * Meteo-France *
47 !!
48 !! MODIFICATIONS
49 !! -------------
50 !!
51 !! Original 14/03/95
52 !! 31/08/98 (V. Masson and F. Habets) add Dumenil et Todini
53 !! runoff scheme
54 !! 31/08/98 (V. Masson and A. Boone) add the third soil-water
55 !! reservoir (WG3,D3)
56 !! 14/05/02 (A. Boone) snow only, and skip code if '3-L' option in force
57 !! 03/2009 (B. Decharme) Consistency with Arpege permanent snow/ice treatment
58 !! (LGLACIER)
59 !-------------------------------------------------------------------------------
60 !
61 !* 0. DECLARATIONS
62 ! ------------
63 !
64 USE modd_type_snow, ONLY : surf_snow
65 !
66 USE modd_csts, ONLY : xlstt, xlmtt, xday
67 USE modd_snow_par, ONLY : xans_t, xans_todry, xansmin, xansmax, &
68  xrhosmax, xrhosmin, xwcrn, xaglamin, &
69  xaglamax
70 USE modd_surf_par, ONLY : xundef
71 USE modd_data_cover_par, ONLY : nvt_snow
72 !
73 !
74 USE yomhook ,ONLY : lhook, dr_hook
75 USE parkind1 ,ONLY : jprb
76 !
77 IMPLICIT NONE
78 !
79 !* 0.1 declarations of arguments
80 !
81 !
82 LOGICAL, INTENT(IN) :: OGLACIER ! True = Over permanent snow and ice,
83 ! initialise WGI=WSAT,
84 ! Hsnow>=10m and allow 0.8<SNOALB<0.85
85  ! False = No specific treatment
86 REAL, INTENT(IN) :: PTSTEP
87 ! timestep of the integration
88 REAL, DIMENSION(:,:), INTENT(IN) :: PVEGTYPE ! fraction of each vegetation
89 REAL, DIMENSION(:), INTENT(IN) :: PSR, PLES, PMELT
90 ! PSR = snow rate
91 ! PLES = latent heat of sublimation over the snow
92 ! PMELT = melting rate of snow
93 TYPE(surf_snow), INTENT(INOUT) :: TPSNOW
94 REAL, DIMENSION(:), INTENT(INOUT) :: PPG_MELT
95 ! TPSNOW%WSNOW(:,1,1) = equivalent water content of the
96 ! PPG_MELT = total water reaching the ground
97 !
98 !* 0.2 declarations of local variables
99 !
100 REAL, DIMENSION(SIZE(PSR)) :: ZSNOWSWEM, ZWSX, ZANSMIN, ZANSMAX
101 ! Prognostic variables of ISBA at 't-dt'
102 ! ZSNOWSWEM = equivalent water content of the
103 ! snow reservoir
104 ! ZANSMIN = Minimum glacier albedo
105 ! ZANSMAX = Maximum glacier albedo
106 REAL(KIND=JPRB) :: ZHOOK_HANDLE
107 !
108 !-------------------------------------------------------------------------------
109 IF (lhook) CALL dr_hook('HYDRO_SNOW',0,zhook_handle)
110 !-------------------------------------------------------------------------------
111 !
112 !* Douville et al. (1995) 'DEF' snow option
113 ! ----------------------------------------
114 !
115 !* 1. Initialize:
116 ! -----------
117 !
118 zwsx(:) = 0.0
119 zansmin(:) = xansmin
120 zansmax(:) = xansmax
121 !
122 !
123 !* 2. Fields at time t-dt
124 ! -------------------
125 !
126 zsnowswem(:) = tpsnow%WSNOW(:,1)
127 !
128 !* 3. EVOLUTION OF THE SNOWPACK ('DEF' OPTION)
129 ! ----------------------------------------
130 !
131 !* 3.A EVOLUTION OF THE EQUIVALENT WATER CONTENT snowSWE ('DEF' option)
132 ! --------------------------------------------------------------
133 !
134 ! evolution of Ws (without melting)
135 !
136 tpsnow%WSNOW(:,1) = zsnowswem(:) + ptstep * ( psr(:) - ples(:)/xlstt - pmelt(:))
137 !
138 ! melting of snow: more liquid water
139 ! reaches the surface
140 !
141 ppg_melt(:) = ppg_melt(:) + pmelt(:)
142 !
143 ! removes very small values due to computation precision
144 !
145 WHERE(tpsnow%WSNOW(:,1) < 1.0e-10) tpsnow%WSNOW(:,1) = 0.
146 !
147 !-------------------------------------------------------------------------------
148 !
149 !* 3.B EVOLUTION OF SNOW ALBEDO
150 ! ------------------------
151 !
152 IF(oglacier)THEN
153  zansmin(:) = xaglamin * pvegtype(:,nvt_snow) + xansmin * (1.0-pvegtype(:,nvt_snow))
154  zansmax(:) = xaglamax * pvegtype(:,nvt_snow) + xansmax * (1.0-pvegtype(:,nvt_snow))
155 ELSE
156  zansmin(:) = xansmin
157  zansmax(:) = xansmax
158 ENDIF
159 ! the evolution of the snow albedo differs
160 ! if there is melting or not
161 !
162 WHERE (tpsnow%WSNOW(:,1) > 0.0 )
163  !
164  WHERE ( zsnowswem > 0.0)
165  !
166  ! when there is melting
167  WHERE ( pmelt > 0.0 )
168  tpsnow%ALB(:) = (tpsnow%ALB(:)-zansmin(:))*exp(-xans_t*ptstep/xday) + zansmin(:) &
169  + psr(:)*ptstep/xwcrn*(zansmax(:)-zansmin(:))
170  ! when there is no melting
171  ELSEWHERE
172  tpsnow%ALB(:) = tpsnow%ALB(:) - xans_todry*ptstep/xday &
173  + psr(:)*ptstep/xwcrn*(zansmax(:)-zansmin(:))
174  END WHERE
175  !
176  ELSEWHERE (zsnowswem == 0.0)
177  !
178  ! new snow covered surface
179  tpsnow%ALB(:) = zansmax(:)
180  END WHERE
181  !
182  ! limits of the albedo
183  tpsnow%ALB(:) = min( zansmax(:), tpsnow%ALB(:) )
184  tpsnow%ALB(:) = max( zansmin(:), tpsnow%ALB(:) )
185 END WHERE
186 !
187 !-------------------------------------------------------------------------------
188 !
189 !* 3.C EVOLUTION OF SNOW DENSITY
190 ! -------------------------
191 !
192 ! as for the snow albedo, the density's
193 ! evolution will depend whether or not
194 ! the snow is melting
195 !
196 WHERE ( tpsnow%WSNOW(:,1) > 0.0 )
197  WHERE ( zsnowswem > 0.0 )
198  zwsx(:) = max( tpsnow%WSNOW(:,1),psr(:)*ptstep)
199  tpsnow%RHO(:,1) = (tpsnow%RHO(:,1)-xrhosmax)*exp(-xans_t*ptstep/xday) + xrhosmax
200  tpsnow%RHO(:,1) = ( (zwsx(:)-psr(:)*ptstep) * tpsnow%RHO(:,1) &
201  + (psr(:)*ptstep) * xrhosmin ) / zwsx(:)
202  ELSEWHERE ( zsnowswem == 0.0)
203  tpsnow%RHO(:,1) = xrhosmin
204  END WHERE
205 END WHERE
206 !
207 !-------------------------------------------------------------------------------
208 !
209 !* 4. No SNOW
210 ! -------
211 !
212 WHERE ( tpsnow%WSNOW(:,1) == 0.0 )
213  tpsnow%RHO(:,1) = xundef
214  tpsnow%ALB(:) = xundef
215 END WHERE
216 !
217 IF (lhook) CALL dr_hook('HYDRO_SNOW',1,zhook_handle)
218 !
219 !-------------------------------------------------------------------------------
220 !
221 END SUBROUTINE hydro_snow
real, save xlstt
Definition: modd_csts.F90:71
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
real, save xday
Definition: modd_csts.F90:45
logical lhook
Definition: yomhook.F90:15
subroutine hydro_snow(OGLACIER, PTSTEP, PVEGTYPE, PSR, PLES, PMELT
Definition: hydro_snow.F90:7
real, save xlmtt
Definition: modd_csts.F90:72