SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
open_aux_io_surf_asc.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_asc (&
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_asc,ONLY:nunit,cfilein,cfileout,nmask,nluout,nfull,cmask
45 USE modi_get_luout
47 USE modi_io_buff_clean
48 !
49 USE yomhook ,ONLY : lhook, dr_hook
50 USE parkind1 ,ONLY : jprb
51 !
52 USE modi_get_1d_mask
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 !
64 !* 0.2 Declarations of local variables
65 ! -------------------------------
66 !
67 INTEGER, DIMENSION(:),POINTER :: imask
68 INTEGER :: iret, il
69 REAL, DIMENSION(:),ALLOCATABLE :: zfull ! total cover
70 REAL(KIND=JPRB) :: zhook_handle
71 !
72 !-------------------------------------------------------------------------------
73 !
74 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_ASC',0,zhook_handle)
75  CALL io_buff_clean
76  CALL get_luout('ASCII ',nluout)
77 !
78 nunit=9
79 !
80 OPEN(unit=nunit,file=trim(hfile)//'.txt',form='FORMATTED')
81 !
82  cmask = 'FULL '
83  CALL read_surf(&
84  'ASCII ','DIM_FULL',nfull,iret)
85 ALLOCATE(nmask(nfull))
86 ALLOCATE(zfull(nfull))
87 zfull=1.
88  CALL get_1d_mask(nfull,nfull,zfull,nmask)
89 DEALLOCATE(zfull)
90 !
91 !------------------------------------------------------------------------------
92  cmask = hmask
93 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_ASC',1,zhook_handle)
94 !-------------------------------------------------------------------------------
95 !
96 END SUBROUTINE open_aux_io_surf_asc
subroutine io_buff_clean
subroutine open_aux_io_surf_asc(HFILE, HFILETYPE, HMASK)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine get_1d_mask(KSIZE, KFRAC, PFRAC, KMASK)
Definition: get_1d_mask.F90:5