File: readoro.f

package info (click to toggle)
flextra 5.0-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 860 kB
  • ctags: 402
  • sloc: fortran: 6,987; makefile: 55; sh: 17
file content (53 lines) | stat: -rw-r--r-- 2,334 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
      subroutine readoro(error)
C                          o
********************************************************************************
*                                                                              *
*     This routine reads the orography used by the ECMWF model.                *
*                                                                              *
*     Authors: A. Stohl                                                        *
*                                                                              *
*     30 April 1994                                                            *
*                                                                              *
********************************************************************************
*                                                                              *
* Variables:                                                                   *
* error                .true., if file OROGRAPHY cannot be opened              *
* nx,ny                number of grid points in x and y direction, respectively*
* oro(0:nxmax-1,0:nymax-1) [m]  orography of ECMWF model                       *
*                                                                              *
* Constants:                                                                   *
* unitoro              unit connected to file OROGRAPHY                        *
*                                                                              *
********************************************************************************

      include 'includepar'
      include 'includecom'

      integer ix,jy
      logical error


      error=.false.

C Open the orography file and read grid
***************************************

      write(*,*) 'NOTICE: OROGRAPHY WAS READ FROM FILE "OROGRAPHY"'


      open(unitoro,file=path(3)(1:len(3))//'OROGRAPHY',
     +status='old',err=999)
      do 10 ix=0,nx-1
        do 10 jy=0,ny-1
10        read(unitoro,*) oro(ix,jy)
      close(unitoro)

      return    

999   write(*,*) ' #### FLEXTRA MODEL ERROR! FILE "OROGRAPHY"   #### ' 
      write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
      write(*,*) ' #### xxx/trajec/windfields                   #### '
      error=.true.

      return
      end