SURFEX v8.1
General documentation of Surfex
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 REAL(KIND=JPRB) :: ZHOOK_HANDLE
62 !-------------------------------------------------------------------------------
63 !
64 IF (lhook) CALL dr_hook('INIT_SNOW_LW',0,zhook_handle)
65 !
66 !* 1. Emissivity
67 ! ----------
68 !
69 IF (tpsnow%SCHEME=='1-L' .OR. tpsnow%SCHEME=='3-L' .OR. tpsnow%SCHEME=='CRO') THEN
70  WHERE(tpsnow%WSNOW(:,1)==0. .OR. tpsnow%WSNOW(:,1)==xundef )
71  tpsnow%EMIS (:)= xundef
72  ELSEWHERE
73  tpsnow%EMIS (:)= pemissn
74  END WHERE
75 END IF
76 !
77 !* 2. Surface temperature
78 ! -------------------
79 !
80 IF (tpsnow%SCHEME=='1-L') THEN
81  WHERE(tpsnow%WSNOW(:,1)==0. .OR. tpsnow%WSNOW(:,1)==xundef )
82  tpsnow%TS (:)= xundef
83  ELSEWHERE
84  tpsnow%TS(:) = tpsnow%T(:, tpsnow%NLAYER)
85  END WHERE
86 END IF
87 !
88 IF (tpsnow%SCHEME=='3-L' .OR. tpsnow%SCHEME=='CRO') THEN
89  WHERE(tpsnow%WSNOW(:,1)==0. .OR. tpsnow%WSNOW(:,1)==xundef )
90  tpsnow%TS (:)= xundef
91  ELSEWHERE
92  tpsnow%TS(:) = xtt + (tpsnow%HEAT(:,1) + xlmtt * tpsnow%RHO(:,1)) / snow3lscap(tpsnow%RHO(:,1))
93  tpsnow%TS(:) = min(xtt, tpsnow%TS(:))
94  END WHERE
95 END IF
96 !
97 IF (lhook) CALL dr_hook('INIT_SNOW_LW',1,zhook_handle)
98 !
99 !-------------------------------------------------------------------------------
100 !
101 END SUBROUTINE init_snow_lw
subroutine init_snow_lw(PEMISSN, TPSNOW)
Definition: init_snow_lw.F90:7
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
real, save xtt
Definition: modd_csts.F90:66
real, save xlmtt
Definition: modd_csts.F90:72