SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
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)
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 !
42 !
43 !
44 USE modd_io_surf_lfi,ONLY:cluout_lfi,nmask,nfull,cmask, nluout, &
45  cfile_lfi, nunit_lfi, nfull_aux,&
46  nib,nie,niu,njb,nje,nju, nfull_aux, &
47  cfilepgd_lfi
48 USE modi_get_luout
50 !
51 !
52 USE yomhook ,ONLY : lhook, dr_hook
53 USE parkind1 ,ONLY : jprb
54 !
55 USE modi_get_1d_mask
56 !
57 IMPLICIT NONE
58 !
59 !* 0.1 Declarations of arguments
60 ! -------------------------
61 !
62 !
63 !
64  CHARACTER(LEN=28), INTENT(IN) :: hfile ! file name
65  CHARACTER(LEN=6), INTENT(IN) :: hfiletype ! main program
66  CHARACTER(LEN=6), INTENT(IN) :: hmask
67 !
68 !* 0.2 Declarations of local variables
69 ! -------------------------------
70 !
71 REAL, DIMENSION(:),ALLOCATABLE :: zfull ! total cover
72 INTEGER :: ilu,iret, il
73 INTEGER :: inb ! number of articles in the file
74 REAL(KIND=JPRB) :: zhook_handle
75 !-------------------------------------------------------------------------------
76 !
77 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_LFI',0,zhook_handle)
78  CALL get_luout('LFI ',nluout)
79 !
80  CALL fmopen(hfile,'OLD',cluout_lfi,0,1,1,inb,iret)
81 !
82  cmask = hmask
83  cfile_lfi=hfile
84  CALL read_surf(&
85  'LFI ','DIM_FULL',ilu,iret)
86 nfull_aux = ilu
87 !
88 !------------------------------------------------------------------------------
89 nfull = nfull_aux
90 !
91 il = nfull
92 ALLOCATE(zfull(il))
93 ALLOCATE(nmask(il))
94 zfull=1.
95  CALL get_1d_mask(il,il,zfull,nmask)
96 !
97 !------------------------------------------------------------------------------
98  cmask = hmask
99 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_LFI',1,zhook_handle)
100 !-------------------------------------------------------------------------------
101 !
102 END SUBROUTINE open_aux_io_surf_lfi
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine get_1d_mask(KSIZE, KFRAC, PFRAC, KMASK)
Definition: get_1d_mask.F90:5
subroutine open_aux_io_surf_lfi(HFILE, HFILETYPE, HMASK)