SURFEX v8.1
General documentation of Surfex
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, HSELECT, U, SM, HPROGRAM,HWRITE)
7 ! ####################################
8 !
9 !!**** *WRITE_SEAFLUX_n* - routine to write surface variables in their respective files
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! V. Masson *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 01/2003
35 !! B. Decharme 07/2011 : Suppress pgd output
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
43 USE modd_surf_atm_n, ONLY : surf_atm_t
44 !
46 !
48 USE modi_init_io_surf_n
49 USE modi_writesurf_seaflux_conf_n
50 USE modi_writesurf_seaflux_n
51 USE modi_writesurf_sbl_n
52 USE modi_end_io_surf_n
53 !
54 !
55 USE yomhook ,ONLY : lhook, dr_hook
56 USE parkind1 ,ONLY : jprb
57 !
58 IMPLICIT NONE
59 !
60 !* 0.1 Declarations of arguments
61 ! -------------------------
62 !
63 !
64 !
65 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
66  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
67 TYPE(surf_atm_t), INTENT(INOUT) :: U
68 TYPE(seaflux_model_t), INTENT(INOUT) :: SM
69 
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 ! Initialisation for IO
82 !
83 IF (lhook) CALL dr_hook('WRITE_SEAFLUX_N',0,zhook_handle)
84  CALL init_io_surf_n(dtco, u, hprogram,'SEA ','SEAFLX','WRITE','SEAFLUX_PROGNOSTIC.OUT.nc')
85 !
86 !* 1. Selection of surface scheme
87 ! ---------------------------
88 !
89  CALL writesurf_seaflux_conf_n(sm%CHS, sm%SD%GO, sm%SD%DMI, sm%O, sm%S, hprogram)
90  CALL writesurf_seaflux_n(hselect, sm%O, sm%OR, sm%S, hprogram)
91 !
92 IF ((.NOT.lnowrite_canopy).OR.SIZE(hselect)>0) THEN
93  CALL writesurf_sbl_n(hselect, sm%S%LSBL, sm%SB, hprogram, hwrite, "SEA ")
94 ENDIF
95 !
96 !-------------------------------------------------------------------------------
97 !
98 ! End of IO
99 !
100  CALL end_io_surf_n(hprogram)
101 IF (lhook) CALL dr_hook('WRITE_SEAFLUX_N',1,zhook_handle)
102 !
103 END SUBROUTINE write_seaflux_n
subroutine writesurf_seaflux_conf_n(CHS, DGO, DGMSI, O, S, HPROGR
subroutine write_seaflux_n(DTCO, HSELECT, U, SM, HPROGRAM, HWRITE)
integer, parameter jprb
Definition: parkind1.F90:32
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:7
logical lhook
Definition: yomhook.F90:15
subroutine writesurf_sbl_n(HSELECT, OSBL, SB, HPROGRAM, HWRITE, H
subroutine writesurf_seaflux_n(HSELECT, O, OR, S, HPROGRAM)
subroutine init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION