SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
get_sfx_lake.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_sfx_lake (F, U, &
7  plake_evap,plake_rain,plake_snow,plake_watf)
8 ! ############################################################################
9 !
10 !!**** *GET_SFX_LAKE* - routine to get some variables from surfex to
11 ! a oceanic general circulation model
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 !! B. Decharme *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 10/2013
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 USE modd_flake_n, ONLY : flake_t
43 USE modd_surf_atm_n, ONLY : surf_atm_t
44 !
45 USE modd_surf_par, ONLY : xundef
46 !
47 !
48 !
50 !
51 USE yomhook ,ONLY : lhook, dr_hook
52 USE parkind1 ,ONLY : jprb
53 !
54 IMPLICIT NONE
55 !
56 !* 0.1 Declarations of arguments
57 ! -------------------------
58 !
59 !
60 TYPE(flake_t), INTENT(INOUT) :: f
61 TYPE(surf_atm_t), INTENT(INOUT) :: u
62 !
63 REAL, DIMENSION(:), INTENT(OUT) :: plake_evap ! Cumulated Evaporation (kg/m2)
64 REAL, DIMENSION(:), INTENT(OUT) :: plake_rain ! Cumulated Rainfall rate (kg/m2)
65 REAL, DIMENSION(:), INTENT(OUT) :: plake_snow ! Cumulated Snowfall rate (kg/m2)
66 REAL, DIMENSION(:), INTENT(OUT) :: plake_watf ! Cumulated Net water flux (kg/m2)
67 !
68 !* 0.2 Declarations of local variables
69 ! -------------------------------
70 !
71 REAL(KIND=JPRB) :: zhook_handle
72 !
73 !-------------------------------------------------------------------------------
74 IF (lhook) CALL dr_hook('GET_SFX_LAKE',0,zhook_handle)
75 !-------------------------------------------------------------------------------
76 !
77 !* 1.0 Initialization
78 ! --------------
79 !
80 plake_evap(:) = xundef
81 plake_rain(:) = xundef
82 plake_snow(:) = xundef
83 plake_watf(:) = xundef
84 !
85 !* 2.0 Get variable over lake
86 ! ----------------------
87 !
88 IF(u%NSIZE_WATER>0)THEN
89 !
90  CALL unpack_same_rank(u%NR_WATER(:),f%XCPL_FLAKE_EVAP(:),plake_evap(:),xundef)
91  CALL unpack_same_rank(u%NR_WATER(:),f%XCPL_FLAKE_RAIN(:),plake_rain(:),xundef)
92  CALL unpack_same_rank(u%NR_WATER(:),f%XCPL_FLAKE_SNOW(:),plake_snow(:),xundef)
93  f%XCPL_FLAKE_EVAP(:) = 0.0
94  f%XCPL_FLAKE_RAIN(:) = 0.0
95  f%XCPL_FLAKE_SNOW(:) = 0.0
96 !
97  plake_watf(:) = plake_rain(:) + plake_snow(:) - plake_evap(:)
98 !
99 ENDIF
100 !
101 !-------------------------------------------------------------------------------
102 IF (lhook) CALL dr_hook('GET_SFX_LAKE',1,zhook_handle)
103 !-------------------------------------------------------------------------------
104 !
105 END SUBROUTINE get_sfx_lake
subroutine get_sfx_lake(F, U, PLAKE_EVAP, PLAKE_RAIN, PLAKE_SNOW, PLAKE_WATF)
Definition: get_sfx_lake.F90:6