SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_flaken.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_flake_n (DTCO, DGU, U, FM, &
7  hprogram,hwrite)
8 ! ####################################
9 !
10 !!**** *WRITE_FLAKE_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 !! B. Decharme 07/2011 : Suppress pgd output
37 !-------------------------------------------------------------------------------
38 !
39 !* 0. DECLARATIONS
40 ! ------------
41 !
42 !
43 USE modd_surfex_n, ONLY : flake_model_t
44 !
47 USE modd_surf_atm_n, ONLY : surf_atm_t
48 !
49 USE modd_write_surf_atm, ONLY : lnowrite_canopy
50 USE modi_init_io_surf_n
51 USE modi_writesurf_flake_n
52 USE modi_writesurf_flake_sbl_n
53 USE modi_writesurf_flake_conf_n
54 USE modi_end_io_surf_n
55 !
56 !
57 USE yomhook ,ONLY : lhook, dr_hook
58 USE parkind1 ,ONLY : jprb
59 !
60 IMPLICIT NONE
61 !
62 !* 0.1 Declarations of arguments
63 ! -------------------------
64 !
65 !
66 TYPE(data_cover_t), INTENT(INOUT) :: dtco
67 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
68 TYPE(surf_atm_t), INTENT(INOUT) :: u
69 TYPE(flake_model_t), INTENT(INOUT) :: fm
70 !
71  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
72  CHARACTER(LEN=3), INTENT(IN) :: hwrite ! 'PREP' : does not write SBL XUNDEF fields
73 ! ! 'ALL' : all fields are written
74 !* 0.2 Declarations of local variables
75 ! -------------------------------
76 !
77 REAL(KIND=JPRB) :: zhook_handle
78 !-------------------------------------------------------------------------------
79 !
80 !
81 IF (lhook) CALL dr_hook('WRITE_FLAKE_N',0,zhook_handle)
82  CALL init_io_surf_n(dtco, dgu, u, &
83  hprogram,'WATER ','FLAKE ','WRITE')
84 !
85 !* 1. Selection of surface scheme
86 ! ---------------------------
87 !
88  CALL writesurf_flake_conf_n(fm%CHF, fm%DGMF, fm%F, &
89  hprogram)
90  CALL writesurf_flake_n(dgu, u, &
91  fm%F, &
92  hprogram)
93 !
94 IF ((.NOT.lnowrite_canopy).OR.dgu%LSELECT) CALL writesurf_flake_sbl_n(dgu, u, &
95  fm%F, fm%FSB, &
96  hprogram,hwrite)
97 !
98 !
99 !-------------------------------------------------------------------------------
100 !
101 ! End of IO
102 !
103  CALL end_io_surf_n(hprogram)
104 IF (lhook) CALL dr_hook('WRITE_FLAKE_N',1,zhook_handle)
105 !
106 END SUBROUTINE write_flake_n
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine writesurf_flake_n(DGU, U, F, HPROGRAM)
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6
subroutine writesurf_flake_conf_n(CHF, DGMF, F, HPROGRAM)
subroutine writesurf_flake_sbl_n(DGU, U, F, FSB, HPROGRAM, HWRITE)
subroutine write_flake_n(DTCO, DGU, U, FM, HPROGRAM, HWRITE)
Definition: write_flaken.F90:6