SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
end_io_surf_fan.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 end_io_surf_fa_n(HPROGRAM)
7 ! #######################################################
8 !
9 !!**** *END_IO_SURF_FA_n* - routine to close IO 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 !! S.Malardel *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 09/2003
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
40 USE modd_io_surf_fa, ONLY : nunit_fa, nfull, cmask, lopen
41 !
42 USE modd_surfex_mpi, ONLY : nrank, npio, wlog_mpi
43 !
44 USE yomhook ,ONLY : lhook, dr_hook
45 USE parkind1 ,ONLY : jprb
46 !
47 IMPLICIT NONE
48 !
49 !* 0.1 Declarations of arguments
50 ! -------------------------
51 !
52  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! main program
53 !
54 !* 0.2 Declarations of local variables
55 ! -------------------------------
56 !
57 !
58 INTEGER :: iret ! error code
59 REAL(KIND=JPRB) :: zhook_handle
60 !-------------------------------------------------------------------------------
61 !
62 IF (lhook) CALL dr_hook('END_IO_SURF_FA_N',0,zhook_handle)
63 !
64 !$OMP BARRIER
65 !
66 nfull = 0
67 !
68  cmask = ' '
69 !
70 IF (nrank==npio .AND. lopen) THEN
71 !$OMP SINGLE
72  CALL fairme(iret,nunit_fa,'UNKNOWN')
73 !$OMP END SINGLE
74 END IF
75 !
76 IF (lhook) CALL dr_hook('END_IO_SURF_FA_N',1,zhook_handle)
77 !-------------------------------------------------------------------------------
78 !
79 END SUBROUTINE end_io_surf_fa_n
subroutine wlog_mpi(HLOG, PLOG, KLOG, KLOG2, OLOG)
subroutine end_io_surf_fa_n(HPROGRAM)