File: FLEXTRA.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 (135 lines) | stat: -rw-r--r-- 4,471 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
      program flextra
********************************************************************************
*                                                                              *
*     This program calculates trajectories for various input wind fields.      *
*                                                                              *
*     Authors: A. Stohl, G. Wotawa                                             *
*                                                                              *
*     2 February 1994                                                          *
*                                                                              *
*     Update: January 1999: A. Stohl                                           *
*     Use of global fields, CET option, etc.                                   *
*                                                                              *
********************************************************************************
*                                                                              *
* Variables:                                                                   *
* error                .true., if error ocurred in subprogram, else .false.    *
*                                                                              *
* Constants:                                                                   *
*                                                                              *
********************************************************************************

      include 'includepar'
      include 'includecom'

      logical error,oronew


C Read the pathnames where input/output files are stored
********************************************************

      call readpaths(error)
      if (error) goto 999


C Read the user specifications for the current model run
********************************************************

      call readcommand(error)
      if (error) goto 999

C Read, which wind fields are available within the modelling period
*******************************************************************

      call readavailable(error)
      if(error) goto 999

C Determine the grid specifications and the vertical discretization
*******************************************************************
 
      call gridcheck(oronew,error)
      if(error) goto 999
      call gridcheck_nests(error)
      if(error) goto 999
 
 
C Read the orography used by the ECMWF model
********************************************
 
      if(.not.oronew) call readoro(error)
      if(error) goto 999

C Read the coordinates of trajectory beginning/ending points for the
C current model run
C Alternatively, if CET is to be calculated read CET starting domain
********************************************************************

      if (modecet.eq.1) then
        call readpoints(error)
      else if (modecet.eq.2) then
        call readcet(error)
      else
        call readflight(error)
      endif
      if(error) goto 999


C Check, if user selected options don't exceed the current dimension limits
***************************************************************************

      call checklimits(error)
      if(error) goto 999

C Conversion of the startpoints from geografical to grid coordinates
********************************************************************

      call coordtrafo(error)
      if(error) goto 999


C Fix the coordinates of the uncertainty trajectories
*****************************************************

      if (modecet.eq.1) call uncertcoor()

 
C Subtract the orography from the height above sea level
********************************************************

      call subtractoro()


C Open the output files
***********************

      if (modecet.eq.1) then
        call openoutput(error)
      else if (modecet.eq.2) then
        call opencetoutput(error)
      else
        call openflightoutput(error)
      endif
      if(error) goto 999


C Calculate trajectories
************************
      
      call timemanager()


C Close output and reverse direction of back trajectory output
**************************************************************

      if (modecet.eq.1) call lastprocessor()

      write(*,*) 'CONGRATULATIONS: YOU HAVE SUCCESSFULLY COMPLETED A  FL
     +EXTRA  MODEL RUN!'

      goto 1000

999   write(*,*) 'FLEXTRA MODEL ERROR: EXECUTION HAD TO BE TERMINATED'

1000  continue

      end