SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
init_snow_lw.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 init_snow_lw(PEMISSN,TPSNOW)
7 ! #######################################
8 !
9 !!**** *INIT_SNOW_LW* - routine to initialize snow surf. temp and emissivity
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! V. Masson *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 01/2003
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
41 USE modd_surf_par, ONLY : xundef
42 USE modd_csts, ONLY : xtt, xlmtt
43 !
44 USE mode_snow3l
45 !
46 !
47 USE yomhook ,ONLY : lhook, dr_hook
48 USE parkind1 ,ONLY : jprb
49 !
50 IMPLICIT NONE
51 !
52 !* 0.1 Declarations of arguments
53 ! -------------------------
54 !
55 REAL, INTENT(IN) :: pemissn ! snow emissivity
56 TYPE(surf_snow), INTENT(INOUT) :: tpsnow ! snow characteristics
57 !
58 !* 0.2 Declarations of local variables
59 ! -------------------------------
60 !
61 INTEGER :: jpatch ! loop counter on tiles
62 REAL(KIND=JPRB) :: zhook_handle
63 !-------------------------------------------------------------------------------
64 !
65 IF (lhook) CALL dr_hook('INIT_SNOW_LW',0,zhook_handle)
66 DO jpatch=1,SIZE(tpsnow%WSNOW,3)
67 !
68 !* 1. Emissivity
69 ! ----------
70 !
71  IF (tpsnow%SCHEME=='1-L' .OR. tpsnow%SCHEME=='3-L' .OR. tpsnow%SCHEME=='CRO') THEN
72  WHERE(tpsnow%WSNOW(:,1,jpatch)==0. .OR. tpsnow%WSNOW(:,1,jpatch)==xundef )
73  tpsnow%EMIS (:,jpatch)= xundef
74  ELSEWHERE
75  tpsnow%EMIS (:,jpatch)= pemissn
76  END WHERE
77  END IF
78 !
79 !* 2. Surface temperature
80 ! -------------------
81 !
82  IF (tpsnow%SCHEME=='1-L') THEN
83  WHERE(tpsnow%WSNOW(:,1,jpatch)==0. .OR. tpsnow%WSNOW(:,1,jpatch)==xundef )
84  tpsnow%TS (:,jpatch)= xundef
85  ELSEWHERE
86  tpsnow%TS(:,jpatch) = tpsnow%T(:, tpsnow%NLAYER,jpatch)
87  END WHERE
88  END IF
89 !
90  IF (tpsnow%SCHEME=='3-L' .OR. tpsnow%SCHEME=='CRO') THEN
91  WHERE(tpsnow%WSNOW(:,1,jpatch)==0. .OR. tpsnow%WSNOW(:,1,jpatch)==xundef )
92  tpsnow%TS (:,jpatch)= xundef
93  ELSEWHERE
94  tpsnow%TS(:,jpatch) = xtt + (tpsnow%HEAT(:,1,jpatch) &
95  + xlmtt * tpsnow%RHO(:,1,jpatch) ) &
96  / snow3lscap(tpsnow%RHO(:,1,jpatch))
97  tpsnow%TS(:,jpatch) = min(xtt, tpsnow%TS(:,jpatch))
98  END WHERE
99  END IF
100 !
101 END DO
102 IF (lhook) CALL dr_hook('INIT_SNOW_LW',1,zhook_handle)
103 !
104 !-------------------------------------------------------------------------------
105 !
106 END SUBROUTINE init_snow_lw
subroutine init_snow_lw(PEMISSN, TPSNOW)
Definition: init_snow_lw.F90:6