File: checklimits.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 (84 lines) | stat: -rw-r--r-- 3,798 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
      subroutine checklimits(error)       
C                              o
********************************************************************************
*                                                                              *
*     This routine checks, if the current user specifications are within the   *
*     dimensional limits of the number of trajectories that have to be handled *
*     at the same time.                                                        *
*                                                                              *
*     Author: A. Stohl                                                         *
*                                                                              *
*     2 February 1994                                                          *
*                                                                              *
********************************************************************************
*                                                                              *
* Variables:                                                                   *
* error                  .true., if dimensions are exceeded, else .false.      *
* interv [s]             interval between two trajectory calculations          *
* lentra [s]             length of an individual trajectory                    *
* numtramax              wanted maximum number of trajectories                 *
*                                                                              *
* Constants:                                                                   *
* maxtra                 maximum allowable number of trajectories              *
*                                                                              *
********************************************************************************

      include 'includepar'
      include 'includecom'

      integer numtramax
      logical error

      error=.false.

1     format(1x,a6,i7,a43)

C Calculate maximum number of trajectories to be held in memory 
C If only one starting time is selected, numtramax=numpoint, otherwise it is
C =(number of starting points)*(length of trajectories)/(interval of starting
C times of trajectories)
*****************************************************************************

      if ((ibdate.eq.iedate).and.(ibtime.eq.ietime)) then
        numtramax=numpoint
      else
        numtramax=numpoint*int(float(abs(lentra))/float(interv)+1.)
      endif

      if (modecet.eq.3) then
        numtramax=1
      endif


C If numtramax is greater than the number allowed by maxtra, give a warning
C and stop the model execution.
***************************************************************************

      if (numtramax.gt.maxtra) then
        error=.true.
        write(*,*) '#####                !!!ERROR!!!                   #
     +####'
        write(*,*) '##### YOU WANT TO CALCULATE TOO MANY TRAJECTORIES: #
     +####'
        write(*,1) '##### ',numtramax,' ARE WANTED, BUT ONLY                 
     +     #####'
        write(*,1) '##### ',maxtra,' ARE POSSIBLE.                     
     +  #####'
        write(*,*) '##### YOU CAN AVOID THIS PROBLEM IN THREE WAYS:    #
     +####'
        write(*,*) '##### 1) REDUCE THE NUMBER OF STARTING POINTS IN   #
     +####'
        write(*,*) '#####    FILE "STARTPOINTS".                       #
     +####'
        write(*,*) '##### 2) REDUCE THE CALCULATION LENGTH OF THE      #
     +####'
        write(*,*) '#####    TRAJECTORIES IN FILE "COMMAND".           #
     +####'
        write(*,*) '##### 3) INCREASE THE TIME INTERVAL BETWEEN TWO    #
     +####'
        write(*,*) '#####    TRAJECTORY CALCULATIONS IN FILE "COMMAND".#
     +####'
      endif

      return
      end