Changeset 149 in lmdz_wrf
- Timestamp:
- Aug 5, 2014, 5:04:59 PM (10 years ago)
- Location:
- branches/LMDZ_WRFmeas_develop
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LMDZ_WRFmeas_develop/README
r21 r149 1 **** Coupling WRF and LMDZ with the WRFmeas modifications 1 **** Coupling WRF and LMDZ with the WRFmeas modifications and checking outputs 2 2 * L.Fita, Laboratoire de Meteorologie Dynamique, CNRS, UPMC-Jussieu, Paris, FRANCE 3 3 * July 2014 … … 11 11 12 12 1.- Extraction of the source code: 13 $ svn co http://svn.lmd.jussieu.fr/LMDZ_WRF/branches/LMDZ_WRFmeas LMDZ_WRFmeas13 $ svn co http://svn.lmd.jussieu.fr/LMDZ_WRF/branches/LMDZ_WRFmeas_develop LMDZ_WRFmeas_develop 14 14 15 15 2.- Copy (not int the repository folder...) folder 'WRFV3' to the desired spatial resolution (F77 legacy). As example one for 80x90x39 -
branches/LMDZ_WRFmeas_develop/WRFV3/lmdz/physiq.F90
r141 r149 1303 1303 llp = 644 1304 1304 1305 ! L. Fita, LMD August 2014 1306 CHARACTER(LEN=50) :: errmsg, fname, varname 1307 LOGICAL :: found 1308 REAL :: largest 1309 1310 fname = 'diagphy' 1311 errmsg = 'ERROR -- error -- ERROR -- error' 1312 largest = 10.e4 1313 1305 1314 !c====================================================================== 1306 1315 ! Gestion calendrier : mise a jour du module phys_cal_mod … … 3813 3822 END IF 3814 3823 PRINT *,' Lluis 10 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy 3824 fname = '10 d_h_vcol' 3825 varname = 't_seri' 3826 CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.) 3827 3815 3828 !c 3816 3829 !c … … 3925 3938 !c Accumuler les variables a stocker dans les fichiers histoire: 3926 3939 !c 3940 fname = 'after phytrac' 3941 varname = 't_seri' 3942 CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.) 3927 3943 3928 3944 !================================================================ … … 3937 3953 & zmasse,exner,d_t_ec) 3938 3954 t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:) 3955 3956 fname = 'after ener_conserv' 3957 varname = 't_seri' 3958 CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.) 3959 varname = 'd_t_ec' 3960 CALL check_var3D(fname, varname, d_t_ec, klon, klev, largest, .FALSE.) 3939 3961 3940 3962 !IM … … 4349 4371 RETURN 4350 4372 END SUBROUTINE gr_fi_ecrit 4373 4374 SUBROUTINE check_var(funcn, varn, var, sizev, bigvalue, stoprun) 4375 ! Subroutine to check the consistency of a variable 4376 ! * NaN value: by definition is variable /= variable 4377 ! * bigvalue: threshold for the variable 4378 4379 IMPLICIT NONE 4380 4381 #include "dimensions.h" 4382 4383 INTEGER, INTENT(IN) :: sizev 4384 CHARACTER(LEN=50), INTENT(IN) :: funcn, varn 4385 REAL, DIMENSION(sizev), INTENT(IN) :: var 4386 REAL, INTENT(IN) :: bigvalue 4387 LOGICAL, INTENT(IN) :: stoprun 4388 4389 ! Local 4390 INTEGER :: i, wrongi, xpt, ypt 4391 CHARACTER(LEN=50) :: errmsg 4392 LOGICAL :: found 4393 REAL, DIMENSION(sizev) :: wrongvalues 4394 INTEGER, DIMENSION(sizev) :: wronggridpt 4395 4396 !!!!!!! Variables 4397 ! funcn: at which functino of part of the program variable is checked 4398 ! varn: name of the variable 4399 ! var: variable to check 4400 ! sizev: size of the variable 4401 ! bigvalue: biggest attenaible value for the variable 4402 ! stoprun: Should the run stop if it founds a problem? 4403 4404 errmsg = 'ERROR -- error -- ERROR -- error' 4405 4406 found = .FALSE. 4407 wrongi = 0 4408 DO i=1,sizev 4409 IF (var(i) /= var(i) .OR. ABS(var(i)) > bigvalue ) THEN 4410 IF (wrongi == 0) found = .TRUE. 4411 wrongi = wrongi + 1 4412 wrongvalues(wrongi) = var(i) 4413 wronggridpt(wrongi) = i 4414 END IF 4415 END DO 4416 4417 IF (found) THEN 4418 PRINT *,TRIM(errmsg) 4419 PRINT *," at '" // TRIM(funcn) // "' variable '" //TRIM(varn)// & 4420 "' is wrong in Nvalues= ",wrongi,' at i (x, y) value___' 4421 DO i=1,wrongi 4422 ypt = INT(wronggridpt(i)/wiim) + 1 4423 xpt = wronggridpt(i) - (ypt-1)*wiim 4424 PRINT *,wronggridpt(i), '(',xpt,', ',ypt,')', wrongvalues(i) 4425 END DO 4426 IF (stoprun) THEN 4427 STOP 4428 END IF 4429 END IF 4430 4431 RETURN 4432 4433 END SUBROUTINE check_var 4434 4435 SUBROUTINE check_var3D(funcn, varn, var, sizev, zsize, bigvalue, stoprun) 4436 ! Subroutine to check the consistency of a 3D LMDSZ - variable (klon, klev) ! 4437 ! * NaN value: by definition is variable /= variable 4438 ! * bigvalue: threshold for the variable 4439 4440 IMPLICIT NONE 4441 4442 #include "dimensions.h" 4443 4444 INTEGER, INTENT(IN) :: sizev, zsize 4445 CHARACTER(LEN=50), INTENT(IN) :: funcn, varn 4446 REAL, DIMENSION(sizev,zsize), INTENT(IN) :: var 4447 REAL, INTENT(IN) :: bigvalue 4448 LOGICAL, INTENT(IN) :: stoprun 4449 4450 ! Local 4451 INTEGER :: i, k, wrongi, xpt, ypt 4452 CHARACTER(LEN=50) :: errmsg 4453 LOGICAL :: found 4454 REAL, DIMENSION(sizev*zsize) :: wrongvalues 4455 INTEGER, DIMENSION(sizev*zsize,2) :: wronggridpt 4456 4457 !!!!!!! Variables 4458 ! funcn: at which functino of part of the program variable is checked 4459 ! varn: name of the variable 4460 ! var: variable to check 4461 ! sizev: size of the variable 4462 ! zsize: vertical size of the variable 4463 ! bigvalue: biggest attenaible value for the variable 4464 ! stoprun: Should the run stop if it founds a problem? 4465 4466 errmsg = 'ERROR -- error -- ERROR -- error' 4467 4468 found = .FALSE. 4469 wrongi = 0 4470 DO i=1,sizev 4471 DO k=1,zsize 4472 IF (var(i,k) /= var(i,k) .OR. ABS(var(i,k)) > bigvalue ) THEN 4473 IF (wrongi == 0) found = .TRUE. 4474 wrongi = wrongi + 1 4475 wrongvalues(wrongi) = var(i,k) 4476 wronggridpt(wrongi,1) = i 4477 wronggridpt(wrongi,2) = k 4478 END IF 4479 END DO 4480 END DO 4481 4482 IF (found) THEN 4483 PRINT *,TRIM(errmsg) 4484 PRINT *," at '" // TRIM(funcn) // "' variable '" //TRIM(varn)// & 4485 "' is wrong in Nvalues= ",wrongi,' at i (x,y) k value___' 4486 DO i=1,wrongi 4487 ypt = INT(wronggridpt(i,1)/wiim) + 1 4488 xpt = wronggridpt(i,1) - (ypt-1)*wiim 4489 PRINT *,wronggridpt(i,1), '(',xpt,', ',ypt,')', wronggridpt(i,2), wrongvalues(i) 4490 END DO 4491 IF (stoprun) THEN 4492 STOP 4493 END IF 4494 END IF 4495 4496 RETURN 4497 4498 END SUBROUTINE check_var3D 4499
Note: See TracChangeset
for help on using the changeset viewer.