File: jdebug.F

package info (click to toggle)
emoslib 000380%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 47,712 kB
  • ctags: 11,551
  • sloc: fortran: 89,643; ansic: 24,200; makefile: 370; sh: 355
file content (145 lines) | stat: -rwxr-xr-x 2,789 bytes parent folder | download | duplicates (2)
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
136
137
138
139
140
141
142
143
144
145
C Copyright 1981-2007 ECMWF
C 
C Licensed under the GNU Lesser General Public License which
C incorporates the terms and conditions of version 3 of the GNU
C General Public License.
C See LICENSE and gpl-3.0.txt for details.
C

      SUBROUTINE JDEBUG( )
C
C---->
C**** JDEBUG
C
C     PURPOSE
C     _______
C
C     This routine checks whether the debug flag is to be turned on.
C
C
C     INTERFACE
C     _________
C
C     CALL JDEBUG( )
C
C     Input parameters
C     ________________
C
C     None
C
C
C     Output parameters
C     ________________
C
C     None
C
C
C     Common block usage
C     __________________
C
C     JDCNDBG - set flag NDBG.
C     JDCSPGP - set flag LFREECF, etc.
C
C
C     Method
C     ______
C
C     On first call, checks whether or not the environment 
C     variable JDCNDBG exists.
C
C
C     Externals
C     _________
C
C     GETENV    - Checks value of an environment variable.
C     INTLOGD   - Switchs on/off the printing off interpoaltion messages
C
C
C     Reference
C     _________
C
C     None
C
C
C     Comments
C     ________
C
C     None.
C
C
C     AUTHOR
C     ______
C
C     J.D.Chambers      *ECMWF*      Mar 1994
C
C
C     MODIFICATIONS
C     _____________
C
C     J.D.Chambers      *ECMWF*      5 Sep 1995
C     Add call to intlogd.
C
C     J.D.Chambers      *ECMWF*      19 Mar 1998
C     Add setting of LFREECF, etc
C
C----<
C
      IMPLICIT NONE
#include "jparams.h"
#include "jparam2.h"
C
C     Local variables
C
      INTEGER NFIRST
      DATA NFIRST/0/
      CHARACTER*12 YFLAG
      SAVE NFIRST
C
C     _______________________________________________________
C
C*    Section 1.    Initialization.
C     _______________________________________________________
C
  100 CONTINUE
C
      IF( NFIRST.EQ.0 ) THEN
        NFIRST = 1
C
C       Set debug level to control which messages are displayed
C
        CALL GETENV('JDCNDBG', YFLAG)
        IF( YFLAG(1:1).EQ.' ' ) NDBG = 0
        IF( YFLAG(1:1).EQ.'1' ) NDBG = 1
        IF( YFLAG(1:1).EQ.'2' ) NDBG = 2
        IF( YFLAG(1:1).EQ.'3' ) NDBG = 3
        IF( NDBG.EQ.0 ) THEN
          CALL INTLOGD(0)
        ELSE
          CALL INTLOGD(1)
        ENDIF
C
C       Initialise the flags controlling handling of spectral -> grid
C       interpolation coefficients memory unless already set by user
C
        IF( NFREECF.NE.11041967 ) THEN
          LFREECF = .FALSE.
          NFREECF = 11041967
        ENDIF
C
C       Clear the sizes of the memory areas used for coefficients in
C       spectral -> grid interpolations
C
        NISIZE6 = 0
        NISIZE7 = 0
C
      ENDIF
C
C     _______________________________________________________
C
C*    Section 9. Return to calling routine.
C     _______________________________________________________
C
 900  CONTINUE
C
      RETURN
      END