SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_watfluxn.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 write_watflux_n (DTCO, DGU, U, WM, &
7  hprogram,hwrite)
8 ! ####################################
9 !
10 !!**** *WRITE_WATFLUX_n* - routine to write surface variables in their respective files
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 !! V. Masson *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 01/2003
36 !! Modified 06/2007, P.LeMoigne: do not write pgd fields in
37 !! historical files
38 !! B. Decharme 07/2011 : Suppress pgd output
39 !-------------------------------------------------------------------------------
40 !
41 !* 0. DECLARATIONS
42 ! ------------
43 !
44 !
46 !
49 USE modd_surf_atm_n, ONLY : surf_atm_t
50 !
51 USE modd_write_surf_atm, ONLY : lnowrite_canopy
52 USE modi_init_io_surf_n
53 USE modi_writesurf_watflux_n
54 USE modi_writesurf_watflux_conf_n
55 USE modi_writesurf_watflux_sbl_n
56 USE modi_end_io_surf_n
57 !
58 !
59 USE yomhook ,ONLY : lhook, dr_hook
60 USE parkind1 ,ONLY : jprb
61 !
62 IMPLICIT NONE
63 !
64 !* 0.1 Declarations of arguments
65 ! -------------------------
66 !
67 !
68 !
69 TYPE(data_cover_t), INTENT(INOUT) :: dtco
70 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
71 TYPE(surf_atm_t), INTENT(INOUT) :: u
72 TYPE(watflux_model_t), INTENT(INOUT) :: wm
73 !
74  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
75  CHARACTER(LEN=3), INTENT(IN) :: hwrite ! 'PREP' : does not write SBL XUNDEF fields
76 ! ! 'ALL' : all fields are written
77 !* 0.2 Declarations of local variables
78 ! -------------------------------
79 !
80 REAL(KIND=JPRB) :: zhook_handle
81 !-------------------------------------------------------------------------------
82 !
83 !
84 IF (lhook) CALL dr_hook('WRITE_WATFLUX_N',0,zhook_handle)
85  CALL init_io_surf_n(dtco, dgu, u, &
86  hprogram,'WATER ','WATFLX','WRITE')
87 !
88 !* 1. Selection of surface scheme
89 ! ---------------------------
90 !
91  CALL writesurf_watflux_conf_n(wm%CHW, wm%W, &
92  hprogram)
93  CALL writesurf_watflux_n(dgu, u, &
94  wm%W, &
95  hprogram)
96 !
97 IF ((.NOT.lnowrite_canopy).OR.dgu%LSELECT) CALL writesurf_watflux_sbl_n(dgu, u, &
98  wm%W, wm%WSB, &
99  hprogram,hwrite)
100 !
101 !-------------------------------------------------------------------------------
102 !
103 ! End of IO
104 !
105  CALL end_io_surf_n(hprogram)
106 IF (lhook) CALL dr_hook('WRITE_WATFLUX_N',1,zhook_handle)
107 !
108 END SUBROUTINE write_watflux_n
subroutine writesurf_watflux_conf_n(CHW, W, HPROGRAM)
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine write_watflux_n(DTCO, DGU, U, WM, HPROGRAM, HWRITE)
subroutine writesurf_watflux_n(DGU, U, W, HPROGRAM)
subroutine writesurf_watflux_sbl_n(DGU, U, W, WSB, HPROGRAM, HWRITE)
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6