Changeset 33 in lmdz_wrf
- Timestamp:
- Jul 23, 2014, 12:44:01 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LMDZ_WRFmeas/WRFV3/lmdz/diagphy_mod.F90
r32 r33 81 81 ! L. Fita, LMD July 2014 82 82 CHARACTER(LEN=50) :: errmsg, fname 83 LOGICAL :: found 83 84 84 85 fname = 'diagphy' … … 185 186 end SUBROUTINE diagphy 186 187 188 !L. Fita, LMD 2004. Check variable 189 SUBROUTINE check_var(funcn, varn, var, sizev, bigvalue, stoprun) 190 ! Subroutine to check the consistency of a variable 191 192 IMPLICIT NONE 193 194 INTEGER, INTENT(IN) :: sizev 195 CHARACTER(LEN=50), INTENT(IN) :: funcn, varn 196 REAL, DIMENSION(sizev), INTENT(IN) :: var 197 REAL, INTENT(IN) :: bigvalue 198 LOGICAL, INTENT(IN) :: stoprun 199 200 ! Local 201 INTEGER :: i, wrongi 202 CHARACTER(LEN=50) :: errmsg 203 LOGICAL :: found 204 REAL, DIMENSION(sizev) :: wrongvalues 205 INTEGER, DIMENSION(sizev) :: wronggridpt 206 207 !!!!!!! Variables 208 ! funcn: at which functino of part of the program variable is checked 209 ! varn: name of the variable 210 ! var: variable to check 211 ! sizev: sixe of the variable 212 ! bigvalue: biggest attenaible value for the variable 213 ! stoprun: Should the run stop if it founds a problem? 214 215 errmsg = 'ERROR -- error -- ERROR -- error' 216 217 found = .FALSE. 218 wrongi = 0 219 DO i=1,sizev 220 IF (var(i) /= var(i) .OR. var(i) > 100000. ) THEN 221 IF (wrongi == 0) found = .TRUE. 222 wrongi = wrongi + 1 223 wrongvalues(wrongi) = var(i) 224 wronggridpt(wrongi) = i 225 END IF 226 END DO 227 228 IF (found) THEN 229 PRINT *,TRIM(errmsg) 230 PRINT *," at '" // TRIM(funcn) // "' variable '" //TRIM(varn)// & 231 "' is wrong at i value___' 232 DO i=1,wrongi 233 PRINT *,wronggridpt(i), wrongvalues(i) 234 END DO 235 IF (stoprun) THEN 236 STOP 237 END IF 238 END IF 239 240 RETURN 241 242 END SUBROUTINE check_var 243 187 244 !C====================================================================== 188 245 SUBROUTINE diagetpq(airephy,tit,iprt,idiag,idiag2,dtime &
Note: See TracChangeset
for help on using the changeset viewer.