Changeset 36 in lmdz_wrf for branches


Ignore:
Timestamp:
Jul 23, 2014, 1:07:57 PM (10 years ago)
Author:
lfita
Message:

Moving variable definition to lower lines
Including missing 'END IF'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LMDZ_WRFmeas/WRFV3/lmdz/diagphy_mod.F90

    r35 r36  
    7979!C
    8080      integer pas
     81
     82      save pas
     83      data pas/0/
     84!$OMP THREADPRIVATE(pas)
     85!C
     86
    8187! L. Fita, LMD July 2014
    8288      CHARACTER(LEN=50)                                  :: errmsg, fname, varname
     
    8894      largest = 10000.
    8995
    90       save pas
    91       data pas/0/
    92 !$OMP THREADPRIVATE(pas)
    93 !C
    9496      pas=pas+1
    9597      stops=0.
     
    219221          varname = 'evap'
    220222          CALL check_var(fname, varn, evap, klon, largest, .FALSE.)
     223        END IF
    221224        PRINT *,'    rain_fall_tot= ',rain_fall_tot
    222225        IF (rain_fall_tot .NE. rain_fall_tot .OR. ABS(rain_fall_tot) > largest) THEN
    223226          varname = 'rain_fall'
    224227          CALL check_var(fname, varn, rain_fall, klon, largest, .FALSE.)
     228        END IF
    225229        PRINT *,'    snow_fall_tot= ',snow_fall_tot
    226230        IF (snow_fall_tot .NE. snow_fall_tot .OR. ABS(snow_fall_tot) > largest) THEN
    227231          varname = 'snow_fall'
    228232          CALL check_var(fname, varn, snow_fall, klon, largest, .FALSE.)
     233        END IF
    229234        STOP
    230235      END IF
     
    241246SUBROUTINE check_var(funcn, varn, var, sizev, bigvalue, stoprun)
    242247!  Subroutine to check the consistency of a variable
     248!    * NaN value: by definition is variable /= variable
     249!    * bigvalue: allowd threshold for variable
    243250
    244251  IMPLICIT NONE
     
    270277  wrongi = 0
    271278  DO i=1,sizev
    272     IF (var(i) /= var(i) .OR. var(i) > bigvalule ) THEN
     279    IF (var(i) /= var(i) .OR. ABS(var(i)) > bigvalule ) THEN
    273280      IF (wrongi == 0) found = .TRUE.
    274281      wrongi = wrongi + 1
Note: See TracChangeset for help on using the changeset viewer.