1 | ! |
---|
2 | ! $Header: /home/cvsroot/LMDZ4/libf/phylmd/hgardfou.F,v 1.1.1.1 2004/05/19 12:53:07 lmdzadmin Exp $ |
---|
3 | ! |
---|
4 | SUBROUTINE hgardfou (t,tsol,text) |
---|
5 | |
---|
6 | use dimphy |
---|
7 | IMPLICIT none |
---|
8 | c====================================================================== |
---|
9 | c Verifier la temperature |
---|
10 | c====================================================================== |
---|
11 | #include "dimensions.h" |
---|
12 | #include "YOMCST.h" |
---|
13 | REAL t(klon,klev), tsol(klon) |
---|
14 | CHARACTER*(*) text |
---|
15 | C |
---|
16 | INTEGER i, k |
---|
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 [20,1200] 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, 1200.0, jadrs, jbad) |
---|
36 | #else |
---|
37 | jbad = 0 |
---|
38 | DO i = 1, klon |
---|
39 | IF (zt(i).GT.1200.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, 20.0, jadrs, jbad) |
---|
53 | #else |
---|
54 | jbad = 0 |
---|
55 | DO i = 1, klon |
---|
56 | IF (zt(i).LT.20.0) THEN |
---|
57 | jbad = jbad + 1 |
---|
58 | jadrs(jbad) = i |
---|
59 | ENDIF |
---|
60 | ENDDO |
---|
61 | #endif |
---|
62 | IF (jbad .GT. 0) THEN |
---|
63 | ok = .FALSE. |
---|
64 | DO i = 1, jbad |
---|
65 | PRINT *,'i,k,temperature =',jadrs(i),k,zt(jadrs(i)) |
---|
66 | ENDDO |
---|
67 | ENDIF |
---|
68 | ENDDO |
---|
69 | c |
---|
70 | DO i = 1, klon |
---|
71 | zt(i) = tsol(i) |
---|
72 | ENDDO |
---|
73 | #ifdef CRAY |
---|
74 | CALL WHENFGT(klon, zt, 1, 1200.0, jadrs, jbad) |
---|
75 | #else |
---|
76 | jbad = 0 |
---|
77 | DO i = 1, klon |
---|
78 | IF (zt(i).GT.1200.0) THEN |
---|
79 | jbad = jbad + 1 |
---|
80 | jadrs(jbad) = i |
---|
81 | ENDIF |
---|
82 | ENDDO |
---|
83 | #endif |
---|
84 | IF (jbad .GT. 0) THEN |
---|
85 | ok = .FALSE. |
---|
86 | DO i = 1, jbad |
---|
87 | PRINT *,'i,temperature =',jadrs(i),zt(jadrs(i)) |
---|
88 | ENDDO |
---|
89 | ENDIF |
---|
90 | #ifdef CRAY |
---|
91 | CALL WHENFLT(klon, zt, 1, 20.0, jadrs, jbad) |
---|
92 | #else |
---|
93 | jbad = 0 |
---|
94 | DO i = 1, klon |
---|
95 | IF (zt(i).LT.20.0) THEN |
---|
96 | jbad = jbad + 1 |
---|
97 | jadrs(jbad) = i |
---|
98 | ENDIF |
---|
99 | ENDDO |
---|
100 | #endif |
---|
101 | IF (jbad .GT. 0) THEN |
---|
102 | ok = .FALSE. |
---|
103 | DO i = 1, jbad |
---|
104 | PRINT *,'i,temperature =',jadrs(i),zt(jadrs(i)) |
---|
105 | ENDDO |
---|
106 | ENDIF |
---|
107 | c |
---|
108 | IF (.NOT. ok) THEN |
---|
109 | PRINT*, 'hgardfou s arrete ', text |
---|
110 | CALL abort |
---|
111 | ENDIF |
---|
112 | |
---|
113 | RETURN |
---|
114 | END |
---|