SURFEX v8.1
General documentation of Surfex
write_diag_seb_oceann.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_diag_seb_ocean_n (DTCO, HSELECT, U, DGO, HPROGRAM)
7 ! #################################
8 !
9 !!**** *WRITE_DIAG_SEB_OCEAN_n* - write the oceanic diagnostic fields
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! REFERENCE
19 !! ---------
20 !!
21 !!
22 !! AUTHOR
23 !! ------
24 !! C. Lebeaupin Brossier *Meteo France*
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! Original 04/2007
29 !-------------------------------------------------------------------------------
30 !
31 !* 0. DECLARATIONS
32 ! ------------
33 !
34 !
36 USE modd_surf_atm_n, ONLY : surf_atm_t
38 !
40 !
41 USE modi_init_io_surf_n
43 USE modi_end_io_surf_n
44 !
45 !
46 USE yomhook ,ONLY : lhook, dr_hook
47 USE parkind1 ,ONLY : jprb
48 !
49 IMPLICIT NONE
50 !
51 !* 0.1 Declarations of arguments
52 ! -------------------------
53 !
54 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
55  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
56 TYPE(surf_atm_t), INTENT(INOUT) :: U
57 TYPE(diag_ocean_t), INTENT(INOUT) :: DGO
58 !
59  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling
60 !
61 !* 0.2 Declarations of local variables
62 ! -------------------------------
63 !
64 INTEGER :: IRESP ! IRESP : return-code if a problem appears
65  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
66  CHARACTER(LEN=100):: YCOMMENT ! Comment string
67 REAL(KIND=JPRB) :: ZHOOK_HANDLE
68 !
69 !-------------------------------------------------------------------------------
70 !
71 ! Initialisation for IO
72 !
73 IF (lhook) CALL dr_hook('WRITE_DIAG_SEB_OCEAN_N',0,zhook_handle)
74  CALL init_io_surf_n(dtco, u, hprogram,'SEA ','SEAFLX','WRITE','SEAFLUX_DIAGNOSTICS.OUT.nc')
75 !
76 !
77 !* 2. Mean values in OML :
78 ! --------------------
79 !
80  yrecfm='TOML'
81  ycomment='X_Y_'//yrecfm
82 !
83  CALL write_surf(hselect,hprogram,yrecfm,dgo%XTOCMOY(:),iresp,hcomment=ycomment)
84 !
85  yrecfm='SOML'
86  ycomment='X_Y_'//yrecfm
87 !
88  CALL write_surf(hselect,hprogram,yrecfm,dgo%XSOCMOY(:),iresp,hcomment=ycomment)
89 !
90  yrecfm='UOML'
91  ycomment='X_Y_'//yrecfm
92 !
93  CALL write_surf(hselect,hprogram,yrecfm,dgo%XUOCMOY(:),iresp,hcomment=ycomment)
94 !
95  yrecfm='VOML'
96  ycomment='X_Y_'//yrecfm
97 !
98  CALL write_surf(hselect,hprogram,yrecfm,dgo%XVOCMOY(:),iresp,hcomment=ycomment)
99 !
100  yrecfm='DOML'
101  ycomment='X_Y_'//yrecfm
102 !
103  CALL write_surf(hselect,hprogram,yrecfm,dgo%XDOCMOY(:),iresp,hcomment=ycomment)
104 !
105 !------------------------------------------------------------------------------
106 !
107 ! End of IO
108 !
109  CALL end_io_surf_n(hprogram)
110 IF (lhook) CALL dr_hook('WRITE_DIAG_SEB_OCEAN_N',1,zhook_handle)
111 !
112 !
113 END SUBROUTINE write_diag_seb_ocean_n
subroutine write_diag_seb_ocean_n(DTCO, HSELECT, U, DGO, HPROGRAM
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 init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION