SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
get_var_watern.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 get_var_water_n (DGF, DGW, &
7  hprogram,ki,hwater,pqs,pz0,pz0h)
8 ! ###########################################################
9 !
10 !!**** *GET_VAR_WATER_n* - routine to get variables defined only over water
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! P. Le Moigne *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 02/2006
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
44 !
45 USE modi_get_luout
46 USE modd_surf_par, ONLY : xundef
47 !
48 !
49 USE yomhook ,ONLY : lhook, dr_hook
50 USE parkind1 ,ONLY : jprb
51 !
52 IMPLICIT NONE
53 !
54 !* 0.1 Declarations of arguments
55 ! -------------------------
56 !
57 !
58 TYPE(diag_flake_t), INTENT(INOUT) :: dgf
59 TYPE(diag_watflux_t), INTENT(INOUT) :: dgw
60 !
61  CHARACTER(LEN=6), INTENT(IN) :: hprogram
62  CHARACTER(LEN=6), INTENT(IN) :: hwater
63 INTEGER, INTENT(IN) :: ki ! Number of points
64 REAL, DIMENSION(KI), INTENT(OUT) :: pqs ! surface humidity
65 REAL, DIMENSION(KI), INTENT(OUT) :: pz0 ! surface roughness length
66 REAL, DIMENSION(KI), INTENT(OUT) :: pz0h ! surface roughness length for heat
67 !
68 !
69 !* 0.2 Declarations of local variables
70 ! -------------------------------
71 !
72 INTEGER :: iluout
73 REAL(KIND=JPRB) :: zhook_handle
74 !
75 IF (lhook) CALL dr_hook('GET_VAR_WATER_N',0,zhook_handle)
76 IF (hwater=='FLAKE') THEN
77  CALL get_var_flake_n
78 ELSE
79  CALL get_var_watflx_n
80 END IF
81 !
82 IF (lhook) CALL dr_hook('GET_VAR_WATER_N',1,zhook_handle)
83  CONTAINS
84 !
85 !------------------------------------------------------------------------------
86 !------------------------------------------------------------------------------
87 !
88 SUBROUTINE get_var_watflx_n
89 !
90 !
91 !-------------------------------------------------------------------------------
92 
93 REAL(KIND=JPRB) :: zhook_handle
94 
95 IF (lhook) CALL dr_hook('GET_VAR_WATFLX_N',0,zhook_handle)
96  CALL get_luout(hprogram,iluout)
97 !-------------------------------------------------------------------------------
98 !
99 IF (dgw%LSURF_VARS) THEN
100  pqs = dgw%XQS
101 ELSE
102  pqs = xundef
103 ENDIF
104 IF (dgw%LCOEF) THEN
105  pz0 = dgw%XZ0
106  pz0h = dgw%XZ0H
107 ELSE
108  pz0 = xundef
109  pz0h = xundef
110 ENDIF
111 IF (lhook) CALL dr_hook('GET_VAR_WATFLX_N',1,zhook_handle)
112 !
113 END SUBROUTINE get_var_watflx_n
114 !
115 !-------------------------------------------------------------------------------
116 !
117 SUBROUTINE get_var_flake_n
118 !
119 !
120 !-------------------------------------------------------------------------------
121 
122 REAL(KIND=JPRB) :: zhook_handle
123 
124 IF (lhook) CALL dr_hook('GET_VAR_FLAKE_N',0,zhook_handle)
125  CALL get_luout(hprogram,iluout)
126 !-------------------------------------------------------------------------------
127 !
128 IF (dgf%LSURF_VARS) THEN
129  pqs = dgf%XQS
130 ELSE
131  pqs = xundef
132 ENDIF
133 IF (dgf%LCOEF) THEN
134  pz0 = dgf%XZ0
135  pz0h = dgf%XZ0H
136 ELSE
137  pz0 = xundef
138  pz0h = xundef
139 ENDIF
140 IF (lhook) CALL dr_hook('GET_VAR_FLAKE_N',1,zhook_handle)
141 !
142 END SUBROUTINE get_var_flake_n
143 !
144 !==============================================================================
145 !
146 END SUBROUTINE get_var_water_n
subroutine get_var_flake_n
subroutine get_var_water_n(DGF, DGW, HPROGRAM, KI, HWATER, PQS, PZ0, PZ0H)
subroutine get_var_watflx_n
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6