1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | SUBROUTINE hgardfou (t,tsol,text) |
---|
5 | IMPLICIT none |
---|
6 | c====================================================================== |
---|
7 | c Verifier la temperature |
---|
8 | c====================================================================== |
---|
9 | #include "dimensions.h" |
---|
10 | #include "dimphy.h" |
---|
11 | #include "YOMCST.h" |
---|
12 | #include "indicesol.h" |
---|
13 | REAL t(klon,klev), tsol(klon,nbsrf) |
---|
14 | CHARACTER*(*) text |
---|
15 | C |
---|
16 | INTEGER i, k, nsrf |
---|
17 | REAL zt(klon) |
---|
18 | INTEGER jadrs(klon), jbad |
---|
19 | LOGICAL ok |
---|
20 | c |
---|
21 | LOGICAL firstcall |
---|
22 | SAVE firstcall |
---|
23 | DATA firstcall /.TRUE./ |
---|
24 | IF (firstcall) THEN |
---|
25 | PRINT*, 'hgardfou garantit la temperature dans [100,370] K' |
---|
26 | firstcall = .FALSE. |
---|
27 | ENDIF |
---|
28 | c |
---|
29 | ok = .TRUE. |
---|
30 | DO k = 1, klev |
---|
31 | DO i = 1, klon |
---|
32 | zt(i) = t(i,k) |
---|
33 | ENDDO |
---|
34 | #ifdef CRAY |
---|
35 | CALL WHENFGT(klon, zt, 1, 370.0, jadrs, jbad) |
---|
36 | #else |
---|
37 | jbad = 0 |
---|
38 | DO i = 1, klon |
---|
39 | IF (zt(i).GT.370.0) THEN |
---|
40 | jbad = jbad + 1 |
---|
41 | jadrs(jbad) = i |
---|
42 | ENDIF |
---|
43 | ENDDO |
---|
44 | #endif |
---|
45 | IF (jbad .GT. 0) THEN |
---|
46 | ok = .FALSE. |
---|
47 | DO i = 1, jbad |
---|
48 | PRINT *,'i,k,temperature =',jadrs(i),k,zt(jadrs(i)) |
---|
49 | ENDDO |
---|
50 | ENDIF |
---|
51 | #ifdef CRAY |
---|
52 | CALL WHENFLT(klon, zt, 1, 100.0, jadrs, jbad) |
---|
53 | #else |
---|
54 | jbad = 0 |
---|
55 | DO i = 1, klon |
---|
56 | ! IF (zt(i).LT.100.0) THEN |
---|
57 | IF (zt(i).LT.50.0) THEN |
---|
58 | jbad = jbad + 1 |
---|
59 | jadrs(jbad) = i |
---|
60 | ENDIF |
---|
61 | ENDDO |
---|
62 | #endif |
---|
63 | IF (jbad .GT. 0) THEN |
---|
64 | ok = .FALSE. |
---|
65 | DO i = 1, jbad |
---|
66 | PRINT *,'i,k,temperature =',jadrs(i),k,zt(jadrs(i)) |
---|
67 | ENDDO |
---|
68 | ENDIF |
---|
69 | ENDDO |
---|
70 | c |
---|
71 | DO nsrf = 1, nbsrf |
---|
72 | DO i = 1, klon |
---|
73 | zt(i) = tsol(i,nsrf) |
---|
74 | ENDDO |
---|
75 | #ifdef CRAY |
---|
76 | CALL WHENFGT(klon, zt, 1, 370.0, jadrs, jbad) |
---|
77 | #else |
---|
78 | jbad = 0 |
---|
79 | DO i = 1, klon |
---|
80 | IF (zt(i).GT.370.0) THEN |
---|
81 | jbad = jbad + 1 |
---|
82 | jadrs(jbad) = i |
---|
83 | ENDIF |
---|
84 | ENDDO |
---|
85 | #endif |
---|
86 | IF (jbad .GT. 0) THEN |
---|
87 | ok = .FALSE. |
---|
88 | DO i = 1, jbad |
---|
89 | PRINT *,'i,nsrf,temperature =',jadrs(i),nsrf,zt(jadrs(i)) |
---|
90 | ENDDO |
---|
91 | ENDIF |
---|
92 | #ifdef CRAY |
---|
93 | CALL WHENFLT(klon, zt, 1, 100.0, jadrs, jbad) |
---|
94 | #else |
---|
95 | jbad = 0 |
---|
96 | DO i = 1, klon |
---|
97 | ! IF (zt(i).LT.100.0) THEN |
---|
98 | IF (zt(i).LT.50.0) THEN |
---|
99 | jbad = jbad + 1 |
---|
100 | jadrs(jbad) = i |
---|
101 | ENDIF |
---|
102 | ENDDO |
---|
103 | #endif |
---|
104 | IF (jbad .GT. 0) THEN |
---|
105 | ok = .FALSE. |
---|
106 | DO i = 1, jbad |
---|
107 | PRINT *,'i,nsrf,temperature =',jadrs(i),nsrf,zt(jadrs(i)) |
---|
108 | ENDDO |
---|
109 | ENDIF |
---|
110 | ENDDO |
---|
111 | c |
---|
112 | IF (.NOT. ok) THEN |
---|
113 | PRINT*, 'hgardfou s arrete ', text |
---|
114 | CALL abort |
---|
115 | ENDIF |
---|
116 | |
---|
117 | RETURN |
---|
118 | END |
---|