SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
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 !
53 USE yomhook ,ONLY : lhook, dr_hook
54 USE parkind1 ,ONLY : jprb
55 !
56 IMPLICIT NONE
57 !
58 !* 0.1 Declaration of arguments
59 ! ------------------------
60 !
61  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
62 REAL(KIND=JPRB) :: zhook_handle
63 !
64 !* 0.2 Declaration of local variables
65 ! ------------------------------
66 !
67 !-------------------------------------------------------------------------------
68 !
69 IF (lhook) CALL dr_hook('WRITE_COVER_TEX_END',0,zhook_handle)
70 IF (ntex==0 .AND. lhook) CALL dr_hook('WRITE_COVER_TEX_END',1,zhook_handle)
71 IF (ntex==0) RETURN
72 !
73 !* writing in the file
74 !
75 WRITE(ntex,*) '}}'
76 WRITE(ntex,*) '\end{document}'
77 !
78 !* close the file
79 !
80 IF (hprogram=='MESONH') THEN
81 #ifdef SFX_MNH
82  CALL mnhclose_write_cover_tex
83 #endif
84 ELSEIF (hprogram=='LFI ') THEN
85 #ifdef SFX_LFI
86  CALL close_write_cover_tex_lfi(ntex)
87 #endif
88 ELSEIF (hprogram=='AROME') THEN
89 #ifdef SFX_ARO
90  CALL aroclose_write_cover_tex(ntex)
91 #endif
92 ELSE
93  CLOSE(ntex)
94 END IF
95 !
96 ntex=0
97 IF (lhook) CALL dr_hook('WRITE_COVER_TEX_END',1,zhook_handle)
98 !-------------------------------------------------------------------------------
99 !
100 END SUBROUTINE write_cover_tex_end
subroutine write_cover_tex_end(HPROGRAM)
subroutine close_write_cover_tex_lfi(KTEX)