SURFEX v8.1
General documentation of Surfex
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 !
13 
14 USE yomhook ,ONLY : lhook, dr_hook
15 USE parkind1 ,ONLY : jprb
16 !
17 USE netcdf
18 !
19 IMPLICIT NONE
20 
21 INTEGER :: JFILE, JRET
22 REAL(KIND=JPRB) :: ZHOOK_HANDLE
23 
24 !**************************************************
25 
26 IF (lhook) CALL dr_hook('CLOSE_FILEIN_OL',0,zhook_handle)
27 IF (nrank==npio) THEN
28  !
29  DO jfile=1,SIZE(xid_in)
30  jret=nf90_close(xid_in(jfile))
31  ENDDO
32  !
33  DEALLOCATE(xid_in)
34  DEALLOCATE(xvar_to_filein)
35  DEALLOCATE(xid_varin)
36  !
37 ENDIF
38 IF (lhook) CALL dr_hook('CLOSE_FILEIN_OL',1,zhook_handle)
39 
40 !******************************************
41 
42 END SUBROUTINE close_filein_ol
integer *4, dimension(:), allocatable xid_in
subroutine close_filein_ol
integer, parameter jprb
Definition: parkind1.F90:32
integer *4, dimension(:), allocatable xid_varin
logical lhook
Definition: yomhook.F90:15
character(len=20), dimension(:), allocatable xvar_to_filein