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