SURFEX v8.1
General documentation of Surfex
open_aux_io_surf_lfi.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 open_aux_io_surf_lfi (&
7  HFILE,HFILETYPE,HMASK,HDIR)
8 ! #######################################################
9 !
10 !!**** *OPEN_AUX_IO_SURF_ASC* - chooses the routine to OPENialize IO
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! V. Masson *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 10/2006
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 USE modd_surfex_mpi, ONLY : nrank
44 USE modi_get_luout
46 !
47 !
48 USE yomhook ,ONLY : lhook, dr_hook
49 USE parkind1 ,ONLY : jprb
50 !
51 USE modi_get_1d_mask
52 !
53 IMPLICIT NONE
54 !
55 !* 0.1 Declarations of arguments
56 ! -------------------------
57 !
58 !
59 !
60  CHARACTER(LEN=28), INTENT(IN) :: HFILE ! file name
61  CHARACTER(LEN=6), INTENT(IN) :: HFILETYPE ! main program
62  CHARACTER(LEN=6), INTENT(IN) :: HMASK
63  CHARACTER(LEN=1), INTENT(IN) :: HDIR
64 !
65 !* 0.2 Declarations of local variables
66 ! -------------------------------
67 !
68 REAL, DIMENSION(:),ALLOCATABLE :: ZFULL ! total cover
69 INTEGER :: ILU,IRET, IL
70 INTEGER :: INB ! number of articles in the file
71 REAL(KIND=JPRB) :: ZHOOK_HANDLE
72 !-------------------------------------------------------------------------------
73 !
74 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_LFI',0,zhook_handle)
75  CALL get_luout('LFI ',nluout)
76 !
77  CALL fmopen(hfile,'OLD',cluout_lfi,0,1,1,inb,iret)
78 !
79 CMASK = HMASK
80 CFILE_LFI=HFILE
81  CALL read_surf('LFI ','DIM_FULL',ilu,iret,hdir=hdir)
82 nfull_aux = ilu
83 !
84 !------------------------------------------------------------------------------
86 !
87 ALLOCATE(zfull(nfull))
88 il = nfull
89 zfull = 1.
90 !
91 ALLOCATE(nmask(il))
92  CALL get_1d_mask(il,il,zfull,nmask)
93 !
94 DEALLOCATE(zfull)
95 !
96 !------------------------------------------------------------------------------
97 CMASK = HMASK
98 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_LFI',1,zhook_handle)
99 !-------------------------------------------------------------------------------
100 !
101 END SUBROUTINE open_aux_io_surf_lfi
subroutine fmopen(HFILEM, HSTATU, HFIPRI, KNPRAR, KFTYPE, KVERB, KNINAR, KRESP)
Definition: fmopen.F90:4
subroutine open_aux_io_surf_lfi(HFILE, HFILETYPE, HMASK, HDIR)
character(len=28), save cluout_lfi
integer, parameter jprb
Definition: parkind1.F90:32
character(len=28), save cfile_lfi
integer, dimension(:), pointer nmask
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
subroutine get_1d_mask(KSIZE, KFRAC, PFRAC, KMASK)
Definition: get_1d_mask.F90:6
logical lhook
Definition: yomhook.F90:15
character(len=6) cmask