SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_seafluxn.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_seaflux_n (DTCO, DGU, U, SM, &
7  hprogram,hwrite)
8 ! ####################################
9 !
10 !!**** *WRITE_SEAFLUX_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 !
45 USE modd_surf_atm_n, ONLY : surf_atm_t
46 !
48 !
49 USE modd_write_surf_atm, ONLY : lnowrite_canopy
50 USE modi_init_io_surf_n
51 USE modi_writesurf_seaflux_conf_n
52 USE modi_writesurf_seaflux_n
53 USE modi_writesurf_seaflux_sbl_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 !
67 TYPE(data_cover_t), INTENT(INOUT) :: dtco
68 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
69 TYPE(surf_atm_t), INTENT(INOUT) :: u
70 TYPE(seaflux_model_t), INTENT(INOUT) :: sm
71 
72 !
73  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
74  CHARACTER(LEN=3), INTENT(IN) :: hwrite ! 'PREP' : does not write SBL XUNDEF fields
75 ! ! 'ALL' : all fields are written
76 !* 0.2 Declarations of local variables
77 ! -------------------------------
78 !
79 REAL(KIND=JPRB) :: zhook_handle
80 !-------------------------------------------------------------------------------
81 !
82 !
83 ! Initialisation for IO
84 !
85 IF (lhook) CALL dr_hook('WRITE_SEAFLUX_N',0,zhook_handle)
86  CALL init_io_surf_n(dtco, dgu, u, &
87  hprogram,'SEA ','SEAFLX','WRITE')
88 !
89 !* 1. Selection of surface scheme
90 ! ---------------------------
91 !
92  CALL writesurf_seaflux_conf_n(sm%CHS, sm%DGO, sm%DGSI, sm%O, sm%S, &
93  hprogram)
94  CALL writesurf_seaflux_n(dgu, u, &
95  sm%O, sm%OR, sm%S, &
96  hprogram)
97 !
98 IF ((.NOT.lnowrite_canopy).OR.dgu%LSELECT) CALL writesurf_seaflux_sbl_n(dgu, u, &
99  sm%S, sm%SSB, &
100  hprogram,hwrite)
101 !
102 !-------------------------------------------------------------------------------
103 !
104 ! End of IO
105 !
106  CALL end_io_surf_n(hprogram)
107 IF (lhook) CALL dr_hook('WRITE_SEAFLUX_N',1,zhook_handle)
108 !
109 END SUBROUTINE write_seaflux_n
subroutine writesurf_seaflux_n(DGU, U, O, OR, S, HPROGRAM)
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine writesurf_seaflux_conf_n(CHS, DGO, DGSI, O, S, HPROGRAM)
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6
subroutine writesurf_seaflux_sbl_n(DGU, U, S, SSB, HPROGRAM, HWRITE)
subroutine write_seaflux_n(DTCO, DGU, U, SM, HPROGRAM, HWRITE)