SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
soil_albedo.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 ! ###########
7 ! ###########
8 !
9 INTERFACE soil_albedo
10 !
11 !
12  SUBROUTINE soil_albedo_1d(HALBEDO, &
13  pwsat,pwg1, &
14  palbvis_dry,palbnir_dry,palbuv_dry, &
15  palbvis_wet,palbnir_wet,palbuv_wet, &
16  palbvis_soil, palbnir_soil,palbuv_soil )
17 !
18 !
19 !* 0.1 declarations of arguments
20 ! -------------------------
21 !
22  CHARACTER(LEN=*), INTENT(IN) :: halbedo
23 ! SOIL_ALBEDO dependance wxith surface soil water content
24 ! "EVOL" = SOIL_ALBEDO evolves with soil wetness
25 ! "DRY " = constant SOIL_ALBEDO value for dry soil
26 ! "WET " = constant SOIL_ALBEDO value for wet soil
27 ! "MEAN" = constant SOIL_ALBEDO value for medium soil wetness
28 !
29 REAL, DIMENSION(:), INTENT(IN) :: pwsat ! saturation water content
30 REAL, DIMENSION(:), INTENT(IN) :: pwg1 ! surface water content
31 REAL, DIMENSION(:), INTENT(IN) :: palbvis_dry ! visible, near infra-red and UV
32 REAL, DIMENSION(:), INTENT(IN) :: palbnir_dry ! dry soil albedo
33 REAL, DIMENSION(:), INTENT(IN) :: palbuv_dry !
34 REAL, DIMENSION(:), INTENT(IN) :: palbvis_wet ! visible, near infra-red and UV
35 REAL, DIMENSION(:), INTENT(IN) :: palbnir_wet ! wet soil albedo
36 REAL, DIMENSION(:), INTENT(IN) :: palbuv_wet ! wet soil albedo
37 !
38 REAL, DIMENSION(:), INTENT(OUT), OPTIONAL :: palbvis_soil! visible, near infra-red and UV
39 REAL, DIMENSION(:), INTENT(OUT), OPTIONAL :: palbnir_soil! soil albedo
40 REAL, DIMENSION(:), INTENT(OUT), OPTIONAL :: palbuv_soil !
41 !
42 END SUBROUTINE soil_albedo_1d
43 !
44  SUBROUTINE soil_albedo_1d_patch(HALBEDO, &
45  pwsat,pwg1, &
46  palbvis_dry,palbnir_dry,palbuv_dry, &
47  palbvis_wet,palbnir_wet,palbuv_wet, &
48  palbvis_soil, palbnir_soil,palbuv_soil )
49 !
50 !
51 !* 0.1 declarations of arguments
52 ! -------------------------
53 !
54 !
55  CHARACTER(LEN=*), INTENT(IN) :: halbedo
56 ! SOIL_ALBEDO dependance wxith surface soil water content
57 ! "EVOL" = SOIL_ALBEDO evolves with soil wetness
58 ! "DRY " = constant SOIL_ALBEDO value for dry soil
59 ! "WET " = constant SOIL_ALBEDO value for wet soil
60 ! "MEAN" = constant SOIL_ALBEDO value for medium soil wetness
61 !
62 REAL, DIMENSION(:), INTENT(IN) :: pwsat ! saturation water content
63 REAL, DIMENSION(:,:), INTENT(IN) :: pwg1 ! surface water content
64 REAL, DIMENSION(:), INTENT(IN) :: palbvis_dry ! visible, near infra-red and UV
65 REAL, DIMENSION(:), INTENT(IN) :: palbnir_dry ! dry soil albedo
66 REAL, DIMENSION(:), INTENT(IN) :: palbuv_dry !
67 REAL, DIMENSION(:), INTENT(IN) :: palbvis_wet ! visible, near infra-red and UV
68 REAL, DIMENSION(:), INTENT(IN) :: palbnir_wet ! wet soil albedo
69 REAL, DIMENSION(:), INTENT(IN) :: palbuv_wet !
70 !
71 REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: palbvis_soil! visible, near infra-red and UV
72 REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: palbnir_soil! soil albedo
73 REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: palbuv_soil !
74 !
75 END SUBROUTINE soil_albedo_1d_patch
76 !
77 END INTERFACE
78 !
79 END MODULE modi_soil_albedo
80 !
81 ! ####################################################################
82  SUBROUTINE soil_albedo_1d(HALBEDO, &
83  pwsat,pwg1, &
84  palbvis_dry,palbnir_dry,palbuv_dry, &
85  palbvis_wet,palbnir_wet,palbuv_wet, &
86  palbvis_soil, palbnir_soil,palbuv_soil )
87 ! ####################################################################
88 !
89 !!**** *SOIL_ALBEDO*
90 !!
91 !! PURPOSE
92 !! -------
93 ! computes the SOIL ALBEDO of the natural continental parts.
94 !
95 ! Soil SOIL_ALBEDO is estimated from sand fraction.
96 ! A correction due to the soil humidity can be used.
97 !
98 !
99 !!** METHOD
100 !! ------
101 !
102 !! EXTERNAL
103 !! --------
104 !!
105 !! IMPLICIT ARGUMENTS
106 !! ------------------
107 !!
108 !!
109 !! REFERENCE
110 !! ---------
111 !!
112 !!
113 !! AUTHOR
114 !! ------
115 !! V. Masson * Meteo-France *
116 !!
117 !! MODIFICATIONS
118 !! -------------
119 !! Original 17/12/99
120 !-------------------------------------------------------------------------------
121 !
122 !* 0. DECLARATIONS
123 ! ------------
124 !
125 !
126 USE yomhook ,ONLY : lhook, dr_hook
127 USE parkind1 ,ONLY : jprb
128 !
129 IMPLICIT NONE
130 !
131 !* 0.1 declarations of arguments
132 ! -------------------------
133 !
134  CHARACTER(LEN=*), INTENT(IN) :: halbedo
135 ! SOIL_ALBEDO dependance wxith surface soil water content
136 ! "EVOL" = SOIL_ALBEDO evolves with soil wetness
137 ! "DRY " = constant SOIL_ALBEDO value for dry soil
138 ! "WET " = constant SOIL_ALBEDO value for wet soil
139 ! "MEAN" = constant SOIL_ALBEDO value for medium soil wetness
140 !
141 REAL, DIMENSION(:), INTENT(IN) :: pwsat ! saturation water content
142 REAL, DIMENSION(:), INTENT(IN) :: pwg1 ! surface water content
143 REAL, DIMENSION(:), INTENT(IN) :: palbvis_dry ! visible, near infra-red and UV
144 REAL, DIMENSION(:), INTENT(IN) :: palbnir_dry ! dry soil albedo
145 REAL, DIMENSION(:), INTENT(IN) :: palbuv_dry !
146 REAL, DIMENSION(:), INTENT(IN) :: palbvis_wet ! visible, near infra-red and UV
147 REAL, DIMENSION(:), INTENT(IN) :: palbnir_wet ! wet soil albedo
148 REAL, DIMENSION(:), INTENT(IN) :: palbuv_wet !
149 !
150 REAL, DIMENSION(:), INTENT(OUT), OPTIONAL :: palbvis_soil! visible, near infra-red and UV
151 REAL, DIMENSION(:), INTENT(OUT), OPTIONAL :: palbnir_soil! soil albedo
152 REAL, DIMENSION(:), INTENT(OUT), OPTIONAL :: palbuv_soil !
153 !
154 !* 0.2 declarations of local variables
155 ! -------------------------------
156 !
157 REAL, DIMENSION(SIZE(PWSAT)) :: zx
158 REAL(KIND=JPRB) :: zhook_handle
159 !
160 !-------------------------------------------------------------------------------
161 !
162 IF (lhook) CALL dr_hook('MODI_SOIL_ALBEDO:SOIL_ALBEDO_1D',0,zhook_handle)
163 IF (halbedo=='USER' .AND. lhook) CALL dr_hook('MODI_SOIL_ALBEDO:SOIL_ALBEDO_1D',1,zhook_handle)
164 IF (halbedo=='USER') RETURN
165 !
166 SELECT CASE ( halbedo )
167  CASE ('EVOL')
168 !
169  zx = min( pwg1(:)/pwsat(:) , 1. )
170 !
171 !* linear formula
172 ! ZALBVIS_SOIL(:) = PALBVIS_DRY(:) + ZX(:)*(PALBVIS_WET(:)-PALBVIS_DRY(:))
173 ! ZALBNIR_SOIL(:) = PALBNIR_DRY(:) + ZX(:)*(PALBNIR_WET(:)-PALBNIR_DRY(:))
174 ! ZALBUV_SOIL (:) = PALBUV_DRY (:) + ZX(:)*(PALBUV_WET (:)-PALBUV_DRY (:))
175 !* quadratic formula
176  IF (present(palbvis_soil)) &
177  palbvis_soil(:) = palbvis_wet(:) &
178  + (0.25*palbvis_dry(:)-palbvis_wet(:)) &
179  * (1. - zx(:)) &
180  * ( zx(:) + ( palbvis_dry(:)-palbvis_wet(:)) &
181  /(0.25*palbvis_dry(:)-palbvis_wet(:)) )
182  IF (present(palbnir_soil)) &
183  palbnir_soil(:) = palbnir_wet(:) &
184  + (0.25*palbnir_dry(:)-palbnir_wet(:)) &
185  * (1. - zx(:)) &
186  * ( zx(:) + ( palbnir_dry(:)-palbnir_wet(:)) &
187  /(0.25*palbnir_dry(:)-palbnir_wet(:)) )
188  IF (present(palbuv_soil)) &
189  palbuv_soil(:) = palbuv_wet(:) &
190  + (0.25*palbuv_dry(:)-palbuv_wet(:)) &
191  * (1. - zx(:)) &
192  * ( zx(:) + ( palbuv_dry(:)-palbuv_wet(:)) &
193  /(0.25*palbuv_dry(:)-palbuv_wet(:)) )
194 !
195  CASE ('DRY ')
196  IF (present(palbvis_soil)) palbvis_soil(:) = palbvis_dry(:)
197  IF (present(palbnir_soil)) palbnir_soil(:) = palbnir_dry(:)
198  IF (present(palbuv_soil)) palbuv_soil(:) = palbuv_dry(:)
199  CASE ('WET ')
200  IF (present(palbvis_soil)) palbvis_soil(:) = palbvis_wet(:)
201  IF (present(palbnir_soil)) palbnir_soil(:) = palbnir_wet(:)
202  IF (present(palbuv_soil)) palbuv_soil(:) = palbuv_wet(:)
203  CASE ('MEAN')
204  IF (present(palbvis_soil)) palbvis_soil(:) = 0.5 * ( palbvis_dry(:) + palbvis_wet(:) )
205  IF (present(palbnir_soil)) palbnir_soil(:) = 0.5 * ( palbnir_dry(:) + palbnir_wet(:) )
206  IF (present(palbuv_soil)) palbuv_soil(:) = 0.5 * ( palbuv_dry(:) + palbuv_wet(:) )
207 END SELECT
208 IF (lhook) CALL dr_hook('MODI_SOIL_ALBEDO:SOIL_ALBEDO_1D',1,zhook_handle)
209 !
210 !-------------------------------------------------------------------------------
211 !
212 END SUBROUTINE soil_albedo_1d
213 !
214 !-------------------------------------------------------------------------------
215 !
216 ! ####################################################################
217  SUBROUTINE soil_albedo_1d_patch(HALBEDO, &
218  pwsat,pwg1, &
219  palbvis_dry,palbnir_dry,palbuv_dry, &
220  palbvis_wet,palbnir_wet,palbuv_wet, &
221  palbvis_soil, palbnir_soil,palbuv_soil )
222 ! ####################################################################
223 !
224 !!**** *SOIL_ALBEDO*
225 !!
226 !! PURPOSE
227 !! -------
228 ! computes the SOIL_ALBEDO of for different types (patches)
229 ! of natural continental parts.
230 !
231 ! Soil SOIL_ALBEDO is estimated from sand fraction.
232 ! A correction due to the soil humidity can be used.
233 !
234 !
235 !!** METHOD
236 !! ------
237 !
238 !! EXTERNAL
239 !! --------
240 !!
241 !! IMPLICIT ARGUMENTS
242 !! ------------------
243 !!
244 !!
245 !! REFERENCE
246 !! ---------
247 !!
248 !!
249 !! AUTHOR
250 !! ------
251 !! F.Solmon / V. Masson
252 !!
253 !! MODIFICATIONS
254 !! -------------
255 !! Original
256 !-------------------------------------------------------------------------------
257 !
258 !* 0. DECLARATIONS
259 ! ------------
260 !
261 USE modd_surf_par, ONLY : xundef
262 !
263 USE yomhook ,ONLY : lhook, dr_hook
264 USE parkind1 ,ONLY : jprb
265 !
266 IMPLICIT NONE
267 !
268 !* 0.1 declarations of arguments
269 ! -------------------------
270 !
271  CHARACTER(LEN=*), INTENT(IN) :: halbedo
272 ! SOIL_ALBEDO dependance wxith surface soil water content
273 ! "EVOL" = SOIL_ALBEDO evolves with soil wetness
274 ! "DRY " = constant SOIL_ALBEDO value for dry soil
275 ! "WET " = constant SOIL_ALBEDO value for wet soil
276 ! "MEAN" = constant SOIL_ALBEDO value for medium soil wetness
277 !
278 REAL, DIMENSION(:), INTENT(IN) :: pwsat ! saturation water content
279 REAL, DIMENSION(:,:), INTENT(IN) :: pwg1 ! surface water content
280 REAL, DIMENSION(:), INTENT(IN) :: palbvis_dry ! visible, near infra-red and UV
281 REAL, DIMENSION(:), INTENT(IN) :: palbnir_dry ! dry soil albedo
282 REAL, DIMENSION(:), INTENT(IN) :: palbuv_dry !
283 REAL, DIMENSION(:), INTENT(IN) :: palbvis_wet ! visible, near infra-red and UV
284 REAL, DIMENSION(:), INTENT(IN) :: palbnir_wet ! wet soil SOIL_ALBEDO
285 REAL, DIMENSION(:), INTENT(IN) :: palbuv_wet !
286 !
287 REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: palbvis_soil! visible, near infra-red and UV
288 REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: palbnir_soil! soil albedo
289 REAL, DIMENSION(:,:), INTENT(OUT), OPTIONAL :: palbuv_soil !
290 !
291 !* 0.2 declarations of local variables
292 ! -------------------------------
293 !
294 REAL, DIMENSION(SIZE(PWSAT)) :: zx
295 !
296 INTEGER :: ipatch ! number of patches
297 INTEGER :: jpatch !loop index for patches
298 REAL(KIND=JPRB) :: zhook_handle
299 !-------------------------------------------------------------------------------
300 !
301 IF (lhook) CALL dr_hook('MODI_SOIL_ALBEDO:SOIL_ALBEDO_1D_PATCH',0,zhook_handle)
302 IF (halbedo=='USER' .AND. lhook) CALL dr_hook('MODI_SOIL_ALBEDO:SOIL_ALBEDO_1D_PATCH',1,zhook_handle)
303 IF (halbedo=='USER') RETURN
304 !
305 ipatch = SIZE(pwg1,2)
306 
307 IF (present(palbvis_soil)) palbvis_soil = xundef
308 IF (present(palbnir_soil)) palbnir_soil = xundef
309 IF (present(palbuv_soil)) palbuv_soil = xundef
310 !
311 SELECT CASE ( halbedo )
312  CASE ('EVOL')
313 
314  DO jpatch=1,ipatch
315  zx = min( pwg1(:,jpatch)/pwsat(:) , 1. )
316 
317  !WHERE (PWG1(:,JPATCH)/=XUNDEF)
318  !* linear formula
319  ! ZALBVIS_SOIL(:) = PALBVIS_DRY(:) + ZX(:)*(PALBVIS_WET(:)-PALBVIS_DRY(:))
320  ! ZALBNIR_SOIL(:) = PALBNIR_DRY(:) + ZX(:)*(PALBNIR_WET(:)-PALBNIR_DRY(:))
321  ! ZALBUV_SOIL (:) = PALBUV_DRY (:) + ZX(:)*(PALBUV_WET (:)-PALBUV_DRY (:))
322  !* quadratic formula
323  IF (present(palbvis_soil)) &
324  WHERE (pwg1(:,jpatch)/=xundef) &
325  palbvis_soil(:,jpatch) = palbvis_wet(:) &
326  + (0.25*palbvis_dry(:)-palbvis_wet(:)) &
327  * (1. - zx(:)) &
328  * ( zx(:) + ( palbvis_dry(:)-palbvis_wet(:)) &
329  /(0.25*palbvis_dry(:)-palbvis_wet(:)) )
330  IF (present(palbnir_soil)) &
331  WHERE (pwg1(:,jpatch)/=xundef) &
332  palbnir_soil(:,jpatch) = palbnir_wet(:) &
333  + (0.25*palbnir_dry(:)-palbnir_wet(:)) &
334  * (1. - zx(:)) &
335  * ( zx(:) + ( palbnir_dry(:)-palbnir_wet(:)) &
336  /(0.25*palbnir_dry(:)-palbnir_wet(:)) )
337  IF (present(palbuv_soil)) &
338  WHERE (pwg1(:,jpatch)/=xundef) &
339  palbuv_soil(:,jpatch) = palbuv_wet(:) &
340  + (0.25*palbuv_dry(:)-palbuv_wet(:)) &
341  * (1. - zx(:)) &
342  * ( zx(:) + ( palbuv_dry(:)-palbuv_wet(:)) &
343  /(0.25*palbuv_dry(:)-palbuv_wet(:)) )
344 
345  !END WHERE
346  END DO
347 
348  CASE ('DRY ')
349  IF (present(palbvis_soil)) palbvis_soil(:,:) = spread(palbvis_dry(:),2,ipatch)
350  IF (present(palbnir_soil)) palbnir_soil(:,:) = spread(palbnir_dry(:),2,ipatch)
351  IF (present(palbuv_soil)) palbuv_soil(:,:) = spread(palbuv_dry(:),2,ipatch)
352 
353  CASE ('WET ')
354  IF (present(palbvis_soil)) palbvis_soil(:,:) = spread(palbvis_wet(:),2,ipatch)
355  IF (present(palbnir_soil)) palbnir_soil(:,:) = spread(palbnir_wet(:),2,ipatch)
356  IF (present(palbuv_soil)) palbuv_soil(:,:) = spread(palbuv_wet(:),2,ipatch)
357 
358  CASE ('MEAN')
359  IF (present(palbvis_soil)) palbvis_soil(:,:) = 0.5 * ( spread(palbvis_dry(:),2,ipatch) + spread(palbvis_wet(:),2,ipatch) )
360  IF (present(palbnir_soil)) palbnir_soil(:,:) = 0.5 * ( spread(palbnir_dry(:),2,ipatch) + spread(palbnir_wet(:),2,ipatch) )
361  IF (present(palbuv_soil)) palbuv_soil(:,:) = 0.5 * ( spread(palbuv_dry(:),2,ipatch) + spread(palbuv_wet(:),2,ipatch) )
362 
363 END SELECT
364 IF (lhook) CALL dr_hook('MODI_SOIL_ALBEDO:SOIL_ALBEDO_1D_PATCH',1,zhook_handle)
365 !
366 !-------------------------------------------------------------------------------
367 !
368 END SUBROUTINE soil_albedo_1d_patch
subroutine soil_albedo_1d_patch(HALBEDO, PWSAT, PWG1, PALBVIS_DRY, PALBNIR_DRY, PALBUV_DRY, PALBVIS_WET, PALBNIR_WET, PALBUV_WET, PALBVIS_SOIL, PALBNIR_SOIL, PALBUV_SOIL)
subroutine soil_albedo_1d(HALBEDO, PWSAT, PWG1, PALBVIS_DRY, PALBNIR_DRY, PALBUV_DRY, PALBVIS_WET, PALBNIR_WET, PALBUV_WET, PALBVIS_SOIL, PALBNIR_SOIL, PALBUV_SOIL)
Definition: soil_albedo.F90:82