--- trunk/libf/dyn3d/inter_barxy.f90 2010/12/02 17:11:04 36 +++ trunk/dyn3d/inter_barxy.f 2014/04/25 14:58:31 97 @@ -31,7 +31,7 @@ ! Si taille de la seconde dim = jjm, on veut interpoler sur les ! jjm latitudes rlatv du modèle (latitudes de V) - ! Variables local to the procedure: + ! Local: REAL champy(iim, size(champ, 2)) integer j, i, jnterfd, jmods @@ -55,18 +55,25 @@ ! Check decreasing order for "rlatimod": DO i = 2, jjm - IF (rlatimod(i) >= rlatimod(i-1)) stop & - '"inter_barxy": "rlatimod" should be strictly decreasing' + IF (rlatimod(i) >= rlatimod(i-1)) then + print *, '"inter_barxy": "rlatimod" should be strictly decreasing' + stop 1 + end IF ENDDO yjmod(:jjm) = ord_coordm(rlatimod) IF (jmods == jjm + 1) THEN - IF (90. - yjmod(jjm) < 0.01) stop & - '"inter_barxy": with jmods = jjm + 1, yjmod(jjm) should be < 90.' + IF (90. - yjmod(jjm) < 0.01) then + print *, '"inter_barxy": with jmods = jjm + 1, ' & + // 'yjmod(jjm) should be < 90.' + stop 1 + end IF ELSE ! jmods = jjm - IF (ABS(yjmod(jjm) - 90.) > 0.01) stop & - '"inter_barxy": with jmods = jjm, yjmod(jjm) should be 90.' + IF (ABS(yjmod(jjm) - 90.) > 0.01) then + print *, '"inter_barxy": with jmods = jjm, yjmod(jjm) should be 90.' + stop 1 + end IF ENDIF if (jmods == jjm + 1) yjmod(jjm + 1) = 90. @@ -373,8 +380,7 @@ ! reverses their order. ! Finally, the procedure adds 90° as the last value of the array. - use nr_util, only: assert_eq - use comconst, only: pi + use nr_util, only: assert_eq, pi IMPLICIT NONE @@ -398,8 +404,10 @@ ! Check monotonicity: decrois = xi(2) < xi(1) DO i = 3, nmax - IF (decrois .neqv. xi(i) < xi(i-1)) stop & - '"ord_coord": latitudes are not monotonic' + IF (decrois .neqv. xi(i) < xi(i-1)) then + print *, '"ord_coord": latitudes are not monotonic' + stop 1 + end IF ENDDO IF (abs(xi(1)) < pi) then @@ -414,7 +422,7 @@ print *, "ord_coord" PRINT *, '"xi" should contain the latitudes of the boundaries of ' & // 'grid cells, not the centers of grid cells.' - STOP + STOP 1 ENDIF IF (decrois) xo(:nmax) = xo(nmax:1:- 1) @@ -432,7 +440,7 @@ ! This procedure converts to degrees, if necessary, and inverts the ! order. - use comconst, only: pi + use nr_util, only: pi IMPLICIT NONE