Beginning of open source history
[MNH-git_open_source-lfs.git] / src / SURFEX / write_diag_seb_oceann.F90
1 !     #########
2       SUBROUTINE WRITE_DIAG_SEB_OCEAN_n(HPROGRAM)
3 !     #################################
4 !
5 !!****  *WRITE_DIAG_SEB_OCEAN_n* - write the oceanic diagnostic fields
6 !!
7 !!    PURPOSE
8 !!    -------
9 !!
10 !!
11 !!**  METHOD
12 !!    ------
13 !!
14 !!    REFERENCE
15 !!    ---------
16 !!
17 !!
18 !!    AUTHOR
19 !!    ------
20 !!      C. Lebeaupin Brossier   *Meteo France*  
21 !!
22 !!    MODIFICATIONS
23 !!    -------------
24 !!      Original    04/2007
25 !-------------------------------------------------------------------------------
26 !
27 !*       0.    DECLARATIONS
28 !              ------------
29 !
30 USE MODD_OCEAN_n, ONLY : XSEAHMO
31 USE MODD_DIAG_OCEAN_n
32 !
33 USE MODI_INIT_IO_SURF_n
34 USE MODI_WRITE_SURF
35 USE MODI_END_IO_SURF_n
36 !
37 !
38 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
39 USE PARKIND1  ,ONLY : JPRB
40 !
41 IMPLICIT NONE
42 !
43 !*       0.1   Declarations of arguments
44 !              -------------------------
45 !
46  CHARACTER(LEN=6),  INTENT(IN)  :: HPROGRAM ! program calling
47 !
48 !*       0.2   Declarations of local variables
49 !              -------------------------------
50 !
51 INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears
52  CHARACTER(LEN=12) :: YRECFM         ! Name of the article to be read
53  CHARACTER(LEN=100):: YCOMMENT       ! Comment string
54 REAL(KIND=JPRB) :: ZHOOK_HANDLE
55 !
56 !-------------------------------------------------------------------------------
57 !
58 !         Initialisation for IO
59 !
60 IF (LHOOK) CALL DR_HOOK('WRITE_DIAG_SEB_OCEAN_N',0,ZHOOK_HANDLE)
61  CALL INIT_IO_SURF_n(HPROGRAM,'SEA   ','SEAFLX','WRITE')
62 !
63 !
64 !*       2.     Mean values in OML :
65 !               --------------------
66 !
67   YRECFM='TOML'
68   YCOMMENT='X_Y_'//YRECFM
69 !
70   CALL WRITE_SURF(HPROGRAM,YRECFM,XTOCMOY(:),IRESP,HCOMMENT=YCOMMENT)
71 !
72   YRECFM='SOML'
73   YCOMMENT='X_Y_'//YRECFM
74 !
75   CALL WRITE_SURF(HPROGRAM,YRECFM,XSOCMOY(:),IRESP,HCOMMENT=YCOMMENT)
76 !
77   YRECFM='UOML'
78   YCOMMENT='X_Y_'//YRECFM
79 !
80   CALL WRITE_SURF(HPROGRAM,YRECFM,XUOCMOY(:),IRESP,HCOMMENT=YCOMMENT)
81 !
82   YRECFM='VOML'
83   YCOMMENT='X_Y_'//YRECFM
84 !
85   CALL WRITE_SURF(HPROGRAM,YRECFM,XVOCMOY(:),IRESP,HCOMMENT=YCOMMENT)
86 !
87   YRECFM='DOML'
88   YCOMMENT='X_Y_'//YRECFM
89 !
90   CALL WRITE_SURF(HPROGRAM,YRECFM,XDOCMOY(:),IRESP,HCOMMENT=YCOMMENT)
91 !------------------------------------------------------------------------------
92 !
93 !         End of IO
94 !
95  CALL END_IO_SURF_n(HPROGRAM)
96 IF (LHOOK) CALL DR_HOOK('WRITE_DIAG_SEB_OCEAN_N',1,ZHOOK_HANDLE)
97 !
98 !
99 END SUBROUTINE WRITE_DIAG_SEB_OCEAN_n