SURFEX v8.1
General documentation of Surfex
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,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 !
42 !
43 !
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  CHARACTER(LEN=1), INTENT(IN) :: HDIR
64 !
65 !* 0.2 Declarations of local variables
66 ! -------------------------------
67 !
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 = HMASK
83  CALL read_surf(&
84  'ASCII ','DIM_FULL',nfull,iret,hdir=hdir)
85 !
86 ALLOCATE(zfull(nfull))
87 il = nfull
88 zfull = 1.
89 !
90 ALLOCATE(nmask(il))
91  CALL get_1d_mask(il,nfull,zfull,nmask)
92 !
93 DEALLOCATE(zfull)
94 !
95 !------------------------------------------------------------------------------
96 CMASK = HMASK
97 IF (lhook) CALL dr_hook('OPEN_AUX_IO_SURF_ASC',1,zhook_handle)
98 !-------------------------------------------------------------------------------
99 !
100 END SUBROUTINE open_aux_io_surf_asc
static const char * trim(const char *name, int *n)
Definition: drhook.c:2383
character(len=6) cmask
integer, dimension(:), pointer nmask
subroutine io_buff_clean
integer, parameter jprb
Definition: parkind1.F90:32
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
subroutine open_aux_io_surf_asc(HFILE, HFILETYPE, HMASK, HDIR)