source: LMDZ5/branches/testing/libf/phylmd/Dust/checknanqfi.F90 @ 5431

Last change on this file since 5431 was 2641, checked in by Laurent Fairhead, 8 years ago

Merged trunk changes r2593:2640 into testing branch

File size: 805 bytes
Line 
1SUBROUTINE checknanqfi(zq,qmin,qmax,comment)
2  USE dimphy
3  IMPLICIT NONE
4
5! Entrees
6  REAL,DIMENSION(klon,klev), INTENT(IN)   :: zq
7  REAL,INTENT(IN)                         :: qmin,qmax
8  CHARACTER(LEN=*),INTENT(IN)             :: comment
9
10! Local 
11  INTEGER,DIMENSION(klon)     :: jadrs
12  INTEGER                     :: i, jbad, k
13 
14  DO k = 1, klev
15     jbad = 0
16     DO i = 1, klon
17!        IF (zq(i,k).GT.qmax .OR. zq(i,k).LT.qmin) THEN
18        IF (isnan(zq(i,k))) THEN
19           jbad = jbad + 1
20           jadrs(jbad) = i
21        ENDIF
22     ENDDO
23     IF (jbad.GT.0) THEN
24        WRITE(*,*)comment
25        DO i = 1, jbad
26           WRITE(*,*) "i,k,q=", jadrs(i),k,zq(jadrs(i),k)
27           CALL abort_gcm(comment, 'NaN founded',1)
28        ENDDO
29     ENDIF
30  ENDDO
31 
32END SUBROUTINE checknanqfi
Note: See TracBrowser for help on using the repository browser.