SURFEX v8.1
General documentation of Surfex
write_cover_tex_end.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_cover_tex_end(HPROGRAM)
7 ! ##########################
8 !
9 !!**** *WRITE_COVER_TEX* closes the tex file
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! METHOD
15 !! ------
16 !!
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !! AUTHOR
28 !! ------
29 !!
30 !! V. Masson Meteo-France
31 !!
32 !! MODIFICATION
33 !! ------------
34 !!
35 !! Original 08/01/98
36 !!
37 !----------------------------------------------------------------------------
38 !
39 !* 0. DECLARATION
40 ! -----------
41 !
42 !
43 !
44 USE modd_write_cover_tex,ONLY : ntex
45 !
46 #ifdef SFX_LFI
47 USE modi_close_write_cover_tex_lfi
48 #endif
49 #ifdef SFX_MNH
50 USE modi_mnhclose_write_cover_tex
51 #endif
52 #ifdef SFX_ARO
53 USE modi_aroclose_write_cover_tex
54 #endif
55 
56 !
57 USE yomhook ,ONLY : lhook, dr_hook
58 USE parkind1 ,ONLY : jprb
59 !
60 IMPLICIT NONE
61 !
62 !
63 !* 0.1 Declaration of arguments
64 ! ------------------------
65 !
66  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
67 REAL(KIND=JPRB) :: ZHOOK_HANDLE
68 !
69 !* 0.2 Declaration of local variables
70 ! ------------------------------
71 !
72 !-------------------------------------------------------------------------------
73 !
74 IF (lhook) CALL dr_hook('WRITE_COVER_TEX_END',0,zhook_handle)
75 IF (ntex==0 .AND. lhook) CALL dr_hook('WRITE_COVER_TEX_END',1,zhook_handle)
76 IF (ntex==0) RETURN
77 !
78 !* writing in the file
79 !
80 WRITE(ntex,*) '}}'
81 WRITE(ntex,*) '\end{document}'
82 !
83 !* close the file
84 !
85 IF (hprogram=='MESONH') THEN
86 #ifdef SFX_MNH
87  CALL mnhclose_write_cover_tex
88 #endif
89 ELSEIF (hprogram=='LFI ') THEN
90 #ifdef SFX_LFI
92 #endif
93 ELSEIF (hprogram=='AROME') THEN
94 #ifdef SFX_ARO
95  CALL aroclose_write_cover_tex(ntex)
96 #endif
97 ELSE
98  CLOSE(ntex)
99 END IF
100 !
101 ntex=0
102 IF (lhook) CALL dr_hook('WRITE_COVER_TEX_END',1,zhook_handle)
103 !-------------------------------------------------------------------------------
104 !
105 END SUBROUTINE write_cover_tex_end
subroutine write_cover_tex_end(HPROGRAM)
subroutine close_write_cover_tex_lfi(KTEX)
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15