SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
close_filein_ol.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 close_filein_ol
7 ! #######################################################
8 !!**** *CLOSE_FILEIN_OL* -
9 !
10 USE modd_surfex_mpi, ONLY : nrank, npio
11 !
12 USE modd_ol_fileid, ONLY : xid_in, xvar_to_filein, xid_varin
13 
14 USE yomhook ,ONLY : lhook, dr_hook
15 USE parkind1 ,ONLY : jprb
16 !
17 IMPLICIT NONE
18 include "netcdf.inc"
19 
20 INTEGER :: jfile, jret
21 REAL(KIND=JPRB) :: zhook_handle
22 
23 !**************************************************
24 
25 IF (lhook) CALL dr_hook('CLOSE_FILEIN_OL',0,zhook_handle)
26 IF (nrank==npio) THEN
27  !
28 !$OMP SINGLE
29  !
30  DO jfile=1,SIZE(xid_in)
31  jret=nf_close(xid_in(jfile))
32  ENDDO
33  !
34  DEALLOCATE(xid_in)
35  DEALLOCATE(xvar_to_filein)
36  DEALLOCATE(xid_varin)
37  !
38 !$OMP END SINGLE
39  !
40 ENDIF
41 IF (lhook) CALL dr_hook('CLOSE_FILEIN_OL',1,zhook_handle)
42 
43 !******************************************
44 
45 END SUBROUTINE close_filein_ol
subroutine close_filein_ol