SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_topd_header_dtm.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 ! #######################
7  SUBROUTINE read_topd_header_dtm(HPROGRAM,HFILE,HFORM,PX0,PY0,KNXC,KNYC,PNUL,PDXT)
8 ! #######################
9 !
10 !!**** *READ_TOPD_HEADER*
11 !!
12 !! PURPOSE
13 !! -------
14 ! This routine aims at reading topographic files header
15 ! for a given file (then for a cathment)
16 !
17 !!** METHOD
18 !! ------
19 !
20 !! EXTERNAL
21 !! --------
22 !!
23 !! none
24 !!
25 !! IMPLICIT ARGUMENTS
26 !! ------------------
27 !!
28 !!
29 !!
30 !!
31 !!
32 !! REFERENCE
33 !! ---------
34 !!
35 !!
36 !!
37 !! AUTHOR
38 !! ------
39 !!
40 !! B. Vincendon * Meteo-France *
41 !!
42 !! MODIFICATIONS
43 !! -------------
44 !!
45 !! Original 11/2006
46 !-------------------------------------------------------------------------------
47 !
48 !* 0. DECLARATIONS
49 ! ------------
50 !
51 USE modi_get_luout
52 USE modi_open_file
53 USE modi_close_file
54 !
55 USE modd_topd_par, ONLY : nunit
56 USE modd_topodyn, ONLY : npmax
57 !
58 USE yomhook ,ONLY : lhook, dr_hook
59 USE parkind1 ,ONLY : jprb
60 !
61 IMPLICIT NONE
62 !
63 !* 0.1 declarations of arguments
64 !
65  CHARACTER(LEN=*), INTENT(IN) :: hprogram !
66  CHARACTER(LEN=*), INTENT(IN) :: hfile ! File to be read
67  CHARACTER(LEN=*), INTENT(IN) :: hform ! Format of the file to be read
68 REAL, INTENT(OUT) :: px0 ! abcissa of bottom-left pixel
69 REAL, INTENT(OUT) :: py0 ! ordinate of bottom-left pixel
70 INTEGER, INTENT(OUT) :: knxc ! number of topographixc grid points along abcissa axis
71 INTEGER, INTENT(OUT) :: knyc ! number of topographixc grid points along ordinate axis
72 REAL, INTENT(OUT) :: pnul ! undifined value in topographic files
73 REAL, INTENT(OUT) :: pdxt ! catchment rid mesh size
74 !
75 !* 0.2 declarations of local variables
76 !
77 INTEGER :: jj ! loop control
78 INTEGER :: iluout ! Unit of the files
79 REAL(KIND=JPRB) :: zhook_handle
80 !-------------------------------------------------------------------------------
81 IF (lhook) CALL dr_hook('READ_TOPD_HEADER_DTM',0,zhook_handle)
82 !
83 !* 0.2 preparing file openning
84 ! ----------------------
85  CALL get_luout(hprogram,iluout)
86 !
87 WRITE(iluout,*) 'Open ',hfile,'header'
88 !
89  CALL open_file(hprogram,nunit,hfile,hform,haction='READ')
90 !
91 DO jj=1,5
92  READ(nunit,*)
93 ENDDO
94 !
95 READ(nunit,*) px0
96 READ(nunit,*) py0
97 READ(nunit,*) knxc
98 READ(nunit,*) knyc
99 READ(nunit,*) pnul
100 READ(nunit,*) pdxt
101 READ(nunit,*)
102 READ(nunit,*)
103 !
104  CALL close_file(hprogram,nunit)
105 !
106 IF (lhook) CALL dr_hook('READ_TOPD_HEADER_DTM',1,zhook_handle)
107 !
108 END SUBROUTINE read_topd_header_dtm
109 
110 
111 
112 
113 
114 
115 
subroutine close_file(HPROGRAM, KUNIT)
Definition: close_file.F90:6
subroutine read_topd_header_dtm(HPROGRAM, HFILE, HFORM, PX0, PY0, KNXC, KNYC, PNUL, PDXT)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine open_file(HPROGRAM, KUNIT, HFILE, HFORM, HACTION, HACCESS, KRECL)
Definition: open_file.F90:6