SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
pgd_watflux.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 pgd_watflux (DTCO, U, WG, W, &
7  hprogram)
8 ! ##############################################################
9 !
10 !!**** *PGD_WATFLUX* monitor for averaging and interpolations of WATFLUX physiographic fields
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !! METHOD
16 !! ------
17 !!
18 !
19 !! EXTERNAL
20 !! --------
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !! AUTHOR
29 !! ------
30 !!
31 !! V. Masson Meteo-France
32 !!
33 !! MODIFICATION
34 !! ------------
35 !!
36 !! Original 03/2004
37 !!
38 !----------------------------------------------------------------------------
39 !
40 !* 0. DECLARATION
41 ! -----------
42 !
43 !
44 !
46 USE modd_surf_atm_n, ONLY : surf_atm_t
48 USE modd_watflux_n, ONLY : watflux_t
49 !
50 USE modd_data_cover_par, ONLY : jpcover
51 !
52 USE modi_get_surf_size_n
53 USE modi_pack_pgd
54 !
55 !
56 USE yomhook ,ONLY : lhook, dr_hook
57 USE parkind1 ,ONLY : jprb
58 !
59 USE modi_write_cover_tex_water
60 !
61 IMPLICIT NONE
62 !
63 !* 0.1 Declaration of arguments
64 ! ------------------------
65 !
66 !
67 TYPE(data_cover_t), INTENT(INOUT) :: dtco
68 TYPE(surf_atm_t), INTENT(INOUT) :: u
69 TYPE(watflux_grid_t), INTENT(INOUT) :: wg
70 TYPE(watflux_t), INTENT(INOUT) :: w
71 !
72  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! Type of program
73 REAL(KIND=JPRB) :: zhook_handle
74 !
75 !
76 !* 0.2 Declaration of local variables
77 ! ------------------------------
78 !
79 !* 0.3 Declaration of namelists
80 ! ------------------------
81 !
82 !-------------------------------------------------------------------------------
83 !
84 !* 1. Initializations of defaults
85 ! ---------------------------
86 !
87 !-------------------------------------------------------------------------------
88 !
89 !* 2. Reading of namelist
90 ! -------------------
91 !
92 !-------------------------------------------------------------------------------
93 !
94 !* 3. Coherence of options
95 ! --------------------
96 !
97 !-------------------------------------------------------------------------------
98 !
99 !* 4. Number of points and packing
100 ! ----------------------------
101 !
102 IF (lhook) CALL dr_hook('PGD_WATFLUX',0,zhook_handle)
103  CALL get_surf_size_n(dtco, u, &
104  'WATER ',wg%NDIM)
105 !
106 ALLOCATE(w%LCOVER (jpcover))
107 ALLOCATE(w%XZS (wg%NDIM))
108 ALLOCATE(wg%XLAT (wg%NDIM))
109 ALLOCATE(wg%XLON (wg%NDIM))
110 ALLOCATE(wg%XMESH_SIZE (wg%NDIM))
111 !
112  CALL pack_pgd(dtco, u, &
113  hprogram, 'WATER ', &
114  wg%CGRID, wg%XGRID_PAR, &
115  w%LCOVER, w%XCOVER, w%XZS, &
116  wg%XLAT, wg%XLON, wg%XMESH_SIZE )
117 !
118 !-------------------------------------------------------------------------------
119  CALL write_cover_tex_water
120 IF (lhook) CALL dr_hook('PGD_WATFLUX',1,zhook_handle)
121 !-------------------------------------------------------------------------------
122 !
123 END SUBROUTINE pgd_watflux
subroutine get_surf_size_n(DTCO, U, HTYPE, KL)
subroutine pack_pgd(DTCO, U, HPROGRAM, HSURF, HGRID, PGRID_PAR, OCOVER, PCOVER, PZS, PLAT, PLON, PMESH_SIZE, PDIR)
Definition: pack_pgd.F90:6
subroutine pgd_watflux(DTCO, U, WG, W, HPROGRAM)
Definition: pgd_watflux.F90:6