SURFEX v8.1
General documentation of Surfex
get_var_naturen.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_nature_n (S, DGO, D, DMI, &
7  HPROGRAM,KI,PQS,PSNG,PSNV,PZ0EFF,PZ0,PZ0H,PTWSNOW,PBARE)
8 ! ######################################################################
9 !
10 !!**** *GET_VAR_NATURE_n* - routine to get variables defined only over nature
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 ! M. Jidane 08/2008 Z0 and Z0H recovery from nature tiles
37 ! S. Riette 06/2010 TWSNOW added
38 ! V. Masson 02/2015 adds LAI, height of trees, fraction of bare soil
39 !-------------------------------------------------------------------------------
40 !
41 !* 0. DECLARATIONS
42 ! ------------
43 !
44 !
45 USE modd_isba_n, ONLY : isba_s_t
48 !
49 USE modi_get_luout
50 USE modd_surf_par, ONLY : xundef
51 USE modd_data_cover_par, ONLY : nvt_no
52 !
53 !
54 USE yomhook ,ONLY : lhook, dr_hook
55 USE parkind1 ,ONLY : jprb
56 !
57 IMPLICIT NONE
58 !
59 !* 0.1 Declarations of arguments
60 ! -------------------------
61 !
62 !
63 TYPE(isba_s_t), INTENT(INOUT) :: S
64 TYPE(diag_options_t), INTENT(INOUT) :: DGO
65 TYPE(diag_t), INTENT(INOUT) :: D
66 TYPE(diag_misc_isba_t), INTENT(INOUT) :: DMI
67 !
68  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM
69 INTEGER, INTENT(IN) :: KI ! Number of points
70 REAL, DIMENSION(KI), INTENT(OUT) :: PQS ! surface humidity
71 REAL, DIMENSION(KI), INTENT(OUT) :: PSNG ! snow fraction over ground
72 REAL, DIMENSION(KI), INTENT(OUT) :: PSNV ! snow fraction over vegetation
73 REAL, DIMENSION(KI), INTENT(OUT) :: PZ0EFF ! effective roughness length (z0v+z0rel)
74 REAL, DIMENSION(KI), INTENT(OUT) :: PZ0 ! surface roughness length
75 REAL, DIMENSION(KI), INTENT(OUT) :: PZ0H ! surface roughness length for heat
76 REAL, DIMENSION(KI), INTENT(OUT) :: PTWSNOW ! Snow total reservoir
77 REAL, DIMENSION(KI), INTENT(OUT) :: PBARE ! Bare soil fraction
78 !
79 !
80 !* 0.2 Declarations of local variables
81 ! -------------------------------
82 !
83 INTEGER :: ILUOUT
84 REAL(KIND=JPRB) :: ZHOOK_HANDLE
85 !
86 !-------------------------------------------------------------------------------
87 IF (lhook) CALL dr_hook('GET_VAR_NATURE_N',0,zhook_handle)
88  CALL get_luout(hprogram,iluout)
89 !-------------------------------------------------------------------------------
90 !
91 IF (dgo%LSURF_VARS) THEN
92  pqs = d%XQS
93  ELSE
94  pqs = xundef
95 ENDIF
96 !
97 IF (dmi%LSURF_MISC_BUDGET) THEN
98  psng = dmi%XPSNG
99  psnv = dmi%XPSNV
100  ptwsnow = dmi%XTWSNOW
101  ELSE
102  psng = xundef
103  psnv = xundef
104  ptwsnow = xundef
105 ENDIF
106 !
107 IF (dgo%LCOEF) THEN
108  pz0eff = d%XZ0EFF
109  pz0 = d%XZ0
110  pz0h = d%XZ0H
111 ELSE
112  pz0eff = xundef
113  pz0 = xundef
114  pz0h = xundef
115 ENDIF
116 !
117 pbare = s%XVEGTYPE(:,nvt_no)
118 !
119 IF (lhook) CALL dr_hook('GET_VAR_NATURE_N',1,zhook_handle)
120 !
121 !==============================================================================
122 !
123 END SUBROUTINE get_var_nature_n
subroutine get_var_nature_n(S, DGO, D, DMI, HPROGRAM, KI, PQS, PSNG, PSNV, PZ0EFF, PZ0,
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
logical lhook
Definition: yomhook.F90:15