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 "YOMCST.h" |
---|
12 | REAL t(klon,klev), tsol(klon) |
---|
13 | CHARACTER*(*) text |
---|
14 | C |
---|
15 | INTEGER i, k |
---|
16 | REAL zt(klon) |
---|
17 | INTEGER jadrs(klon), jbad |
---|
18 | LOGICAL ok |
---|
19 | c |
---|
20 | LOGICAL firstcall |
---|
21 | SAVE firstcall |
---|
22 | DATA firstcall /.TRUE./ |
---|
23 | IF (firstcall) THEN |
---|
24 | PRINT*, 'hgardfou garantit la temperature dans [15,1200] K' |
---|
25 | firstcall = .FALSE. |
---|
26 | ENDIF |
---|
27 | c |
---|
28 | ok = .TRUE. |
---|
29 | DO k = 1, klev |
---|
30 | DO i = 1, klon |
---|
31 | !!!! MODIF GG to avoid crash after 78--> 95 extension!! |
---|
32 | !!! WARNING: it has to be review/removed when the extension to the |
---|
33 | !!! thermosphere is completed (physical processes and ionosphere added) |
---|
34 | IF (k.LT.85) THEN |
---|
35 | zt(i) = t(i,k) |
---|
36 | ENDIF |
---|
37 | ENDDO |
---|
38 | #ifdef CRAY |
---|
39 | CALL WHENFGT(klon, zt, 1, 1200.0, jadrs, jbad) |
---|
40 | #else |
---|
41 | jbad = 0 |
---|
42 | DO i = 1, klon |
---|
43 | IF (zt(i).GT.1200.0) THEN |
---|
44 | jbad = jbad + 1 |
---|
45 | jadrs(jbad) = i |
---|
46 | ENDIF |
---|
47 | ENDDO |
---|
48 | #endif |
---|
49 | IF (jbad .GT. 0) THEN |
---|
50 | ok = .FALSE. |
---|
51 | DO i = 1, jbad |
---|
52 | PRINT *,'i,k,temperature =',jadrs(i),k,zt(jadrs(i)) |
---|
53 | ENDDO |
---|
54 | ENDIF |
---|
55 | #ifdef CRAY |
---|
56 | CALL WHENFLT(klon, zt, 1, 15.0, jadrs, jbad) |
---|
57 | #else |
---|
58 | jbad = 0 |
---|
59 | DO i = 1, klon |
---|
60 | IF (zt(i).LT.15.0) THEN |
---|
61 | jbad = jbad + 1 |
---|
62 | jadrs(jbad) = i |
---|
63 | ENDIF |
---|
64 | ENDDO |
---|
65 | #endif |
---|
66 | IF (jbad .GT. 0) THEN |
---|
67 | ok = .FALSE. |
---|
68 | DO i = 1, jbad |
---|
69 | PRINT *,'i,k,temperature =',jadrs(i),k,zt(jadrs(i)) |
---|
70 | ENDDO |
---|
71 | ENDIF |
---|
72 | ENDDO |
---|
73 | c |
---|
74 | DO i = 1, klon |
---|
75 | zt(i) = tsol(i) |
---|
76 | ENDDO |
---|
77 | #ifdef CRAY |
---|
78 | CALL WHENFGT(klon, zt, 1, 1200.0, jadrs, jbad) |
---|
79 | #else |
---|
80 | jbad = 0 |
---|
81 | DO i = 1, klon |
---|
82 | IF (zt(i).GT.1200.0) THEN |
---|
83 | jbad = jbad + 1 |
---|
84 | jadrs(jbad) = i |
---|
85 | ENDIF |
---|
86 | ENDDO |
---|
87 | #endif |
---|
88 | IF (jbad .GT. 0) THEN |
---|
89 | ok = .FALSE. |
---|
90 | DO i = 1, jbad |
---|
91 | PRINT *,'i,temperature =',jadrs(i),zt(jadrs(i)) |
---|
92 | ENDDO |
---|
93 | ENDIF |
---|
94 | #ifdef CRAY |
---|
95 | CALL WHENFLT(klon, zt, 1, 20.0, jadrs, jbad) |
---|
96 | #else |
---|
97 | jbad = 0 |
---|
98 | DO i = 1, klon |
---|
99 | IF (zt(i).LT.20.0) THEN |
---|
100 | jbad = jbad + 1 |
---|
101 | jadrs(jbad) = i |
---|
102 | ENDIF |
---|
103 | ENDDO |
---|
104 | #endif |
---|
105 | IF (jbad .GT. 0) THEN |
---|
106 | ok = .FALSE. |
---|
107 | DO i = 1, jbad |
---|
108 | PRINT *,'i,temperature =',jadrs(i),zt(jadrs(i)) |
---|
109 | ENDDO |
---|
110 | ENDIF |
---|
111 | c |
---|
112 | IF (.NOT. ok) THEN |
---|
113 | text='hgardfou s arrete '//text |
---|
114 | CALL abort_physic("hgardfou", text, 1) |
---|
115 | ENDIF |
---|
116 | |
---|
117 | RETURN |
---|
118 | END |
---|