Last change
on this file since 5428 was
5354,
checked in by yann meurdesoif, 4 weeks ago
|
function isnan() is a non-standard gnu extension and it is not compiling with nvidia compiler.
It has been standardize in fortran 2003 by using intrinsic module function ieee_is_nan()
YM
|
File size:
850 bytes
|
Rev | Line | |
---|
[2630] | 1 | SUBROUTINE checknanqfi(zq,qmin,qmax,comment) |
---|
| 2 | USE dimphy |
---|
[5354] | 3 | USE, intrinsic :: ieee_arithmetic |
---|
[2630] | 4 | IMPLICIT NONE |
---|
| 5 | |
---|
| 6 | ! Entrees |
---|
| 7 | REAL,DIMENSION(klon,klev), INTENT(IN) :: zq |
---|
| 8 | REAL,INTENT(IN) :: qmin,qmax |
---|
| 9 | CHARACTER(LEN=*),INTENT(IN) :: comment |
---|
| 10 | |
---|
| 11 | ! Local |
---|
| 12 | INTEGER,DIMENSION(klon) :: jadrs |
---|
| 13 | INTEGER :: i, jbad, k |
---|
| 14 | |
---|
| 15 | DO k = 1, klev |
---|
| 16 | jbad = 0 |
---|
| 17 | DO i = 1, klon |
---|
| 18 | ! IF (zq(i,k).GT.qmax .OR. zq(i,k).LT.qmin) THEN |
---|
[5354] | 19 | IF (ieee_is_nan(zq(i,k))) THEN |
---|
[2630] | 20 | jbad = jbad + 1 |
---|
| 21 | jadrs(jbad) = i |
---|
| 22 | ENDIF |
---|
| 23 | ENDDO |
---|
| 24 | IF (jbad.GT.0) THEN |
---|
| 25 | WRITE(*,*)comment |
---|
| 26 | DO i = 1, jbad |
---|
| 27 | WRITE(*,*) "i,k,q=", jadrs(i),k,zq(jadrs(i),k) |
---|
[5233] | 28 | CALL abort_physic(comment, 'NaN founded',1) |
---|
[2630] | 29 | ENDDO |
---|
| 30 | ENDIF |
---|
| 31 | ENDDO |
---|
| 32 | |
---|
| 33 | END SUBROUTINE checknanqfi |
---|
Note: See
TracBrowser
for help on using the repository browser.