Changeset 2870 for LMDZ5/branches/testing/libf
- Timestamp:
- May 4, 2017, 9:31:05 AM (8 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2843-2844,2846-2865
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/dyn3d/dynetat0.f90
r2641 r2870 153 153 INTEGER, INTENT(IN) :: n1, n2 154 154 CHARACTER(LEN=*), INTENT(IN) :: str1, str2 155 CHARACTER(LEN= 256) :: s1, s2155 CHARACTER(LEN=100) :: s1, s2 156 156 IF(n1/=n2) THEN 157 157 s1='value of '//TRIM(str1)//' =' 158 158 s2=' read in starting file differs from parametrized '//TRIM(str2)//' =' 159 WRITE(msg,'(10x,a,i4,2x,a,i4)'), s1,n1,s2,n2159 WRITE(msg,'(10x,a,i4,2x,a,i4)'),TRIM(ADJUSTL(s1)),n1,TRIM(ADJUSTL(s2)),n2 160 160 CALL ABORT_gcm(TRIM(modname),TRIM(msg),1) 161 161 END IF -
LMDZ5/branches/testing/libf/phylmd/add_phys_tend_mod.F90
r2839 r2870 223 223 224 224 if (fl_ebil .GT. 0) then 225 ! Reset variables 226 zqw_col(:,:) = 0. 227 zql_col(:,:) = 0. 228 zqs_col(:,:) = 0. 229 zek_col(:,:) = 0. 230 zh_dair_col(:,:) = 0. 231 zh_qw_col(:,:) = 0. 232 zh_ql_col(:,:) = 0. 233 zh_qs_col(:,:) = 0. 225 ! ------------------------------------------------ 226 ! Compute vertical sum for each atmospheric column 227 ! ------------------------------------------------ 228 n=1 ! begining of time step 234 229 235 230 zcpvap = rcpv 236 231 zcwat = rcw 237 232 zcice = rcs 238 !JLD write (*,*) "rcpd, zcpvap, zcwat, zcice ",rcpd, zcpvap, zcwat, zcice 239 240 ! ------------------------------------------------ 241 ! Compute vertical sum for each atmospheric column 242 ! ------------------------------------------------ 243 n=1 ! begining of time step 244 DO k = 1, klev 245 DO i = 1, klon 246 ! Watter mass 247 zqw_col(i,n) = zqw_col(i,n) + q_seri(i, k)*zairm(i, k) 248 zql_col(i,n) = zql_col(i,n) + ql_seri(i, k)*zairm(i, k) 249 zqs_col(i,n) = zqs_col(i,n) + qs_seri(i, k)*zairm(i, k) 250 ! Kinetic Energy 251 zek_col(i,n) = zek_col(i,n) + 0.5*(u_seri(i,k)**2+v_seri(i,k)**2)*zairm(i, k) 252 ! Air enthalpy : dry air, water vapour, liquid, solid 253 zh_dair_col(i,n) = zh_dair_col(i,n) + rcpd*(1.-q_seri(i,k)-ql_seri(i,k)-qs_seri(i,k))* & 254 zairm(i, k)*t_seri(i, k) 255 zh_qw_col(i,n) = zh_qw_col(i,n) + zcpvap*t_seri(i, k) *q_seri(i, k)*zairm(i, k) !jyg 256 zh_ql_col(i,n) = zh_ql_col(i,n) + (zcpvap*t_seri(i, k) - rlvtt)*ql_seri(i, k)*zairm(i, k) !jyg 257 zh_qs_col(i,n) = zh_qs_col(i,n) + (zcpvap*t_seri(i, k) - rlstt)*qs_seri(i, k)*zairm(i, k) !jyg 258 END DO 259 END DO 260 ! compute total air enthalpy 261 zh_col(:,n) = zh_dair_col(:,n) + zh_qw_col(:,n) + zh_ql_col(:,n) + zh_qs_col(:,n) 233 234 CALL integr_v(klon, klev, zcpvap, & 235 t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zairm, & 236 zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), & 237 zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n)) 262 238 263 239 end if ! end if (fl_ebil .GT. 0) … … 465 441 ! ------------------------------------------------ 466 442 n=2 ! end of time step 467 DO k = 1, klev 468 DO i = 1, klon 469 ! Watter mass 470 zqw_col(i,n) = zqw_col(i,n) + q_seri(i, k)*zairm(i, k) 471 zql_col(i,n) = zql_col(i,n) + ql_seri(i, k)*zairm(i, k) 472 zqs_col(i,n) = zqs_col(i,n) + qs_seri(i, k)*zairm(i, k) 473 ! Kinetic Energy 474 zek_col(i,n) = zek_col(i,n) + 0.5*(u_seri(i,k)**2+v_seri(i,k)**2)*zairm(i, k) 475 ! Air enthalpy : dry air, water vapour, liquid, solid 476 zh_dair_col(i,n) = zh_dair_col(i,n) + rcpd*(1.-q_seri(i,k)-ql_seri(i,k)-qs_seri(i,k))* & 477 zairm(i, k)*t_seri(i, k) 478 zh_qw_col(i,n) = zh_qw_col(i,n) + zcpvap*t_seri(i, k) *q_seri(i, k)*zairm(i, k) !jyg 479 zh_ql_col(i,n) = zh_ql_col(i,n) + (zcpvap*t_seri(i, k) - rlvtt)*ql_seri(i, k)*zairm(i, k) !jyg 480 zh_qs_col(i,n) = zh_qs_col(i,n) + (zcpvap*t_seri(i, k) - rlstt)*qs_seri(i, k)*zairm(i, k) !jyg 481 END DO 482 END DO 483 ! compute total air enthalpy 484 zh_col(:,n) = zh_dair_col(:,n) + zh_qw_col(:,n) + zh_ql_col(:,n) + zh_qs_col(:,n) 443 444 CALL integr_v(klon, klev, zcpvap, & 445 t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zairm, & 446 zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), & 447 zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n)) 485 448 486 449 ! ------------------------------------------------ … … 517 480 RETURN 518 481 END SUBROUTINE add_phys_tend 482 483 SUBROUTINE diag_phys_tend (nlon, nlev, uu, vv, temp, qv, ql, qs, & 484 zdu,zdv,zdt,zdq,zdql,zdqs,paprs,text) 485 !====================================================================== 486 ! Ajoute les tendances des variables physiques aux variables 487 ! d'etat de la dynamique t_seri, q_seri ... 488 ! On en profite pour faire des tests sur les tendances en question. 489 !====================================================================== 490 491 492 !====================================================================== 493 ! Declarations 494 !====================================================================== 495 496 USE phys_state_var_mod, ONLY : dtime, ftsol 497 USE geometry_mod, ONLY: longitude_deg, latitude_deg 498 USE print_control_mod, ONLY: prt_level 499 USE cmp_seri_mod 500 USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qt_col, d_ek_col, d_h_dair_col & 501 & , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_col 502 IMPLICIT none 503 include "YOMCST.h" 504 include "clesphys.h" 505 506 ! Arguments : 507 !------------ 508 INTEGER, INTENT(IN) :: nlon, nlev 509 REAL, DIMENSION(nlon,nlev), INTENT(IN) :: uu, vv 510 REAL, DIMENSION(nlon,nlev), INTENT(IN) :: temp, qv, ql, qs 511 REAL, DIMENSION(nlon,nlev), INTENT(IN) :: zdu, zdv 512 REAL, DIMENSION(nlon,nlev), INTENT(IN) :: zdt, zdq, zdql, zdqs 513 REAL, DIMENSION(nlon,nlev+1), INTENT(IN) :: paprs 514 CHARACTER*(*), INTENT(IN) :: text 515 516 ! Local : 517 !-------- 518 REAL, DIMENSION(nlon,nlev) :: uu_n, vv_n 519 REAL, DIMENSION(nlon,nlev) :: temp_n, qv_n, ql_n, qs_n 520 521 522 ! 523 INTEGER k, n 524 525 integer debug_level 526 logical, save :: first=.true. 527 !$OMP THREADPRIVATE(first) 528 ! 529 !====================================================================== 530 ! Variables for energy conservation tests 531 !====================================================================== 532 ! 533 534 ! zh_col------- total enthalpy of vertical air column 535 ! (air with watter vapour, liquid and solid) (J/m2) 536 ! zh_dair_col--- total enthalpy of dry air (J/m2) 537 ! zh_qw_col---- total enthalpy of watter vapour (J/m2) 538 ! zh_ql_col---- total enthalpy of liquid watter (J/m2) 539 ! zh_qs_col---- total enthalpy of solid watter (J/m2) 540 ! zqw_col------ total mass of watter vapour (kg/m2) 541 ! zql_col------ total mass of liquid watter (kg/m2) 542 ! zqs_col------ total mass of solid watter (kg/m2) 543 ! zek_col------ total kinetic energy (kg/m2) 544 ! 545 REAL zairm(nlon, nlev) ! layer air mass (kg/m2) 546 REAL zqw_col(nlon,2) 547 REAL zql_col(nlon,2) 548 REAL zqs_col(nlon,2) 549 REAL zek_col(nlon,2) 550 REAL zh_dair_col(nlon,2) 551 REAL zh_qw_col(nlon,2), zh_ql_col(nlon,2), zh_qs_col(nlon,2) 552 REAL zh_col(nlon,2) 553 554 !====================================================================== 555 ! Initialisations 556 557 IF (prt_level >= 5) then 558 write (*,*) "In diag_phys_tend, after ",text 559 call flush 560 end if 561 562 debug_level=10 563 if (first) then 564 print *,"TestJLD rcpv, rcw, rcs",rcpv, rcw, rcs 565 first=.false. 566 endif 567 ! 568 ! print *,'add_phys_tend: paprs ',paprs 569 !====================================================================== 570 ! Diagnostics for energy conservation tests 571 !====================================================================== 572 DO k = 1, nlev 573 ! layer air mass 574 zairm(:, k) = (paprs(:,k)-paprs(:,k+1))/rg 575 END DO 576 577 if (fl_ebil .GT. 0) then 578 ! ------------------------------------------------ 579 ! Compute vertical sum for each atmospheric column 580 ! ------------------------------------------------ 581 n=1 ! begining of time step 582 583 CALL integr_v(nlon, nlev, rcpv, & 584 temp, qv, ql, qs, uu, vv, zairm, & 585 zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), & 586 zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n)) 587 588 end if ! end if (fl_ebil .GT. 0) 589 590 !====================================================================== 591 ! Ajout des tendances sur le vent, la temperature et les diverses phases de l'eau 592 !====================================================================== 593 594 uu_n(:,:)=uu(:,:)+zdu(:,:) 595 vv_n(:,:)=vv(:,:)+zdv(:,:) 596 qv_n(:,:)=qv(:,:)+zdq(:,:) 597 ql_n(:,:)=ql(:,:)+zdql(:,:) 598 qs_n(:,:)=qs(:,:)+zdqs(:,:) 599 temp_n(:,:)=temp(:,:)+zdt(:,:) 600 601 602 603 !====================================================================== 604 ! Diagnostics for energy conservation tests 605 !====================================================================== 606 607 if (fl_ebil .GT. 0) then 608 609 ! ------------------------------------------------ 610 ! Compute vertical sum for each atmospheric column 611 ! ------------------------------------------------ 612 n=2 ! end of time step 613 614 CALL integr_v(nlon, nlev, rcpv, & 615 temp_n, qv_n, ql_n, qs_n, uu_n, vv_n, zairm, & 616 zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), & 617 zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n)) 618 619 ! ------------------------------------------------ 620 ! Compute the changes by unit of time 621 ! ------------------------------------------------ 622 623 d_qw_col(:) = (zqw_col(:,2)-zqw_col(:,1))/dtime 624 d_ql_col(:) = (zql_col(:,2)-zql_col(:,1))/dtime 625 d_qs_col(:) = (zqs_col(:,2)-zqs_col(:,1))/dtime 626 d_qt_col(:) = d_qw_col(:) + d_ql_col(:) + d_qs_col(:) 627 628 d_ek_col(:) = (zek_col(:,2)-zek_col(:,1))/dtime 629 630 print *,'zdu ', zdu 631 print *,'zdv ', zdv 632 print *,'d_ek_col, zek_col(2), zek_col(1) ',d_ek_col(1), zek_col(1,2), zek_col(1,1) 633 634 d_h_dair_col(:) = (zh_dair_col(:,2)-zh_dair_col(:,1))/dtime 635 d_h_qw_col(:) = (zh_qw_col(:,2)-zh_qw_col(:,1))/dtime 636 d_h_ql_col(:) = (zh_ql_col(:,2)-zh_ql_col(:,1))/dtime 637 d_h_qs_col(:) = (zh_qs_col(:,2)-zh_qs_col(:,1))/dtime 638 639 d_h_col = (zh_col(:,2)-zh_col(:,1))/dtime 640 641 end if ! end if (fl_ebil .GT. 0) 642 ! 643 644 RETURN 645 END SUBROUTINE diag_phys_tend 646 647 SUBROUTINE integr_v(nlon, nlev, zcpvap, & 648 temp, qv, ql, qs, uu, vv, zairm, & 649 zqw_col, zql_col, zqs_col, zek_col, zh_dair_col, & 650 zh_qw_col, zh_ql_col, zh_qs_col, zh_col) 651 652 IMPLICIT none 653 include "YOMCST.h" 654 655 INTEGER, INTENT(IN) :: nlon,nlev 656 REAL, INTENT(IN) :: zcpvap 657 REAL, DIMENSION(nlon,nlev), INTENT(IN) :: temp, qv, ql, qs, uu, vv 658 REAL, DIMENSION(nlon,nlev), INTENT(IN) :: zairm 659 REAL, DIMENSION(nlon), INTENT(OUT) :: zqw_col 660 REAL, DIMENSION(nlon), INTENT(OUT) :: zql_col 661 REAL, DIMENSION(nlon), INTENT(OUT) :: zqs_col 662 REAL, DIMENSION(nlon), INTENT(OUT) :: zek_col 663 REAL, DIMENSION(nlon), INTENT(OUT) :: zh_dair_col 664 REAL, DIMENSION(nlon), INTENT(OUT) :: zh_qw_col 665 REAL, DIMENSION(nlon), INTENT(OUT) :: zh_ql_col 666 REAL, DIMENSION(nlon), INTENT(OUT) :: zh_qs_col 667 REAL, DIMENSION(nlon), INTENT(OUT) :: zh_col 668 669 INTEGER :: i, k 670 671 672 ! Reset variables 673 zqw_col(:) = 0. 674 zql_col(:) = 0. 675 zqs_col(:) = 0. 676 zek_col(:) = 0. 677 zh_dair_col(:) = 0. 678 zh_qw_col(:) = 0. 679 zh_ql_col(:) = 0. 680 zh_qs_col(:) = 0. 681 682 !JLD write (*,*) "rcpd, zcpvap, zcwat, zcice ",rcpd, zcpvap, zcwat, zcice 683 684 ! ------------------------------------------------ 685 ! Compute vertical sum for each atmospheric column 686 ! ------------------------------------------------ 687 DO k = 1, nlev 688 DO i = 1, nlon 689 ! Watter mass 690 zqw_col(i) = zqw_col(i) + qv(i, k)*zairm(i, k) 691 zql_col(i) = zql_col(i) + ql(i, k)*zairm(i, k) 692 zqs_col(i) = zqs_col(i) + qs(i, k)*zairm(i, k) 693 ! Kinetic Energy 694 zek_col(i) = zek_col(i) + 0.5*(uu(i,k)**2+vv(i,k)**2)*zairm(i, k) 695 ! Air enthalpy : dry air, water vapour, liquid, solid 696 zh_dair_col(i) = zh_dair_col(i) + rcpd*(1.-qv(i,k)-ql(i,k)-qs(i,k))* & 697 zairm(i, k)*temp(i, k) 698 zh_qw_col(i) = zh_qw_col(i) + zcpvap*temp(i, k) *qv(i, k)*zairm(i, k) !jyg 699 zh_ql_col(i) = zh_ql_col(i) + (zcpvap*temp(i, k) - rlvtt)*ql(i, k)*zairm(i, k) !jyg 700 zh_qs_col(i) = zh_qs_col(i) + (zcpvap*temp(i, k) - rlstt)*qs(i, k)*zairm(i, k) !jyg 701 END DO 702 END DO 703 ! compute total air enthalpy 704 zh_col(:) = zh_dair_col(:) + zh_qw_col(:) + zh_ql_col(:) + zh_qs_col(:) 705 706 END SUBROUTINE integr_v 519 707 520 708 SUBROUTINE prt_enerbil (text, itap) … … 624 812 write(*,9000) text,"enerbil: snow, bil_lat, bil_sens", snow_lsc(1), rlstt * snow_lsc(1), -(rcs-rcpd)*t_seri(1,1) * snow_lsc(1) 625 813 end if 814 CASE("convection") specific_diag 815 if ( prt_level .GE. 5) then 816 write(*,9000) text,"enerbil: rain, bil_lat, bil_sens", rain_con(1), rlvtt * rain_con(1), -(rcw-rcpd)*t_seri(1,1) * rain_con(1) 817 write(*,9000) text,"enerbil: snow, bil_lat, bil_sens", snow_con(1), rlstt * snow_con(1), -(rcs-rcpd)*t_seri(1,1) * snow_con(1) 818 end if 626 819 END SELECT specific_diag 627 820 628 9000 format (1x,A8,2x,A3 0,10E15.6)821 9000 format (1x,A8,2x,A35,10E15.6) 629 822 630 823 end if ! end if (fl_ebil .GT. 0) -
LMDZ5/branches/testing/libf/phylmd/calwake.F90
r2787 r2870 54 54 ! ------ 55 55 REAL, DIMENSION(klon, klev), INTENT (OUT) :: dt_wake, dq_wake 56 REAL, DIMENSION(klon), INTENT (OUT) :: wake_k 56 !!jyg REAL, DIMENSION(klon), INTENT (OUT) :: wake_k 57 INTEGER, DIMENSION(klon), INTENT (OUT) :: wake_k 57 58 REAL, DIMENSION(klon, klev), INTENT (OUT) :: wake_d_deltat_gw 58 59 REAL, DIMENSION(klon), INTENT (OUT) :: wake_h -
LMDZ5/branches/testing/libf/phylmd/climb_hq_mod.F90
r2839 r2870 221 221 !**************************************************************************************** 222 222 !!! jyg le 07/02/2012 223 IF (mod(iflag_pbl_split,2) .eq.1) THEN 223 !!jyg IF (mod(iflag_pbl_split,2) .eq.1) THEN 224 IF (mod(iflag_pbl_split,10) .ge.1) THEN 224 225 !!! nrlmd le 02/05/2011 225 226 DO k= 1, klev … … 240 241 ENDDO 241 242 !!! 242 ENDIF ! (mod(iflag_pbl_split,2) . eq.1)243 ENDIF ! (mod(iflag_pbl_split,2) .ge.1) 243 244 !!! 244 245 … … 377 378 378 379 !!! jyg le 07/02/2012 379 IF (mod(iflag_pbl_split,2) .eq.1) THEN 380 !!jyg IF (mod(iflag_pbl_split,2) .eq.1) THEN 381 IF (mod(iflag_pbl_split,10) .ge.1) THEN 380 382 !!! nrlmd le 02/05/2011 381 383 DO i = 1, knon … … 399 401 ENDDO 400 402 !!! 401 ENDIF ! (mod(iflag_pbl_split,2) . eq.1)403 ENDIF ! (mod(iflag_pbl_split,2) .ge.1) 402 404 !!! 403 405 -
LMDZ5/branches/testing/libf/phylmd/climb_wind_mod.F90
r2408 r2870 172 172 !**************************************************************************************** 173 173 !!! jyg le 07/02/2012 174 IF (mod(iflag_pbl_split,2) .eq.1) THEN 174 !!jyg IF (mod(iflag_pbl_split,2) .eq.1) THEN 175 IF (mod(iflag_pbl_split,10) .ge.1) THEN 175 176 !!! nrlmd le 02/05/2011 176 177 DO k= 1, klev … … 188 189 ENDDO 189 190 !!! 190 ENDIF ! (mod(iflag_pbl_split,2) . eq.1)191 ENDIF ! (mod(iflag_pbl_split,2) .ge.1) 191 192 !!! 192 193 … … 308 309 309 310 !!! jyg le 07/02/2012 310 IF (mod(iflag_pbl_split,2) .eq.1) THEN 311 !!jyg IF (mod(iflag_pbl_split,2) .eq.1) THEN 312 IF (mod(iflag_pbl_split,10) .ge.1) THEN 311 313 !!! nrlmd le 02/05/2011 312 314 DO i = 1, knon … … 326 328 ENDDO 327 329 !!! 328 ENDIF ! (mod(iflag_pbl_split,2) . eq.1)330 ENDIF ! (mod(iflag_pbl_split,2) .ge.1) 329 331 !!! 330 332 -
LMDZ5/branches/testing/libf/phylmd/concvl.F90
r2839 r2870 13 13 !RomP >>> 14 14 !! . da,phi,mp,dd_t,dd_q,lalim_conv,wght_th) 15 da, phi, mp, phi 2, d1a, dam, sij, clw, elij, & ! RomP15 da, phi, mp, phii, d1a, dam, sij, clw, elij, & ! RomP 16 16 dd_t, dd_q, lalim_conv, wght_th, & ! RomP 17 17 evap, ep, epmlmMm, eplaMm, & ! RomP … … 87 87 include "clesphys.h" 88 88 89 INTEGER iflag_clos 90 91 REAL dtime, paprs(klon, klev+1), pplay(klon, klev) 92 INTEGER k_upper_cv 93 REAL t(klon, klev), q(klon, klev), u(klon, klev), v(klon, klev) 94 REAL t_wake(klon, klev), q_wake(klon, klev) 95 REAL s_wake(klon) 96 REAL tra(klon, klev, nbtr) 97 INTEGER ntra 98 REAL sig1(klon, klev), w01(klon, klev), ptop2(klon) 99 REAL pmflxr(klon, klev+1), pmflxs(klon, klev+1) 100 REAL Ale(klon), Alp(klon) 101 102 REAL d_t(klon, klev), d_q(klon, klev), d_u(klon, klev), d_v(klon, klev) 103 REAL dd_t(klon, klev), dd_q(klon, klev) 104 REAL d_tra(klon, klev, nbtr) 105 REAL rain(klon), snow(klon) 106 107 INTEGER kbas(klon), ktop(klon) 108 REAL em_ph(klon, klev+1), em_p(klon, klev) 109 REAL upwd(klon, klev), dnwd(klon, klev), dnwdbis(klon, klev) 110 111 !! REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev) !jyg 112 REAL Ma(klon, klev), mip(klon, klev), Vprecip(klon, klev+1) !jyg 113 REAL Vprecipi(klon, klev+1) !jyg 114 REAL wght(klon, klev) !RL 115 116 REAL da(klon, klev), phi(klon, klev, klev), mp(klon, klev) 89 INTEGER, INTENT(IN) :: iflag_clos 90 REAL, INTENT(IN) :: dtime 91 REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay 92 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs 93 INTEGER, INTENT(IN) :: k_upper_cv 94 REAL, DIMENSION(klon,klev), INTENT(IN) :: t, q, u, v 95 REAL, DIMENSION(klon,klev), INTENT(IN) :: t_wake, q_wake 96 REAL, DIMENSION(klon), INTENT(IN) :: s_wake 97 REAL, DIMENSION(klon,klev, nbtr),INTENT(IN) :: tra 98 INTEGER, INTENT(IN) :: ntra 99 REAL, DIMENSION(klon), INTENT(IN) :: Ale, Alp 100 !CR:test: on passe lentr et alim_star des thermiques 101 INTEGER, DIMENSION(klon), INTENT(IN) :: lalim_conv 102 REAL, DIMENSION(klon,klev), INTENT(IN) :: wght_th 103 104 REAL, DIMENSION(klon,klev), INTENT(INOUT) :: sig1, w01 105 106 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d_t, d_q, d_u, d_v 107 REAL, DIMENSION(klon,klev, nbtr),INTENT(OUT) :: d_tra 108 REAL, DIMENSION(klon), INTENT(OUT) :: rain, snow 109 110 INTEGER, DIMENSION(klon), INTENT(OUT) :: kbas, ktop 111 REAL, DIMENSION(klon), INTENT(OUT) :: sigd 112 REAL, DIMENSION(klon), INTENT(OUT) :: cbmf, plcl, plfc, wbeff 113 REAL, DIMENSION(klon), INTENT(OUT) :: convoccur 114 REAL, DIMENSION(klon,klev), INTENT(OUT) :: upwd, dnwd, dnwdbis 115 116 !! REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev) !jyg 117 REAL, DIMENSION(klon,klev), INTENT(OUT) :: Ma, mip 118 REAL, DIMENSION(klon,klev+1), INTENT(OUT) :: Vprecip !jyg 119 REAL, DIMENSION(klon), INTENT(OUT) :: cape, cin 120 REAL, DIMENSION(klon,klev), INTENT(OUT) :: tvp 121 REAL, DIMENSION(klon,klev), INTENT(OUT) :: Tconv 122 INTEGER, DIMENSION(klon), INTENT(OUT) :: iflag 123 REAL, DIMENSION(klon), INTENT(OUT) :: pbase, bbase 124 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dtvpdt1, dtvpdq1 125 REAL, DIMENSION(klon), INTENT(OUT) :: dplcldt, dplcldr 126 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qcondc 127 REAL, DIMENSION(klon), INTENT(OUT) :: wd 128 REAL, DIMENSION(klon,klev+1), INTENT(OUT) :: pmflxr, pmflxs 129 130 REAL, DIMENSION(klon,klev), INTENT(OUT) :: da, mp 131 REAL, DIMENSION(klon,klev,klev),INTENT(OUT) :: phi 117 132 ! RomP >>> 118 REAL phi2(klon, klev, klev) 119 REAL d1a(klon, klev), dam(klon, klev) 120 REAL sij(klon, klev, klev), clw(klon, klev), elij(klon, klev, klev) 121 REAL wdtrainA(klon, klev), wdtrainM(klon, klev) 122 REAL evap(klon, klev), ep(klon, klev) 123 REAL epmlmMm(klon, klev, klev), eplaMm(klon, klev) 133 REAL, DIMENSION(klon,klev,klev),INTENT(OUT) :: phii 134 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d1a, dam 135 REAL, DIMENSION(klon,klev,klev),INTENT(OUT) :: sij, elij 136 REAL, DIMENSION(klon,klev), INTENT(OUT) :: clw 137 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dd_t, dd_q 138 REAL, DIMENSION(klon,klev), INTENT(OUT) :: evap, ep 139 REAL, DIMENSION(klon,klev), INTENT(OUT) :: eplaMm 140 REAL, DIMENSION(klon,klev,klev), INTENT(OUT) :: epmlmMm 141 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wdtrainA, wdtrainM 124 142 ! RomP <<< 125 REAL cape(klon), cin(klon), tvp(klon, klev) 126 REAL Tconv(klon, klev) 127 128 !CR:test: on passe lentr et alim_star des thermiques 129 INTEGER lalim_conv(klon) 130 REAL wght_th(klon, klev) 131 REAL em_sig1feed ! sigma at lower bound of feeding layer 132 REAL em_sig2feed ! sigma at upper bound of feeding layer 133 REAL em_wght(klev) ! weight density determining the feeding mixture 143 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wght !RL 144 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qtc 145 REAL, DIMENSION(klon,klev), INTENT(OUT) :: sigt 146 REAL, INTENT(OUT) :: tau_cld_cv, coefw_cld_cv 147 REAL, DIMENSION(klon), INTENT(OUT) :: epmax_diag ! epmax_cape 148 149 ! 150 ! Local 151 ! ---- 152 REAL, DIMENSION(klon,klev) :: em_p 153 REAL, DIMENSION(klon,klev+1) :: em_ph 154 REAL :: em_sig1feed ! sigma at lower bound of feeding layer 155 REAL :: em_sig2feed ! sigma at upper bound of feeding layer 156 REAL, DIMENSION(klev) :: em_wght ! weight density determining the feeding mixture 157 REAL, DIMENSION(klon,klev+1) :: Vprecipi !jyg 134 158 !on enleve le save 135 159 ! SAVE em_sig1feed,em_sig2feed,em_wght 136 160 137 INTEGER iflag(klon) 138 REAL rflag(klon) 139 REAL pbase(klon), bbase(klon) 140 REAL dtvpdt1(klon, klev), dtvpdq1(klon, klev) 141 REAL dplcldt(klon), dplcldr(klon) 142 REAL qcondc(klon, klev) 143 REAL qtc(klon, klev) 144 REAL sigt(klon, klev) 145 REAL wd(klon) 146 REAL plim1(klon), plim2(klon), asupmax(klon, klev) 147 REAL supmax0(klon), asupmaxmin(klon) 148 149 REAL sigd(klon) 150 REAL zx_t, zdelta, zx_qs, zcor 151 REAL tau_cld_cv, coefw_cld_cv 152 REAL epmax_diag(klon) ! epmax_cape 153 161 REAL, DIMENSION(klon) :: rflag 162 REAL, DIMENSION(klon) :: plim1, plim2 163 REAL, DIMENSION(klon) :: ptop2 164 REAL, DIMENSION(klon,klev) :: asupmax 165 REAL, DIMENSION(klon) :: supmax0, asupmaxmin 166 REAL :: zx_t, zdelta, zx_qs, zcor 167 ! 154 168 ! INTEGER iflag_mix 155 169 ! SAVE iflag_mix 156 INTEGER noff, minorig 157 INTEGER i, k, itra 158 REAL qs(klon, klev), qs_wake(klon, klev) 159 REAL cbmf(klon), plcl(klon), plfc(klon), wbeff(klon) 160 REAL convoccur(klon) 170 INTEGER :: noff, minorig 171 INTEGER :: i,j, k, itra 172 REAL, DIMENSION(klon,klev) :: qs, qs_wake 161 173 !LF SAVE cbmf 162 174 !IM/JYG REAL, SAVE, ALLOCATABLE :: cbmf(:) 163 175 !!!$OMP THREADPRIVATE(cbmf)! 164 REAL cbmflast(klon) 165 INTEGER ifrst 166 SAVE ifrst 167 DATA ifrst/0/ 168 !$OMP THREADPRIVATE(ifrst) 176 REAL, DIMENSION(klon) :: cbmflast 169 177 170 178 … … 259 267 snow(:) = 0 260 268 261 ! IF (ifrst .EQ. 0) THEN262 ! ifrst = 1263 269 IF (first) THEN 264 270 first = .FALSE. … … 293 299 sigd(i) = 0. 294 300 END DO 295 END IF !( ifrst .EQ. 0)301 END IF !(first) 296 302 297 303 ! Initialisation a chaque pas de temps … … 393 399 kbas, ktop, & 394 400 dtime, Ma, upwd, dnwd, dnwdbis, qcondc, wd, cape, & 395 da, phi, mp, phi 2, d1a, dam, sij, clw, elij, & !RomP401 da, phi, mp, phii, d1a, dam, sij, clw, elij, & !RomP 396 402 evap, ep, epmlmMm, eplaMm, & !RomP 397 403 wdtrainA, wdtrainM, & !RomP … … 428 434 asupmaxmin, lalim_conv, & 429 435 !AC!+!RomP+jyg 430 !! da,phi,mp,phi 2,d1a,dam,sij,clw,elij, & ! RomP436 !! da,phi,mp,phii,d1a,dam,sij,clw,elij, & ! RomP 431 437 !! evap,ep,epmlmMm,eplaMm, ! RomP 432 da, phi, mp, phi 2, d1a, dam, sij, wght, & ! RomP+RL438 da, phi, mp, phii, d1a, dam, sij, wght, & ! RomP+RL 433 439 clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+RL 434 440 wdtrainA, wdtrainM, qtc, sigt, & -
LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90
r2839 r2870 1369 1369 ! 1370 1370 !Config Key = iflag_pbl_split 1371 !Config Desc = binary flag: least signif bit = split vdf; next bit = split thermals1371 !Config Desc = decimal flag: least signif digit = split vdf; next digit = split thermals 1372 1372 !Config Def = 0 1373 !Config Help = 0-> no splitting; 1-> vdf splitting; 2-> thermals splitting; 3-> full splitting1373 !Config Help = 0-> no splitting; 1-> vdf splitting; 10-> thermals splitting; 11-> full splitting 1374 1374 ! 1375 1375 iflag_pbl_split_omp = 0 1376 CALLgetin('iflag_pbl_split',iflag_pbl_split_omp)1376 call getin('iflag_pbl_split',iflag_pbl_split_omp) 1377 1377 ! 1378 1378 !Config Key = iflag_order2_sollw -
LMDZ5/branches/testing/libf/phylmd/cva_driver.F90
r2787 r2870 39 39 ! ************************************************************** 40 40 41 USE dimphy42 41 USE print_control_mod, ONLY: prt_level, lunout 43 42 IMPLICIT NONE … … 168 167 INTEGER, INTENT (IN) :: ndp1 169 168 INTEGER, INTENT (IN) :: ntra 170 INTEGER, INTENT(IN) :: nloc ! (nloc= klon) pour l'instant169 INTEGER, INTENT(IN) :: nloc ! (nloc=len) pour l'instant 171 170 INTEGER, INTENT (IN) :: k_upper 172 171 INTEGER, INTENT (IN) :: iflag_con … … 219 218 REAL, DIMENSION (len), INTENT (OUT) :: ptop21 220 219 REAL, DIMENSION (len), INTENT (OUT) :: sigd1 221 REAL, DIMENSION (len, nd), INTENT (OUT) :: ma1 222 REAL, DIMENSION (len, nd), INTENT (OUT) :: mip1 220 REAL, DIMENSION (len, nd), INTENT (OUT) :: ma1 ! adiab. asc. mass flux (staggered grid) 221 REAL, DIMENSION (len, nd), INTENT (OUT) :: mip1 ! mass flux shed from adiab. ascent (extensive) 223 222 ! real Vprecip1(len,nd) 224 REAL, DIMENSION (len, ndp1), INTENT (OUT) :: vprecip1 225 REAL, DIMENSION (len, ndp1), INTENT (OUT) :: vprecipi1 226 REAL, DIMENSION (len, nd), INTENT (OUT) :: upwd1 227 REAL, DIMENSION (len, nd), INTENT (OUT) :: dnwd1 228 REAL, DIMENSION (len, nd), INTENT (OUT) :: dnwd01 229 REAL, DIMENSION (len, nd), INTENT (OUT) :: qcondc1 223 REAL, DIMENSION (len, ndp1), INTENT (OUT) :: vprecip1 ! tot precipitation flux (staggered grid) 224 REAL, DIMENSION (len, ndp1), INTENT (OUT) :: vprecipi1 ! ice precipitation flux (staggered grid) 225 REAL, DIMENSION (len, nd), INTENT (OUT) :: upwd1 ! upwd sat. mass flux (staggered grid) 226 REAL, DIMENSION (len, nd), INTENT (OUT) :: dnwd1 ! dnwd sat. mass flux (staggered grid) 227 REAL, DIMENSION (len, nd), INTENT (OUT) :: dnwd01 ! unsat. mass flux (staggered grid) 228 REAL, DIMENSION (len, nd), INTENT (OUT) :: qcondc1 ! max cloud condensate (intensive) ! cld 230 229 REAL, DIMENSION (len), INTENT (OUT) :: wd1 ! gust 231 230 REAL, DIMENSION (len), INTENT (OUT) :: cape1 232 231 REAL, DIMENSION (len), INTENT (OUT) :: cin1 233 REAL, DIMENSION (len, nd), INTENT (OUT) :: tvp1 232 REAL, DIMENSION (len, nd), INTENT (OUT) :: tvp1 ! Virt. temp. in the adiab. ascent 234 233 235 234 !AC! … … 237 236 !! real da(len,nd),phi(len,nd,nd) 238 237 !AC! 239 REAL, DIMENSION (len, nd), INTENT (OUT) :: ftd1 240 REAL, DIMENSION (len, nd), INTENT (OUT) :: fqd1 238 REAL, DIMENSION (len, nd), INTENT (OUT) :: ftd1 ! Temp. tendency due to the sole unsat. drafts 239 REAL, DIMENSION (len, nd), INTENT (OUT) :: fqd1 ! Moist. tendency due to the sole unsat. drafts 241 240 REAL, DIMENSION (len), INTENT (OUT) :: Plim11 242 241 REAL, DIMENSION (len), INTENT (OUT) :: Plim21 243 REAL, DIMENSION (len, nd), INTENT (OUT) :: asupmax1 242 REAL, DIMENSION (len, nd), INTENT (OUT) :: asupmax1 ! Highest mixing fraction of mixed updraughts 244 243 REAL, DIMENSION (len), INTENT (OUT) :: supmax01 245 244 REAL, DIMENSION (len), INTENT (OUT) :: asupmaxmin1 246 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1 247 REAL, DIMENSION (len, nd), INTENT (OUT) :: sigt1 ! cld245 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1 ! in cloud water content (intensive) ! cld 246 REAL, DIMENSION (len, nd), INTENT (OUT) :: sigt1 ! fract. cloud area (intensive) ! cld 248 247 249 248 ! RomP >>> 250 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainM1 251 REAL, DIMENSION (len, nd), INTENT (OUT) :: da1, mp1 252 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi1 253 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: epmlmMm1 254 REAL, DIMENSION (len, nd), INTENT (OUT) :: eplaMm1 255 REAL, DIMENSION (len, nd), INTENT (OUT) :: evap1, ep1 256 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: sigij1, elij1 257 REAL, DIMENSION (len, nd), INTENT (OUT) :: clw1 249 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainM1 ! precipitation sources (extensive) 250 REAL, DIMENSION (len, nd), INTENT (OUT) :: mp1 ! unsat. mass flux (staggered grid) 251 REAL, DIMENSION (len, nd), INTENT (OUT) :: da1 ! detrained mass flux of adiab. asc. air (extensive) 252 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi1 ! mass flux of envt. air in mixed draughts (extensive) 253 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: epmlmMm1 ! (extensive) 254 REAL, DIMENSION (len, nd), INTENT (OUT) :: eplaMm1 ! (extensive) 255 REAL, DIMENSION (len, nd), INTENT (OUT) :: evap1 ! evaporation rate in precip. downdraft. (intensive) 256 REAL, DIMENSION (len, nd), INTENT (OUT) :: ep1 257 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: sigij1 ! mass fraction of env. air in mixed draughts (intensive) 258 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: elij1! cond. water per unit mass of mixed draughts (intensive) 259 REAL, DIMENSION (len, nd), INTENT (OUT) :: clw1 ! cond. water per unit mass of the adiab. asc. (intensive) 258 260 !JYG,RL 259 REAL, DIMENSION (len, nd), INTENT (OUT) :: wghti1 ! final weight of the feeding layers261 REAL, DIMENSION (len, nd), INTENT (OUT) :: wghti1 ! final weight of the feeding layers (extensive) 260 262 !JYG,RL 261 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi21 262 REAL, DIMENSION (len, nd), INTENT (OUT) :: d1a1, dam1 263 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi21 ! (extensive) 264 REAL, DIMENSION (len, nd), INTENT (OUT) :: d1a1 ! (extensive) 265 REAL, DIMENSION (len, nd), INTENT (OUT) :: dam1 ! (extensive) 263 266 ! RomP <<< 264 267 REAL, DIMENSION (len ), INTENT (OUT) :: epmax_diag1 … … 395 398 396 399 397 INTEGER i, k, n, il, j400 INTEGER i, k, il 398 401 INTEGER nword1, nword2, nword3, nword4 399 402 INTEGER icbmax 400 INTEGER nk1( klon)401 INTEGER icb1( klon)402 INTEGER icbs1( klon)403 INTEGER nk1(len) 404 INTEGER icb1(len) 405 INTEGER icbs1(len) 403 406 404 407 LOGICAL ok_inhib ! True => possible inhibition of convection by dryness … … 407 410 408 411 REAL coef_convective(len) ! = 1 for convective points, = 0 otherwise 409 REAL tnk1(klon) 410 REAL thnk1(klon) 411 REAL qnk1(klon) 412 REAL gznk1(klon) 413 REAL pnk1(klon) 414 REAL qsnk1(klon) 415 REAL unk1(klon) 416 REAL vnk1(klon) 417 REAL cpnk1(klon) 418 REAL hnk1(klon) 419 REAL pbase1(klon) 420 REAL buoybase1(klon) 421 422 REAL lf1(klon, klev), lf1_wake(klon, klev) 423 REAL lv1(klon, klev), lv1_wake(klon, klev) 424 REAL cpn1(klon, klev), cpn1_wake(klon, klev) 425 REAL tv1(klon, klev), tv1_wake(klon, klev) 426 REAL gz1(klon, klev), gz1_wake(klon, klev) 427 REAL hm1(klon, klev), hm1_wake(klon, klev) 428 REAL h1(klon, klev), h1_wake(klon, klev) 429 REAL tp1(klon, klev) 430 REAL th1(klon, klev), th1_wake(klon, klev) 431 432 REAL bid(klon, klev) ! dummy array 412 REAL tnk1(len) 413 REAL thnk1(len) 414 REAL qnk1(len) 415 REAL gznk1(len) 416 REAL qsnk1(len) 417 REAL unk1(len) 418 REAL vnk1(len) 419 REAL cpnk1(len) 420 REAL hnk1(len) 421 REAL pbase1(len) 422 REAL buoybase1(len) 423 424 REAL lf1(len, nd), lf1_wake(len, nd) 425 REAL lv1(len, nd), lv1_wake(len, nd) 426 REAL cpn1(len, nd), cpn1_wake(len, nd) 427 REAL tv1(len, nd), tv1_wake(len, nd) 428 REAL gz1(len, nd), gz1_wake(len, nd) 429 REAL hm1(len, nd) 430 REAL h1(len, nd), h1_wake(len, nd) 431 REAL tp1(len, nd) 432 REAL th1(len, nd), th1_wake(len, nd) 433 434 REAL bid(len, nd) ! dummy array 433 435 434 436 INTEGER ncum 435 437 436 INTEGER j1feed(klon)437 INTEGER j2feed(klon)438 438 REAL p1feed1(len) ! pressure at lower bound of feeding layer 439 439 REAL p2feed1(len) ! pressure at upper bound of feeding layer … … 450 450 !>jyg 451 451 INTEGER iflag(nloc), nk(nloc), icb(nloc) 452 INTEGER nent(nloc, klev)452 INTEGER nent(nloc, nd) 453 453 INTEGER icbs(nloc) 454 454 INTEGER inb(nloc), inbis(nloc) 455 455 456 456 REAL cbmf(nloc), plcl(nloc), plfc(nloc), wbeff(nloc) 457 REAL t(nloc, klev), q(nloc, klev), qs(nloc, klev)458 REAL t_wake(nloc, klev), q_wake(nloc, klev), qs_wake(nloc, klev)457 REAL t(nloc, nd), q(nloc, nd), qs(nloc, nd) 458 REAL t_wake(nloc, nd), q_wake(nloc, nd), qs_wake(nloc, nd) 459 459 REAL s_wake(nloc) 460 REAL u(nloc, klev), v(nloc, klev)461 REAL gz(nloc, klev), h(nloc, klev), hm(nloc, klev)462 REAL h_wake(nloc, klev), hm_wake(nloc, klev)463 REAL lv(nloc, klev), lf(nloc, klev), cpn(nloc, klev)464 REAL lv_wake(nloc, klev), lf_wake(nloc, klev), cpn_wake(nloc, klev)465 REAL p(nloc, klev), ph(nloc, klev+1), tv(nloc, klev), tp(nloc, klev)466 REAL tv_wake(nloc, klev)467 REAL clw(nloc, klev)468 REAL dph(nloc, klev)469 REAL pbase(nloc), buoybase(nloc), th(nloc, klev)470 REAL th_wake(nloc, klev)471 REAL tvp(nloc, klev)472 REAL sig(nloc, klev), w0(nloc, klev), ptop2(nloc)473 REAL hp(nloc, klev), ep(nloc, klev), sigp(nloc, klev)474 REAL buoy(nloc, klev)460 REAL u(nloc, nd), v(nloc, nd) 461 REAL gz(nloc, nd), h(nloc, nd) 462 REAL h_wake(nloc, nd) 463 REAL lv(nloc, nd), lf(nloc, nd), cpn(nloc, nd) 464 REAL lv_wake(nloc, nd), lf_wake(nloc, nd), cpn_wake(nloc, nd) 465 REAL p(nloc, nd), ph(nloc, nd+1), tv(nloc, nd), tp(nloc, nd) 466 REAL tv_wake(nloc, nd) 467 REAL clw(nloc, nd) 468 REAL dph(nloc, nd) 469 REAL pbase(nloc), buoybase(nloc), th(nloc, nd) 470 REAL th_wake(nloc, nd) 471 REAL tvp(nloc, nd) 472 REAL sig(nloc, nd), w0(nloc, nd), ptop2(nloc) 473 REAL hp(nloc, nd), ep(nloc, nd), sigp(nloc, nd) 474 REAL buoy(nloc, nd) 475 475 REAL cape(nloc) 476 476 REAL cin(nloc) 477 REAL m(nloc, klev)478 REAL ment(nloc, klev, klev), sigij(nloc, klev, klev)479 REAL qent(nloc, klev, klev)480 REAL hent(nloc, klev, klev)481 REAL uent(nloc, klev, klev), vent(nloc, klev, klev)482 REAL ments(nloc, klev, klev), qents(nloc, klev, klev)483 REAL elij(nloc, klev, klev)484 REAL supmax(nloc, klev)477 REAL m(nloc, nd) 478 REAL ment(nloc, nd, nd), sigij(nloc, nd, nd) 479 REAL qent(nloc, nd, nd) 480 REAL hent(nloc, nd, nd) 481 REAL uent(nloc, nd, nd), vent(nloc, nd, nd) 482 REAL ments(nloc, nd, nd), qents(nloc, nd, nd) 483 REAL elij(nloc, nd, nd) 484 REAL supmax(nloc, nd) 485 485 REAL Ale(nloc), Alp(nloc), coef_clos(nloc) 486 REAL omega(nloc, klev)486 REAL omega(nloc,nd) 487 487 REAL sigd(nloc) 488 ! real mp(nloc, klev), qp(nloc,klev), up(nloc,klev), vp(nloc,klev)489 ! real wt(nloc, klev), water(nloc,klev), evap(nloc,klev), ice(nloc,klev)490 ! real b(nloc, klev), sigd(nloc)488 ! real mp(nloc,nd), qp(nloc,nd), up(nloc,nd), vp(nloc,nd) 489 ! real wt(nloc,nd), water(nloc,nd), evap(nloc,nd), ice(nloc,nd) 490 ! real b(nloc,nd), sigd(nloc) 491 491 ! save mp,qp,up,vp,wt,water,evap,b 492 REAL, SAVE, ALLOCATABLE :: mp(:, :), qp(:, :), up(:, :), vp(:, :) 493 REAL, SAVE, ALLOCATABLE :: wt(:, :), water(:, :), evap(:, :) 494 REAL, SAVE, ALLOCATABLE :: ice(:, :), fondue(:, :), b(:, :) 495 REAL, SAVE, ALLOCATABLE :: frac(:, :), faci(:, :) 496 !$OMP THREADPRIVATE(mp,qp,up,vp,wt,water,evap,ice,fondue,b,frac,faci) 497 REAL ft(nloc, klev), fq(nloc, klev) 498 REAL ftd(nloc, klev), fqd(nloc, klev) 499 REAL fu(nloc, klev), fv(nloc, klev) 500 REAL upwd(nloc, klev), dnwd(nloc, klev), dnwd0(nloc, klev) 501 REAL ma(nloc, klev), mip(nloc, klev) 502 !! REAL tls(nloc, klev), tps(nloc, klev) ! unused . jyg 492 REAL, DIMENSION(len,nd) :: mp, qp, up, vp 493 REAL, DIMENSION(len,nd) :: wt, water, evap 494 REAL, DIMENSION(len,nd) :: ice, fondue, b 495 REAL, DIMENSION(len,nd) :: frac, faci 496 REAL ft(nloc, nd), fq(nloc, nd) 497 REAL ftd(nloc, nd), fqd(nloc, nd) 498 REAL fu(nloc, nd), fv(nloc, nd) 499 REAL upwd(nloc, nd), dnwd(nloc, nd), dnwd0(nloc, nd) 500 REAL ma(nloc, nd), mip(nloc, nd) 501 !! REAL tls(nloc, nd), tps(nloc, nd) ! unused . jyg 503 502 REAL qprime(nloc), tprime(nloc) 504 503 REAL precip(nloc) 505 ! real Vprecip(nloc, klev)506 REAL vprecip(nloc, klev+1)507 REAL vprecipi(nloc, klev+1)508 REAL tra(nloc, klev, ntra), trap(nloc, klev, ntra)509 REAL ftra(nloc, klev, ntra), traent(nloc, klev, klev, ntra)510 REAL qcondc(nloc, klev) ! cld504 ! real Vprecip(nloc,nd) 505 REAL vprecip(nloc, nd+1) 506 REAL vprecipi(nloc, nd+1) 507 REAL tra(nloc, nd, ntra), trap(nloc, nd, ntra) 508 REAL ftra(nloc, nd, ntra), traent(nloc, nd, nd, ntra) 509 REAL qcondc(nloc, nd) ! cld 511 510 REAL wd(nloc) ! gust 512 511 REAL Plim1(nloc), plim2(nloc) 513 REAL asupmax(nloc, klev)512 REAL asupmax(nloc, nd) 514 513 REAL supmax0(nloc) 515 514 REAL asupmaxmin(nloc) … … 519 518 REAL hnk(nloc), unk(nloc), vnk(nloc) 520 519 521 REAL qtc(nloc, klev) ! cld522 REAL sigt(nloc, klev) ! cld520 REAL qtc(nloc, nd) ! cld 521 REAL sigt(nloc, nd) ! cld 523 522 524 523 ! RomP >>> 525 REAL wdtrainA(nloc, klev), wdtrainM(nloc, klev)524 REAL wdtrainA(nloc, nd), wdtrainM(nloc, nd) 526 525 REAL da(len, nd), phi(len, nd, nd) 527 REAL epmlmMm(nloc, klev, klev), eplaMm(nloc, klev)526 REAL epmlmMm(nloc, nd, nd), eplaMm(nloc, nd) 528 527 REAL phi2(len, nd, nd) 529 528 REAL d1a(len, nd), dam(len, nd) … … 531 530 REAL epmax_diag(nloc) ! epmax_cape 532 531 533 LOGICAL, SAVE :: first = .TRUE.534 !$OMP THREADPRIVATE(first)535 532 CHARACTER (LEN=20) :: modname = 'cva_driver' 536 533 CHARACTER (LEN=80) :: abort_message … … 540 537 541 538 542 ! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1, klev)543 ! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1, klev)539 ! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,nd) 540 ! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1,nd) 544 541 545 542 ! ------------------------------------------------------------------- … … 547 544 ! ------------------------------------------------------------------- 548 545 549 IF (first) THEN550 ALLOCATE (mp(nloc,klev), qp(nloc,klev), up(nloc,klev))551 ALLOCATE (vp(nloc,klev), wt(nloc,klev), water(nloc,klev))552 ALLOCATE (ice(nloc,klev), fondue(nloc,klev))553 ALLOCATE (evap(nloc,klev), b(nloc,klev))554 ALLOCATE (frac(nloc,klev), faci(nloc,klev))555 first = .FALSE.556 END IF557 546 ! -- set simulation flags: 558 547 ! (common cvflag) … … 736 725 ! print*, 'IFLAG1 avant cv3_feed' 737 726 ! print*,'len,nd',len,nd 738 ! write(*,'(64i1)') iflag1(2: klon-1)727 ! write(*,'(64i1)') iflag1(2:len-1) 739 728 740 729 if (prt_level >= 9) & … … 749 738 ! print*, 'IFLAG1 apres cv3_feed' 750 739 ! print*,'len,nd',len,nd 751 ! write(*,'(64i1)') iflag1(2: klon-1)740 ! write(*,'(64i1)') iflag1(2:len-1) 752 741 753 742 IF (iflag_con==4) THEN … … 799 788 ! print*, 'IFLAG1 apres cv3_triger' 800 789 ! print*,'len,nd',len,nd 801 ! write(*,'(64i1)') iflag1(2: klon-1)790 ! write(*,'(64i1)') iflag1(2:len-1) 802 791 803 792 ! call dump2d(iim,jjm-1,sig1(2) … … 828 817 END DO 829 818 830 ! print*,' klon, ncum = ',len,ncum819 ! print*,'len, ncum = ',len,ncum 831 820 832 821 IF (ncum>0) THEN … … 944 933 ! END IF 945 934 IF (iflag_mix>=1) THEN 946 CALL zilch(supmax, nloc* klev)935 CALL zilch(supmax, nloc*nd) 947 936 if (prt_level >= 9) & 948 937 PRINT *, 'cva_driver -> cv3p_mixing' … … 955 944 956 945 ELSE 957 CALL zilch(supmax, nloc* klev)946 CALL zilch(supmax, nloc*nd) 958 947 END IF 959 948 END IF … … 1031 1020 unk, vnk, hp, tv, tvp, ep, clw, m, sig, & 1032 1021 ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent) 1033 CALL zilch(hent, nloc* klev*klev)1022 CALL zilch(hent, nloc*nd*nd) 1034 1023 ELSE 1035 1024 CALL cv3_mixscale(nloc, ncum, nd, ment, m) -
LMDZ5/branches/testing/libf/phylmd/dyn1d/1DUTILS.h
r2839 r2870 653 653 654 654 modname = 'dyn1deta0 : ' 655 nmq(1)="vap" 656 nmq(2)="cond" 657 do iq=3,nqtot 658 write(nmq(iq),'("tra",i1)') iq-2 659 enddo 655 !! nmq(1)="vap" 656 !! nmq(2)="cond" 657 !! do iq=3,nqtot 658 !! write(nmq(iq),'("tra",i1)') iq-2 659 !! enddo 660 DO iq = 1,nqtot 661 nmq(iq) = trim(tname(iq)) 662 ENDDO 660 663 print*,'in dyn1deta0 ',fichnom,klon,klev,nqtot 661 664 CALL open_startphy(fichnom) … … 804 807 CALL open_restartphy(fichnom) 805 808 print*,'redm1 ',fichnom,klon,klev,nqtot 806 nmq(1)="vap" 807 nmq(2)="cond" 808 nmq(3)="tra1" 809 nmq(4)="tra2" 809 !! nmq(1)="vap" 810 !! nmq(2)="cond" 811 !! nmq(3)="tra1" 812 !! nmq(4)="tra2" 813 DO iq = 1,nqtot 814 nmq(iq) = trim(tname(iq)) 815 ENDDO 810 816 811 817 modname = 'dyn1dredem' -
LMDZ5/branches/testing/libf/phylmd/ener_conserv.F90
r2839 r2870 1 1 subroutine ener_conserv(klon,klev,pdtphys, & 2 & puo,pvo,pto,pqo,pun,pvn,ptn,pqn,dtke,masse,exner,d_t_ec) 2 & puo,pvo,pto,pqo,pql0,pqs0, & 3 & pun,pvn,ptn,pqn,pqln,pqsn,dtke,masse,exner,d_t_ec) 3 4 4 5 !============================================================= … … 19 20 20 21 ! From module 21 USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs,d_u_con,d_v_con,d_t_con,d_t_diss 22 USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs, & 23 & d_u_con,d_v_con,d_t_con,d_t_diss 22 24 USE phys_local_var_mod, ONLY : d_t_eva,d_t_lsc,d_q_eva,d_q_lsc 23 25 USE phys_output_var_mod, ONLY : bils_ec,bils_ech,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss … … 32 34 INTEGER, INTENT(IN) :: klon,klev 33 35 REAL, INTENT(IN) :: pdtphys 34 REAL, DIMENSION(klon,klev), INTENT(IN) :: puo,pvo,pto,pqo35 REAL, DIMENSION(klon,klev), INTENT(IN) :: pun,pvn,ptn,pqn36 REAL, DIMENSION(klon,klev), INTENT(IN):: masse,exner37 REAL, DIMENSION(klon,klev+1), INTENT(IN):: dtke38 REAL, DIMENSION(klon,klev),INTENT(OUT) :: d_t_ec 39 integer k,i 36 REAL, DIMENSION(klon,klev), INTENT(IN) :: puo,pvo,pto,pqo,pql0,pqs0 37 REAL, DIMENSION(klon,klev), INTENT(IN) :: pun,pvn,ptn,pqn,pqln,pqsn 38 REAL, DIMENSION(klon,klev), INTENT(IN) :: masse,exner 39 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: dtke 40 ! 41 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d_t_ec 40 42 41 43 ! Local 44 integer k,i 42 45 REAL, DIMENSION(klon,klev+1) :: fluxu,fluxv,fluxt 43 46 REAL, DIMENSION(klon,klev+1) :: dddu,dddv,dddt … … 56 59 DO k = 1, klev 57 60 DO i = 1, klon 58 ZRCPD = RCPD*(1.0+RVTMP2* pqn(i,k))61 ZRCPD = RCPD*(1.0+RVTMP2*(pqn(i,k)+pqln(i,k)+pqsn(i,k))) 59 62 d_t_ec(i,k)=0.5/ZRCPD & 60 63 & *(puo(i,k)**2+pvo(i,k)**2-pun(i,k)**2-pvn(i,k)**2) -
LMDZ5/branches/testing/libf/phylmd/iophy.F90
r2669 r2870 45 45 46 46 SUBROUTINE init_iophy_new(rlat,rlon) 47 USE dimphy, only: klon48 USE mod_phys_lmdz_para, only: gather, bcast, &47 USE dimphy, ONLY: klon 48 USE mod_phys_lmdz_para, ONLY: gather, bcast, & 49 49 jj_nb, jj_begin, jj_end, ii_begin, ii_end, & 50 50 mpi_size, mpi_rank, klon_mpi, & 51 51 is_sequential, is_south_pole_dyn 52 USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo52 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo 53 53 USE print_control_mod, ONLY: prt_level,lunout 54 54 #ifdef CPP_IOIPSL 55 USE ioipsl, only: flio_dom_set56 #endif 57 #ifdef CPP_XIOS 58 use wxios, only: wxios_domain_param55 USE ioipsl, ONLY: flio_dom_set 56 #endif 57 #ifdef CPP_XIOS 58 USE wxios, ONLY: wxios_domain_param 59 59 #endif 60 60 IMPLICIT NONE … … 136 136 ELSE 137 137 data_ibegin = ii_begin - 1 138 END 138 ENDIF 139 139 140 140 IF (mpi_rank == mpi_size-1) THEN … … 142 142 ELSE 143 143 data_iend = ii_end + 1 144 END 145 146 if (prt_level>=10) then144 ENDIF 145 146 IF (prt_level>=10) THEN 147 147 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end 148 148 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat … … 150 150 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 151 151 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn 152 endif152 ENDIF 153 153 154 154 ! Initialize the XIOS domain coreesponding to this process: … … 163 163 164 164 SUBROUTINE init_iophy(lat,lon) 165 USE mod_phys_lmdz_para, only: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &165 USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, & 166 166 mpi_size, mpi_rank 167 USE ioipsl, only: flio_dom_set167 USE ioipsl, ONLY: flio_dom_set 168 168 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 169 169 IMPLICIT NONE … … 180 180 181 181 !$OMP MASTER 182 allocate(io_lat(nbp_lat))182 ALLOCATE(io_lat(nbp_lat)) 183 183 io_lat(:)=lat(:) 184 allocate(io_lon(nbp_lon))184 ALLOCATE(io_lon(nbp_lon)) 185 185 io_lon(:)=lon(:) 186 186 … … 191 191 dpl=(/ nbp_lon, jj_end /) 192 192 dhs=(/ ii_begin-1,0 /) 193 if (mpi_rank==mpi_size-1) then193 IF (mpi_rank==mpi_size-1) THEN 194 194 dhe=(/0,0/) 195 else195 ELSE 196 196 dhe=(/ nbp_lon-ii_end,0 /) 197 endif197 ENDIF 198 198 199 199 #ifndef CPP_IOIPSL_NO_OUTPUT … … 203 203 !$OMP END MASTER 204 204 205 endSUBROUTINE init_iophy205 END SUBROUTINE init_iophy 206 206 207 207 SUBROUTINE histbeg_phyxios(name,itau0,zjulian,dtime,ffreq,lev,nhori,nid_day) 208 208 ! USE dimphy 209 USE mod_phys_lmdz_para, only: is_sequential, is_using_mpi, is_mpi_root, &209 USE mod_phys_lmdz_para, ONLY: is_sequential, is_using_mpi, is_mpi_root, & 210 210 jj_begin, jj_end, jj_nb 211 211 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 212 use ioipsl, only: histbeg213 #ifdef CPP_XIOS 214 use wxios, only: wxios_add_file212 USE ioipsl, ONLY: histbeg 213 #ifdef CPP_XIOS 214 USE wxios, ONLY: wxios_add_file 215 215 #endif 216 216 IMPLICIT NONE 217 217 include 'clesphys.h' 218 218 219 character*(*), INTENT(IN) :: name220 integer, INTENT(IN) :: itau0219 CHARACTER*(*), INTENT(IN) :: name 220 INTEGER, INTENT(IN) :: itau0 221 221 REAL,INTENT(IN) :: zjulian 222 222 REAL,INTENT(IN) :: dtime 223 character(LEN=*), INTENT(IN) :: ffreq223 CHARACTER(LEN=*), INTENT(IN) :: ffreq 224 224 INTEGER,INTENT(IN) :: lev 225 integer,intent(out) :: nhori226 integer,intent(out) :: nid_day225 INTEGER,INTENT(OUT) :: nhori 226 INTEGER,INTENT(OUT) :: nid_day 227 227 228 228 !$OMP MASTER 229 if (is_sequential) then229 IF (is_sequential) THEN 230 230 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 231 231 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 232 else232 ELSE 233 233 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 234 234 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 235 endif235 ENDIF 236 236 237 237 #ifdef CPP_XIOS … … 242 242 CALL wxios_add_file(name, ffreq, lev) 243 243 ENDIF 244 END 244 ENDIF 245 245 #endif 246 246 !$OMP END MASTER … … 250 250 SUBROUTINE histbeg_phy(name,itau0,zjulian,dtime,nhori,nid_day) 251 251 252 USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential252 USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, jj_nb, is_sequential 253 253 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 254 use ioipsl, only: histbeg254 USE ioipsl, ONLY: histbeg 255 255 256 256 IMPLICIT NONE 257 257 258 character*(*), INTENT(IN) :: name259 integer, INTENT(IN) :: itau0258 CHARACTER*(*), INTENT(IN) :: name 259 INTEGER, INTENT(IN) :: itau0 260 260 REAL,INTENT(IN) :: zjulian 261 261 REAL,INTENT(IN) :: dtime 262 integer,intent(out) :: nhori263 integer,intent(out) :: nid_day262 INTEGER,INTENT(OUT) :: nhori 263 INTEGER,INTENT(OUT) :: nid_day 264 264 265 265 !$OMP MASTER 266 266 #ifndef CPP_IOIPSL_NO_OUTPUT 267 if (is_sequential) then267 IF (is_sequential) THEN 268 268 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 269 269 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 270 else270 ELSE 271 271 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 272 272 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 273 endif273 ENDIF 274 274 #endif 275 275 !$OMP END MASTER … … 281 281 plon,plat,plon_bounds,plat_bounds, & 282 282 nname,itau0,zjulian,dtime,nnhori,nnid_day) 283 USE dimphy, only: klon284 USE mod_phys_lmdz_para, only: gather, bcast, &283 USE dimphy, ONLY: klon 284 USE mod_phys_lmdz_para, ONLY: gather, bcast, & 285 285 is_sequential, klon_mpi_begin, klon_mpi_end, & 286 286 mpi_rank 287 USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat288 use ioipsl, only: histbeg287 USE mod_grid_phy_lmdz, ONLY: klon_glo, nbp_lon, nbp_lat 288 USE ioipsl, ONLY: histbeg 289 289 290 290 IMPLICIT NONE … … 292 292 REAL,DIMENSION(klon),INTENT(IN) :: rlon 293 293 REAL,DIMENSION(klon),INTENT(IN) :: rlat 294 integer, INTENT(IN) :: itau0294 INTEGER, INTENT(IN) :: itau0 295 295 REAL,INTENT(IN) :: zjulian 296 296 REAL,INTENT(IN) :: dtime 297 integer, INTENT(IN) :: pim298 integer, intent(out) :: nnhori299 character(len=20), INTENT(IN) :: nname300 INTEGER, intent(out) :: nnid_day301 integer:: i297 INTEGER, INTENT(IN) :: pim 298 INTEGER, intent(out) :: nnhori 299 CHARACTER(len=20), INTENT(IN) :: nname 300 INTEGER, INTENT(OUT) :: nnid_day 301 INTEGER :: i 302 302 REAL,DIMENSION(klon_glo) :: rlat_glo 303 303 REAL,DIMENSION(klon_glo) :: rlon_glo … … 328 328 plon_bounds(i,1)=rlon_glo(tabij(i)-1) 329 329 plon_bounds(i,2)=rlon_glo(tabij(i)+1) 330 if(plon_bounds(i,2).LE.0..AND.plon_bounds(i,1).GE.0.) THEN331 if(rlon_glo(tabij(i)).GE.0.) THEN330 IF (plon_bounds(i,2).LE.0..AND.plon_bounds(i,1).GE.0.) THEN 331 IF (rlon_glo(tabij(i)).GE.0.) THEN 332 332 plon_bounds(i,2)=-1*plon_bounds(i,2) 333 endif334 endif335 if(plon_bounds(i,2).GE.0..AND.plon_bounds(i,1).LE.0.) THEN336 if(rlon_glo(tabij(i)).LE.0.) THEN333 ENDIF 334 ENDIF 335 IF (plon_bounds(i,2).GE.0..AND.plon_bounds(i,1).LE.0.) THEN 336 IF (rlon_glo(tabij(i)).LE.0.) THEN 337 337 plon_bounds(i,2)=-1*plon_bounds(i,2) 338 endif339 endif338 ENDIF 339 ENDIF 340 340 ! 341 341 IF ( tabij(i).LE.nbp_lon) THEN … … 361 361 362 362 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon) 363 if ((nbp_lon*nbp_lat).gt.1) then363 IF ((nbp_lon*nbp_lat).GT.1) THEN 364 364 DO i = 1, nbp_lon 365 365 zx_lon(i,1) = rlon_glo(i+1) 366 366 zx_lon(i,nbp_lat) = rlon_glo(i+1) 367 367 ENDDO 368 endif368 ENDIF 369 369 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat) 370 370 … … 375 375 plon_bounds(i,2)=zx_lon(ipt(i)+1,jpt(i)) 376 376 377 if (ipt(i).EQ.1) then377 IF (ipt(i).EQ.1) THEN 378 378 plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i)) 379 379 plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i)) 380 endif380 ENDIF 381 381 382 if (ipt(i).EQ.nbp_lon) then382 IF (ipt(i).EQ.nbp_lon) THEN 383 383 plon_bounds(i,2)=360.+zx_lon(1,jpt(i)) 384 endif384 ENDIF 385 385 386 386 plat_bounds(i,1)=zx_lat(ipt(i),jpt(i)-1) 387 387 plat_bounds(i,2)=zx_lat(ipt(i),jpt(i)+1) 388 388 389 if (jpt(i).EQ.1) then389 IF (jpt(i).EQ.1) THEN 390 390 plat_bounds(i,1)=zx_lat(ipt(i),1)+0.001 391 391 plat_bounds(i,2)=zx_lat(ipt(i),1)-0.001 392 endif392 ENDIF 393 393 394 if (jpt(i).EQ.nbp_lat) then394 IF (jpt(i).EQ.nbp_lat) THEN 395 395 plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001 396 396 plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001 397 endif397 ENDIF 398 398 ! 399 399 ! print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon(tabij(i)),plon_bounds(i,2) … … 407 407 itau0, zjulian, dtime, nnhori, nnid_day) 408 408 #endif 409 else409 ELSE 410 410 npproc=0 411 411 DO ip=1, pim … … 448 448 itau0,zjulian,dtime,nnhori,nnid_day,phys_domain_id) 449 449 #endif 450 endif450 ENDIF 451 451 !$OMP END MASTER 452 452 453 endSUBROUTINE histbeg_phy_points453 END SUBROUTINE histbeg_phy_points 454 454 455 455 456 456 SUBROUTINE histdef2d_old (iff,lpoint,flag_var,nomvar,titrevar,unitvar) 457 457 458 USE ioipsl, only: histdef459 USE mod_phys_lmdz_para, only: jj_nb460 use phys_output_var_mod, only: type_ecri, zoutm, zdtime_moy, lev_files, &461 nid_files, nhorim, swaero_diag, nfiles458 USE ioipsl, ONLY: histdef 459 USE mod_phys_lmdz_para, ONLY: jj_nb 460 USE phys_output_var_mod, ONLY: type_ecri, zoutm, zdtime_moy, lev_files, & 461 nid_files, nhorim, swaero_diag, dryaod_diag, nfiles 462 462 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 463 USE aero_mod, ONLY : naero_tot, name_aero_tau 464 463 465 IMPLICIT NONE 464 466 … … 466 468 467 469 INTEGER :: iff 470 INTEGER :: naero 468 471 LOGICAL :: lpoint 469 472 INTEGER, DIMENSION(nfiles) :: flag_var 470 CHARACTER(LEN=20) 473 CHARACTER(LEN=20) :: nomvar 471 474 CHARACTER(LEN=*) :: titrevar 472 475 CHARACTER(LEN=*) :: unitvar … … 498 501 499 502 ! Set swaero_diag=true if at least one of the concerned variables are defined 500 IF (nomvar=='topswad' .OR. nomvar=='topswai' .OR. nomvar=='solswad' .OR. nomvar=='solswai' ) THEN 501 IF ( flag_var(iff)<=lev_files(iff) ) THEN 502 swaero_diag=.TRUE. 503 END IF 504 END IF 503 IF (nomvar=='topswad' .OR. nomvar=='topswad0' .OR. nomvar=='solswad' .OR. nomvar=='solswad0' .OR. & 504 nomvar=='toplwad' .OR. nomvar=='toplwad0' .OR. nomvar=='sollwad' .OR. nomvar=='sollwad0' .OR. & 505 nomvar=='topswai' .OR. nomvar=='solswai' ) THEN 506 IF ( flag_var(iff)<=lev_files(iff) ) swaero_diag=.TRUE. 507 ENDIF 508 509 ! Set dryaod_diag=true if at least one of the concerned variables are defined 510 IF (nomvar=='dryod550aer') THEN 511 IF ( flag_var(iff)<=lev_files(iff) ) dryaod_diag=.TRUE. 512 ENDIF 513 DO naero = 1, naero_tot-1 514 IF (nomvar=='dryod550_'//name_aero_tau(naero)) THEN 515 IF ( flag_var(iff)<=lev_files(iff) ) dryaod_diag=.TRUE. 516 ENDIF 517 ENDDO 518 505 519 END SUBROUTINE histdef2d_old 506 520 507 508 509 521 SUBROUTINE histdef3d_old (iff,lpoint,flag_var,nomvar,titrevar,unitvar) 510 522 511 USE ioipsl, only: histdef512 USE dimphy, only: klev513 USE mod_phys_lmdz_para, only: jj_nb514 use phys_output_var_mod, only: type_ecri, zoutm, lev_files, nid_files, &523 USE ioipsl, ONLY: histdef 524 USE dimphy, ONLY: klev 525 USE mod_phys_lmdz_para, ONLY: jj_nb 526 USE phys_output_var_mod, ONLY: type_ecri, zoutm, lev_files, nid_files, & 515 527 nhorim, zdtime_moy, levmin, levmax, & 516 528 nvertm, nfiles … … 555 567 END SUBROUTINE histdef3d_old 556 568 557 558 559 560 561 562 563 564 569 SUBROUTINE histdef2d (iff,var) 565 570 566 USE ioipsl, only: histdef567 USE mod_phys_lmdz_para, only: jj_nb568 use phys_output_var_mod, only: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &571 USE ioipsl, ONLY: histdef 572 USE mod_phys_lmdz_para, ONLY: jj_nb 573 USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, & 569 574 clef_stations, phys_out_filenames, lev_files, & 570 nid_files, nhorim, swaero_diag 575 nid_files, nhorim, swaero_diag, dryaod_diag 571 576 USE print_control_mod, ONLY: prt_level,lunout 572 577 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 573 #ifdef CPP_XIOS 574 use wxios, only: wxios_add_field_to_file 578 USE aero_mod, ONLY : naero_tot, name_aero_tau 579 #ifdef CPP_XIOS 580 USE wxios, ONLY: wxios_add_field_to_file 575 581 #endif 576 582 IMPLICIT NONE … … 579 585 580 586 INTEGER :: iff 587 INTEGER :: naero 581 588 TYPE(ctrl_out) :: var 582 589 583 590 REAL zstophym 584 591 CHARACTER(LEN=20) :: typeecrit 585 586 592 587 593 ! ug On récupère le type écrit de la structure: … … 638 644 ENDIF 639 645 640 ! Set swaero_diag=true if at least one of the concerned variables are 641 ! defined 646 ! Set swaero_diag=true if at least one of the concerned variables are defined 642 647 !--OB 30/05/2016 use wider set of variables 643 648 IF ( var%name=='topswad' .OR. var%name=='topswad0' .OR. var%name=='solswad' .OR. var%name=='solswad0' .OR. & … … 645 650 var%name=='toplwad' .OR. var%name=='toplwad0' .OR. var%name=='sollwad' .OR. var%name=='sollwad0' .OR. & 646 651 var%name=='toplwai' .OR. var%name=='sollwai' ) ) ) THEN 647 IF ( var%flag(iff)<=lev_files(iff) ) THEN 648 swaero_diag=.TRUE. 649 END IF 650 END IF 652 IF ( var%flag(iff)<=lev_files(iff) ) swaero_diag=.TRUE. 653 ENDIF 654 655 ! set dryaod_dry=true if at least one of the concerned variables are defined 656 IF (var%name=='dryod550aer') THEN 657 IF ( var%flag(iff)<=lev_files(iff) ) dryaod_diag=.TRUE. 658 ENDIF 659 ! 660 DO naero = 1, naero_tot-1 661 IF (var%name=='dryod550_'//name_aero_tau(naero)) THEN 662 IF ( var%flag(iff)<=lev_files(iff) ) dryaod_diag=.TRUE. 663 ENDIF 664 ENDDO 651 665 END SUBROUTINE histdef2d 652 666 653 667 SUBROUTINE histdef3d (iff,var) 654 668 655 USE ioipsl, only: histdef656 USE dimphy, only: klev657 USE mod_phys_lmdz_para, only: jj_nb658 use phys_output_var_mod, only: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &669 USE ioipsl, ONLY: histdef 670 USE dimphy, ONLY: klev 671 USE mod_phys_lmdz_para, ONLY: jj_nb 672 USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, & 659 673 clef_stations, phys_out_filenames, lev_files, & 660 nid_files, nhorim, swaero_diag, levmin, &674 nid_files, nhorim, swaero_diag, dryaod_diag, levmin, & 661 675 levmax, nvertm 662 676 USE print_control_mod, ONLY: prt_level,lunout 663 677 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 664 678 #ifdef CPP_XIOS 665 use wxios, only: wxios_add_field_to_file679 USE wxios, ONLY: wxios_add_field_to_file 666 680 #endif 667 681 IMPLICIT NONE … … 735 749 !!! Lecture des noms et niveau de sortie des variables dans output.def 736 750 ! en utilisant les routines getin de IOIPSL 737 use ioipsl, only: getin738 use phys_output_var_mod, only: nfiles751 USE ioipsl, ONLY: getin 752 USE phys_output_var_mod, ONLY: nfiles 739 753 USE print_control_mod, ONLY: prt_level,lunout 740 754 IMPLICIT NONE … … 750 764 END SUBROUTINE conf_physoutputs 751 765 752 753 766 754 767 SUBROUTINE histwrite2d_phy_old(nid,lpoint,name,itau,field) 755 USE dimphy, only: klon756 USE mod_phys_lmdz_para, only: Gather_omp, grid1Dto2D_mpi, &768 USE dimphy, ONLY: klon 769 USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, & 757 770 is_sequential, klon_mpi_begin, klon_mpi_end, & 758 771 jj_nb, klon_mpi 759 USE ioipsl, only: histwrite772 USE ioipsl, ONLY: histwrite 760 773 USE print_control_mod, ONLY: prt_level,lunout 761 774 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 762 775 IMPLICIT NONE 763 776 764 integer,INTENT(IN) :: nid765 logical,INTENT(IN) :: lpoint766 character*(*), INTENT(IN) :: name767 integer, INTENT(IN) :: itau777 INTEGER,INTENT(IN) :: nid 778 LOGICAL,INTENT(IN) :: lpoint 779 CHARACTER*(*), INTENT(IN) :: name 780 INTEGER, INTENT(IN) :: itau 768 781 REAL,DIMENSION(:),INTENT(IN) :: field 769 782 REAL,DIMENSION(klon_mpi) :: buffer_omp … … 771 784 REAL :: Field2d(nbp_lon,jj_nb) 772 785 773 integer :: ip 774 REAL,allocatable,DIMENSION(:) :: fieldok 775 786 INTEGER :: ip 787 REAL,ALLOCATABLE,DIMENSION(:) :: fieldok 776 788 777 789 IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1) … … 786 798 CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d) 787 799 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 788 else800 ELSE 789 801 ALLOCATE(fieldok(npstn)) 790 802 ALLOCATE(index2d(npstn)) 791 803 792 if(is_sequential) then804 IF (is_sequential) THEN 793 805 ! klon_mpi_begin=1 794 806 ! klon_mpi_end=klon … … 796 808 fieldok(ip)=buffer_omp(nptabij(ip)) 797 809 ENDDO 798 else810 ELSE 799 811 DO ip=1, npstn 800 812 ! print*,'histwrite2d is_sequential npstn ip name nptabij',npstn,ip,name,nptabij(ip) … … 804 816 ENDIF 805 817 ENDDO 806 endif818 ENDIF 807 819 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 808 820 CALL histwrite(nid,name,itau,fieldok,npstn,index2d) 809 821 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 810 822 ! 811 endif812 deallocate(index2d)813 deallocate(fieldok)823 ENDIF 824 DEALLOCATE(index2d) 825 DEALLOCATE(fieldok) 814 826 !$OMP END MASTER 815 827 816 828 817 endSUBROUTINE histwrite2d_phy_old829 END SUBROUTINE histwrite2d_phy_old 818 830 819 831 SUBROUTINE histwrite3d_phy_old(nid,lpoint,name,itau,field) 820 USE dimphy, only: klon821 USE mod_phys_lmdz_para, only: Gather_omp, grid1Dto2D_mpi, &832 USE dimphy, ONLY: klon 833 USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, & 822 834 is_sequential, klon_mpi_begin, klon_mpi_end, & 823 835 jj_nb, klon_mpi 824 836 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 825 use ioipsl, only: histwrite837 USE ioipsl, ONLY: histwrite 826 838 USE print_control_mod, ONLY: prt_level,lunout 827 839 IMPLICIT NONE 828 840 829 integer,INTENT(IN) :: nid830 logical,INTENT(IN) :: lpoint831 character*(*), INTENT(IN) :: name832 integer, INTENT(IN) :: itau841 INTEGER,INTENT(IN) :: nid 842 LOGICAL,INTENT(IN) :: lpoint 843 CHARACTER*(*), INTENT(IN) :: name 844 INTEGER, INTENT(IN) :: itau 833 845 REAL,DIMENSION(:,:),INTENT(IN) :: field ! --> field(klon,:) 834 846 REAL,DIMENSION(klon_mpi,size(field,2)) :: buffer_omp … … 845 857 !$OMP MASTER 846 858 CALL grid1Dto2D_mpi(buffer_omp,field3d) 847 if(.NOT.lpoint) THEN859 IF (.NOT.lpoint) THEN 848 860 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 849 861 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) … … 851 863 CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d) 852 864 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 853 else865 ELSE 854 866 nlev=size(field,2) 855 867 ALLOCATE(index3d(npstn*nlev)) 856 868 ALLOCATE(fieldok(npstn,nlev)) 857 869 858 if(is_sequential) then870 IF (is_sequential) THEN 859 871 ! klon_mpi_begin=1 860 872 ! klon_mpi_end=klon … … 864 876 ENDDO 865 877 ENDDO 866 else878 ELSE 867 879 DO n=1, nlev 868 880 DO ip=1, npstn … … 873 885 ENDDO 874 886 ENDDO 875 endif887 ENDIF 876 888 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 877 889 CALL histwrite(nid,name,itau,fieldok,npstn*nlev,index3d) 878 890 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 879 endif880 deallocate(index3d)881 deallocate(fieldok)891 ENDIF 892 DEALLOCATE(index3d) 893 DEALLOCATE(fieldok) 882 894 !$OMP END MASTER 883 895 884 endSUBROUTINE histwrite3d_phy_old896 END SUBROUTINE histwrite3d_phy_old 885 897 886 898 … … 889 901 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 890 902 SUBROUTINE histwrite2d_phy(var,field, STD_iff) 891 USE dimphy, only: klon892 USE mod_phys_lmdz_para, only: gather_omp, grid1dto2d_mpi, &903 USE dimphy, ONLY: klon 904 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, & 893 905 jj_nb, klon_mpi, klon_mpi_begin, & 894 906 klon_mpi_end, is_sequential 895 USE ioipsl, only: histwrite896 use phys_output_var_mod, only: ctrl_out, clef_files, lev_files, &907 USE ioipsl, ONLY: histwrite 908 USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, & 897 909 nfiles, vars_defined, clef_stations, & 898 910 nid_files … … 900 912 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 901 913 #ifdef CPP_XIOS 902 USE xios, only: xios_send_field914 USE xios, ONLY: xios_send_field 903 915 #endif 904 916 … … 932 944 iff_beg = 1 933 945 iff_end = nfiles 934 END 946 ENDIF 935 947 936 948 ! On regarde si on est dans la phase de définition ou d'écriture: 937 IF (.NOT.vars_defined) THEN949 IF (.NOT.vars_defined) THEN 938 950 !$OMP MASTER 939 951 !Si phase de définition.... on définit 940 952 IF (.not. ok_all_xml) THEN 941 if (prt_level >= 10) then 942 write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", & 943 trim(var%name) 944 endif 953 IF (prt_level >= 10) THEN 954 WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", trim(var%name) 955 ENDIF 945 956 DO iff=iff_beg, iff_end 946 957 IF (clef_files(iff)) THEN … … 955 966 IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1) 956 967 957 if (prt_level >= 10) then 958 write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", & 959 trim(var%name) 960 endif 968 IF (prt_level >= 10) THEn 969 WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", trim(var%name) 970 ENDIF 961 971 962 972 CALL Gather_omp(field,buffer_omp) … … 969 979 IF (ok_all_xml) THEN 970 980 #ifdef CPP_XIOS 971 if (prt_level >= 10) then 972 write(lunout,*)'Dans iophy histwrite2D,var%name ',& 973 trim(var%name) 974 endif 981 IF (prt_level >= 10) THEN 982 write(lunout,*)'Dans iophy histwrite2D,var%name ', trim(var%name) 983 ENDIF 975 984 CALL xios_send_field(var%name, Field2d) 976 if (prt_level >= 10) then 977 write(lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ',& 978 trim(var%name) 979 endif 985 IF (prt_level >= 10) THEN 986 WRITE (lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ', trim(var%name) 987 ENDIF 980 988 #else 981 989 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) … … 987 995 #ifdef CPP_XIOS 988 996 IF (firstx) THEN 989 if (prt_level >= 10) then 990 write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',& 991 iff,trim(var%name) 992 write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field" 993 endif 997 IF (prt_level >= 10) THEN 998 WRITE (lunout,*)'Dans iophy histwrite2D,iff,var%name ', iff,trim(var%name) 999 WRITE (lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field" 1000 ENDIF 994 1001 CALL xios_send_field(var%name, Field2d) 995 1002 firstx=.false. … … 997 1004 #endif 998 1005 999 IF (.NOT.clef_stations(iff)) THEN1006 IF (.NOT.clef_stations(iff)) THEN 1000 1007 ALLOCATE(index2d(nbp_lon*jj_nb)) 1001 1008 ALLOCATE(fieldok(nbp_lon*jj_nb)) … … 1029 1036 ENDIF ! of IF (is_sequential) 1030 1037 #ifndef CPP_IOIPSL_NO_OUTPUT 1031 if (prt_level >= 10) then1038 IF (prt_level >= 10) THEn 1032 1039 write(lunout,*)"histwrite2d_phy: clef_stations(iff) and iff==iff_beg, call wxios_write_2D" 1033 endif1040 ENDIF 1034 1041 CALL histwrite(nid_files(iff),var%name,itau_iophy,fieldok,npstn,index2d) 1035 1042 #endif 1036 1043 ENDIF ! of IF(.NOT.clef_stations(iff)) 1037 1044 1038 deallocate(index2d)1039 deallocate(fieldok)1045 DEALLOCATE(index2d) 1046 DEALLOCATE(fieldok) 1040 1047 ENDIF !levfiles 1041 1048 ENDDO ! of DO iff=iff_beg, iff_end … … 1049 1056 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 1050 1057 SUBROUTINE histwrite3d_phy(var, field, STD_iff) 1051 USE dimphy, only: klon, klev1052 USE mod_phys_lmdz_para, only: gather_omp, grid1dto2d_mpi, &1058 USE dimphy, ONLY: klon, klev 1059 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, & 1053 1060 jj_nb, klon_mpi, klon_mpi_begin, & 1054 1061 klon_mpi_end, is_sequential 1055 USE ioipsl, only: histwrite1056 use phys_output_var_mod, only: ctrl_out, clef_files, lev_files, &1062 USE ioipsl, ONLY: histwrite 1063 USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, & 1057 1064 nfiles, vars_defined, clef_stations, & 1058 1065 nid_files 1059 1066 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1060 1067 #ifdef CPP_XIOS 1061 USE xios, only: xios_send_field1068 USE xios, ONLY: xios_send_field 1062 1069 #endif 1063 1070 USE print_control_mod, ONLY: prt_level,lunout … … 1088 1095 iff_beg = 1 1089 1096 iff_end = nfiles 1090 END 1097 ENDIF 1091 1098 1092 1099 ! On regarde si on est dans la phase de définition ou d'écriture: … … 1104 1111 IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) 1105 1112 nlev=SIZE(field,2) 1106 if (nlev.eq.klev+1) then1113 IF (nlev.EQ.klev+1) THEN 1107 1114 nlevx=klev 1108 else1115 ELSE 1109 1116 nlevx=nlev 1110 endif1117 ENDIF 1111 1118 1112 1119 CALL Gather_omp(field,buffer_omp) … … 1120 1127 IF (ok_all_xml) THEN 1121 1128 #ifdef CPP_XIOS 1122 if (prt_level >= 10) then1129 IF (prt_level >= 10) THEN 1123 1130 write(lunout,*)'Dans iophy histwrite3D,var%name ',& 1124 1131 trim(var%name) 1125 endif1132 ENDIF 1126 1133 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) 1127 1134 #else … … 1135 1142 #ifdef CPP_XIOS 1136 1143 IF (firstx) THEN 1137 if (prt_level >= 10) then1138 write(lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', &1144 IF (prt_level >= 10) THEn 1145 WRITE (lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', & 1139 1146 iff,nlev,klev, firstx 1140 write(lunout,*)'histwrite3d_phy: call xios_send_field for ', &1147 WRITE (lunout,*)'histwrite3d_phy: call xios_send_field for ', & 1141 1148 trim(var%name), ' with iim jjm nlevx = ', & 1142 1149 nbp_lon,jj_nb,nlevx 1143 endif1150 ENDIF 1144 1151 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) 1145 1152 firstx=.false. … … 1185 1192 #endif 1186 1193 ENDIF 1187 deallocate(index3d)1188 deallocate(fieldok)1194 DEALLOCATE(index3d) 1195 DEALLOCATE(fieldok) 1189 1196 ENDIF 1190 1197 ENDDO … … 1199 1206 #ifdef CPP_XIOS 1200 1207 SUBROUTINE histwrite2d_xios(field_name,field) 1201 USE dimphy, only: klon1202 USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, &1208 USE dimphy, ONLY: klon 1209 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, & 1203 1210 is_sequential, klon_mpi_begin, klon_mpi_end, & 1204 1211 jj_nb, klon_mpi 1205 1212 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1206 USE xios, only: xios_send_field1213 USE xios, ONLY: xios_send_field 1207 1214 USE print_control_mod, ONLY: prt_level,lunout 1208 1215 … … 1259 1266 ENDIF 1260 1267 1261 deallocate(index2d)1262 deallocate(fieldok)1268 DEALLOCATE(index2d) 1269 DEALLOCATE(fieldok) 1263 1270 !$OMP END MASTER 1264 1271 … … 1269 1276 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 1270 1277 SUBROUTINE histwrite3d_xios(field_name, field) 1271 USE dimphy, only: klon, klev1272 USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, &1278 USE dimphy, ONLY: klon, klev 1279 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, & 1273 1280 is_sequential, klon_mpi_begin, klon_mpi_end, & 1274 1281 jj_nb, klon_mpi 1275 USE xios, only: xios_send_field1282 USE xios, ONLY: xios_send_field 1276 1283 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1277 1284 USE print_control_mod, ONLY: prt_level,lunout … … 1330 1337 ENDIF 1331 1338 ENDIF 1332 deallocate(index3d)1333 deallocate(fieldok)1339 DEALLOCATE(index3d) 1340 DEALLOCATE(fieldok) 1334 1341 !$OMP END MASTER 1335 1342 … … 1339 1346 #ifdef CPP_XIOS 1340 1347 SUBROUTINE histwrite0d_xios(field_name, field) 1341 USE xios, only: xios_send_field1348 USE xios, ONLY: xios_send_field 1342 1349 IMPLICIT NONE 1343 1350 -
LMDZ5/branches/testing/libf/phylmd/pbl_surface_mod.F90
r2720 r2870 6 6 ! Planetary Boundary Layer and Surface module 7 7 ! 8 ! This module manage the calculation of turbulent diffusion in the boundary layer8 ! This module manages the calculation of turbulent diffusion in the boundary layer 9 9 ! and all interactions towards the differents sub-surfaces. 10 10 ! … … 778 778 IF (prt_level >=10) print *,' -> pbl_surface, itap ',itap 779 779 ! 780 iflag_split = mod(iflag_pbl_split,2) 780 !!jyg iflag_split = mod(iflag_pbl_split,2) 781 iflag_split = mod(iflag_pbl_split,10) 781 782 782 783 !**************************************************************************************** … … 1239 1240 ENDDO 1240 1241 ! 1241 IF (iflag_split . eq.1) THEN1242 IF (iflag_split .ge.1) THEN 1242 1243 !!! nrlmd le 02/05/2011 1243 1244 DO k = 1, klev … … 1287 1288 ENDDO 1288 1289 !!! 1289 ENDIF ! (iflag_split . eq.1)1290 ENDIF ! (iflag_split .ge.1) 1290 1291 !!! 1291 1292 DO k = 1, nsoilmx … … 2047 2048 print*,'effusivity,facteur,cstar', effusivity, facteur,wake_cstar(j) 2048 2049 ENDDO 2049 ENDIF 2050 ENDIF ! (prt_level >=10) 2050 2051 2051 2052 !!! jyg le 07/02/2012 … … 2282 2283 2283 2284 !!! jyg le 07/02/2012 2284 IF (iflag_split . eq.1) THEN2285 IF (iflag_split .ge.1) THEN 2285 2286 !!! 2286 2287 !!! nrlmd le 02/05/2011 … … 2302 2303 END DO 2303 2304 !!! 2304 ENDIF ! (iflag_split . eq.1)2305 ENDIF ! (iflag_split .ge.1) 2305 2306 !!! 2306 2307 !!! nrlmd le 02/05/2011 … … 2337 2338 END DO 2338 2339 2339 ELSE 2340 ELSE ! (iflag_split .eq.0) 2340 2341 DO k = 1, klev 2341 2342 DO j = 1, knon … … 2384 2385 2385 2386 !!! jyg le 07/02/2012 2386 IF (iflag_split . eq.1) THEN2387 IF (iflag_split .ge.1) THEN 2387 2388 !!! 2388 2389 !!! nrlmd+jyg le 02/05/2011 et le 20/02/2012 … … 2407 2408 END DO 2408 2409 !!! 2409 ENDIF ! (iflag_split . eq.1)2410 ENDIF ! (iflag_split .ge.1) 2410 2411 !!! 2411 2412 … … 2752 2753 2753 2754 !!! jyg le 07/02/2012 2754 IF (iflag_split . eq.1) THEN2755 IF (iflag_split .ge.1) THEN 2755 2756 !!! 2756 2757 !!! nrlmd & jyg les 02/05/2011, 05/02/2012 … … 2777 2778 END DO 2778 2779 !!! 2779 ENDIF ! (iflag_split . eq.1)2780 ENDIF ! (iflag_split .ge.1) 2780 2781 !!! 2781 2782 -
LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90
r2845 r2870 141 141 REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:) 142 142 !$OMP THREADPRIVATE(tausum_aero) 143 REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:) 144 !$OMP THREADPRIVATE(drytausum_aero) 143 145 REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:) 144 146 !$OMP THREADPRIVATE(tau3d_aero) … … 167 169 REAL, SAVE, ALLOCATABLE :: od550aer(:) 168 170 !$OMP THREADPRIVATE(od550aer) 171 REAL, SAVE, ALLOCATABLE :: dryod550aer(:) 172 !$OMP THREADPRIVATE(dryod550aer) 169 173 REAL, SAVE, ALLOCATABLE :: abs550aer(:) 170 174 !$OMP THREADPRIVATE(abs550aer) … … 251 255 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_wake, alp_wake 252 256 !$OMP THREADPRIVATE(ale_wake, alp_wake) 253 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h,wake_k 257 !!jyg! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h,wake_k 258 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h 259 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_k 254 260 !$OMP THREADPRIVATE(wake_h,wake_k) 255 261 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wake_omg … … 498 504 499 505 IMPLICIT NONE 500 allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))501 allocate(u_seri(klon,klev),v_seri(klon,klev))502 allocate(l_mixmin(klon,klev,nbsrf), l_mix(klon,klev,nbsrf))506 ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev)) 507 ALLOCATE(u_seri(klon,klev),v_seri(klon,klev)) 508 ALLOCATE(l_mixmin(klon,klev,nbsrf), l_mix(klon,klev,nbsrf)) 503 509 l_mix(:,:,:)=0. ; l_mixmin(:,:,:)=0. ! doit etre initialse car pas toujours remplis 504 510 505 allocate(tr_seri(klon,klev,nbtr))506 allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))507 allocate(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev))508 allocate(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon))509 allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))510 allocate(d_tr_dyn(klon,klev,nbtr)) !RomP511 allocate(d_t_con(klon,klev),d_q_con(klon,klev))512 allocate(d_u_con(klon,klev),d_v_con(klon,klev))513 allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))514 allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))515 allocate(d_t_lwr(klon,klev),d_t_lw0(klon,klev))516 allocate(d_t_swr(klon,klev),d_t_sw0(klon,klev))517 allocate(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))518 allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))519 allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))511 ALLOCATE(tr_seri(klon,klev,nbtr)) 512 ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev)) 513 ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev)) 514 ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon)) 515 ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev)) 516 ALLOCATE(d_tr_dyn(klon,klev,nbtr)) !RomP 517 ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev)) 518 ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev)) 519 ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev)) 520 ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev)) 521 ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev)) 522 ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev)) 523 ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev)) 524 ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev)) 525 ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev)) 520 526 !nrlmd< 521 allocate(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))522 allocate(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))527 ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev)) 528 ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev)) 523 529 !>nrlmd 524 allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))525 allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))526 allocate(d_ql_eva(klon,klev),d_qi_eva(klon,klev))527 allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))528 allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))529 allocate(plul_st(klon),plul_th(klon))530 allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))530 ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev)) 531 ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev)) 532 ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev)) 533 ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev)) 534 ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev)) 535 ALLOCATE(plul_st(klon),plul_th(klon)) 536 ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev)) 531 537 !nrlmd+jyg< 532 allocate(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))533 allocate(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))538 ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev)) 539 ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev)) 534 540 !>nrlmd+jyg 535 allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))536 allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))537 allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))538 allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))539 allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))540 allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))541 allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))541 ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev)) 542 ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev)) 543 ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev)) 544 ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev)) 545 ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev)) 546 ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev)) 547 ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr)) 542 548 ! Special RRTM 543 allocate(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1)) 544 allocate(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1)) 545 ! 546 allocate(topswad_aero(klon), solswad_aero(klon)) 547 allocate(topswai_aero(klon), solswai_aero(klon)) 548 allocate(topswad0_aero(klon), solswad0_aero(klon)) 549 ! LW diagnostics CK 550 allocate(toplwad_aero(klon), sollwad_aero(klon)) 551 allocate(toplwai_aero(klon), sollwai_aero(klon)) 552 allocate(toplwad0_aero(klon), sollwad0_aero(klon)) 553 ! end 554 allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp)) 555 allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp)) 556 allocate(topswcf_aero(klon,3), solswcf_aero(klon,3)) 557 allocate(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev)) 558 allocate(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev)) 559 allocate(east_gwstress(klon,klev),west_gwstress(klon,klev)) 560 allocate(d_t_hin(klon,klev)) 561 allocate(d_q_ch4(klon,klev)) 562 ! allocate(tausum_aero(klon,nwave,naero_spc)) 563 ! allocate(tau3d_aero(klon,klev,nwave,naero_spc)) 564 allocate(stratomask(klon,klev)) 565 !--correction mini bug OB 566 allocate(tausum_aero(klon,nwave,naero_tot)) 567 allocate(tau3d_aero(klon,klev,nwave,naero_tot)) 568 allocate(scdnc(klon, klev)) 569 allocate(cldncl(klon)) 570 allocate(reffclwtop(klon)) 571 allocate(lcc(klon)) 572 allocate(reffclws(klon, klev)) 573 allocate(reffclwc(klon, klev)) 574 allocate(cldnvi(klon)) 575 allocate(lcc3d(klon, klev)) 576 allocate(lcc3dcon(klon, klev)) 577 allocate(lcc3dstra(klon, klev)) 578 allocate(od443aer(klon)) 579 allocate(od550aer(klon)) 580 allocate(od865aer(klon)) 581 allocate(abs550aer(klon)) 582 allocate(ec550aer(klon,klev)) 583 allocate(od550lt1aer(klon)) 584 allocate(sconcso4(klon)) 585 allocate(sconcno3(klon)) 586 allocate(sconcoa(klon)) 587 allocate(sconcbc(klon)) 588 allocate(sconcss(klon)) 589 allocate(sconcdust(klon)) 590 allocate(concso4(klon,klev)) 591 allocate(concno3(klon,klev)) 592 allocate(concoa(klon,klev)) 593 allocate(concbc(klon,klev)) 594 allocate(concss(klon,klev)) 595 allocate(concdust(klon,klev)) 596 allocate(loadso4(klon)) 597 allocate(loadoa(klon)) 598 allocate(loadbc(klon)) 599 allocate(loadss(klon)) 600 allocate(loaddust(klon)) 601 allocate(loadno3(klon)) 602 allocate(load_tmp1(klon)) 603 allocate(load_tmp2(klon)) 604 allocate(load_tmp3(klon)) 549 ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1)) 550 ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1)) 551 ! 552 ALLOCATE(topswad_aero(klon), solswad_aero(klon)) 553 ALLOCATE(topswai_aero(klon), solswai_aero(klon)) 554 ALLOCATE(topswad0_aero(klon), solswad0_aero(klon)) 555 ALLOCATE(toplwad_aero(klon), sollwad_aero(klon)) 556 ALLOCATE(toplwai_aero(klon), sollwai_aero(klon)) 557 ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon)) 558 ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp)) 559 ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp)) 560 ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3)) 561 ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev)) 562 ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev)) 563 ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev)) 564 ALLOCATE(d_t_hin(klon,klev)) 565 ALLOCATE(d_q_ch4(klon,klev)) 566 ALLOCATE(stratomask(klon,klev)) 567 ALLOCATE(tausum_aero(klon,nwave,naero_tot)) 568 ALLOCATE(drytausum_aero(klon,naero_tot)) 569 ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot)) 570 ALLOCATE(scdnc(klon, klev)) 571 ALLOCATE(cldncl(klon)) 572 ALLOCATE(reffclwtop(klon)) 573 ALLOCATE(lcc(klon)) 574 ALLOCATE(reffclws(klon, klev)) 575 ALLOCATE(reffclwc(klon, klev)) 576 ALLOCATE(cldnvi(klon)) 577 ALLOCATE(lcc3d(klon, klev)) 578 ALLOCATE(lcc3dcon(klon, klev)) 579 ALLOCATE(lcc3dstra(klon, klev)) 580 ALLOCATE(od443aer(klon)) 581 ALLOCATE(od550aer(klon)) 582 ALLOCATE(od865aer(klon)) 583 ALLOCATE(dryod550aer(klon)) 584 ALLOCATE(abs550aer(klon)) 585 ALLOCATE(ec550aer(klon,klev)) 586 ALLOCATE(od550lt1aer(klon)) 587 ALLOCATE(sconcso4(klon)) 588 ALLOCATE(sconcno3(klon)) 589 ALLOCATE(sconcoa(klon)) 590 ALLOCATE(sconcbc(klon)) 591 ALLOCATE(sconcss(klon)) 592 ALLOCATE(sconcdust(klon)) 593 ALLOCATE(concso4(klon,klev)) 594 ALLOCATE(concno3(klon,klev)) 595 ALLOCATE(concoa(klon,klev)) 596 ALLOCATE(concbc(klon,klev)) 597 ALLOCATE(concss(klon,klev)) 598 ALLOCATE(concdust(klon,klev)) 599 ALLOCATE(loadso4(klon)) 600 ALLOCATE(loadoa(klon)) 601 ALLOCATE(loadbc(klon)) 602 ALLOCATE(loadss(klon)) 603 ALLOCATE(loaddust(klon)) 604 ALLOCATE(loadno3(klon)) 605 ALLOCATE(load_tmp1(klon)) 606 ALLOCATE(load_tmp2(klon)) 607 ALLOCATE(load_tmp3(klon)) 605 608 606 609 !IM ajout variables CFMIP2/CMIP5 … … 770 773 USE indice_sol_mod 771 774 IMPLICIT NONE 772 deallocate(t_seri,q_seri,ql_seri,qs_seri)773 deallocate(u_seri,v_seri)774 deallocate(l_mixmin,l_mix)775 776 deallocate(tr_seri)777 deallocate(d_t_dyn,d_q_dyn)778 deallocate(d_ql_dyn,d_qs_dyn)779 deallocate(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d)780 deallocate(d_u_dyn,d_v_dyn)781 deallocate(d_tr_dyn) !RomP782 deallocate(d_t_con,d_q_con)783 deallocate(d_u_con,d_v_con)784 deallocate(d_t_wake,d_q_wake)785 deallocate(d_t_lsc,d_q_lsc)786 deallocate(d_t_lwr,d_t_lw0)787 deallocate(d_t_swr,d_t_sw0)788 deallocate(d_ql_lsc,d_qi_lsc)789 deallocate(d_t_ajsb,d_q_ajsb)790 deallocate(d_t_ajs,d_q_ajs)775 DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri) 776 DEALLOCATE(u_seri,v_seri) 777 DEALLOCATE(l_mixmin,l_mix) 778 779 DEALLOCATE(tr_seri) 780 DEALLOCATE(d_t_dyn,d_q_dyn) 781 DEALLOCATE(d_ql_dyn,d_qs_dyn) 782 DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d) 783 DEALLOCATE(d_u_dyn,d_v_dyn) 784 DEALLOCATE(d_tr_dyn) !RomP 785 DEALLOCATE(d_t_con,d_q_con) 786 DEALLOCATE(d_u_con,d_v_con) 787 DEALLOCATE(d_t_wake,d_q_wake) 788 DEALLOCATE(d_t_lsc,d_q_lsc) 789 DEALLOCATE(d_t_lwr,d_t_lw0) 790 DEALLOCATE(d_t_swr,d_t_sw0) 791 DEALLOCATE(d_ql_lsc,d_qi_lsc) 792 DEALLOCATE(d_t_ajsb,d_q_ajsb) 793 DEALLOCATE(d_t_ajs,d_q_ajs) 791 794 !nrlmd< 792 deallocate(d_t_ajs_w,d_q_ajs_w)793 deallocate(d_t_ajs_x,d_q_ajs_x)795 DEALLOCATE(d_t_ajs_w,d_q_ajs_w) 796 DEALLOCATE(d_t_ajs_x,d_q_ajs_x) 794 797 !>nrlmd 795 deallocate(d_u_ajs,d_v_ajs)796 deallocate(d_t_eva,d_q_eva)797 deallocate(d_ql_eva,d_qi_eva)798 deallocate(d_t_lscst,d_q_lscst)799 deallocate(d_t_lscth,d_q_lscth)800 deallocate(plul_st,plul_th)801 deallocate(d_t_vdf,d_q_vdf,d_t_diss)798 DEALLOCATE(d_u_ajs,d_v_ajs) 799 DEALLOCATE(d_t_eva,d_q_eva) 800 DEALLOCATE(d_ql_eva,d_qi_eva) 801 DEALLOCATE(d_t_lscst,d_q_lscst) 802 DEALLOCATE(d_t_lscth,d_q_lscth) 803 DEALLOCATE(plul_st,plul_th) 804 DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss) 802 805 !nrlmd+jyg< 803 deallocate(d_t_vdf_w,d_q_vdf_w)804 deallocate(d_t_vdf_x,d_q_vdf_x)806 DEALLOCATE(d_t_vdf_w,d_q_vdf_w) 807 DEALLOCATE(d_t_vdf_x,d_q_vdf_x) 805 808 !>nrlmd+jyg 806 deallocate(d_u_vdf,d_v_vdf)807 deallocate(d_t_oli,d_t_oro)808 deallocate(d_u_oli,d_v_oli)809 deallocate(d_u_oro,d_v_oro)810 deallocate(d_t_lif,d_t_ec)811 deallocate(d_u_lif,d_v_lif)812 deallocate(d_ts, d_tr)813 deallocate(topswad_aero,solswad_aero)814 deallocate(topswai_aero,solswai_aero)815 deallocate(topswad0_aero,solswad0_aero)816 ! LW additional CK817 deallocate(toplwad_aero,sollwad_aero)818 deallocate(toplwai_aero,sollwai_aero)819 deallocate(toplwad0_aero,sollwad0_aero)820 ! end821 deallocate(topsw_aero,solsw_aero)822 deallocate(topsw0_aero,solsw0_aero)823 deallocate(topswcf_aero,solswcf_aero)824 deallocate(stratomask)825 deallocate(tausum_aero)826 deallocate(tau3d_aero)827 deallocate(scdnc)828 deallocate(cldncl)829 deallocate(reffclwtop)830 deallocate(lcc)831 deallocate(reffclws)832 deallocate(reffclwc)833 deallocate(cldnvi)834 deallocate(lcc3d)835 deallocate(lcc3dcon)836 deallocate(lcc3dstra)837 deallocate(od443aer)838 deallocate(od550aer)839 deallocate(od865aer)840 deallocate(abs550aer)841 deallocate(ec550aer)842 deallocate(od550lt1aer)843 deallocate(sconcso4)844 deallocate(sconcno3)845 deallocate(sconcoa)846 deallocate(sconcbc)847 deallocate(sconcss)848 deallocate(sconcdust)849 deallocate(concso4)850 deallocate(concno3)851 deallocate(concoa)852 deallocate(concbc)853 deallocate(concss)854 deallocate(concdust)855 deallocate(loadso4)856 deallocate(loadoa)857 deallocate(loadbc)858 deallocate(loadss)859 deallocate(loaddust)860 deallocate(loadno3)861 deallocate(load_tmp1)862 deallocate(load_tmp2)863 deallocate(load_tmp3)864 deallocate(du_gwd_hines,dv_gwd_hines,d_t_hin)865 deallocate(d_q_ch4)866 deallocate(dv_gwd_rando,dv_gwd_front)867 deallocate(east_gwstress,west_gwstress)809 DEALLOCATE(d_u_vdf,d_v_vdf) 810 DEALLOCATE(d_t_oli,d_t_oro) 811 DEALLOCATE(d_u_oli,d_v_oli) 812 DEALLOCATE(d_u_oro,d_v_oro) 813 DEALLOCATE(d_t_lif,d_t_ec) 814 DEALLOCATE(d_u_lif,d_v_lif) 815 DEALLOCATE(d_ts, d_tr) 816 DEALLOCATE(topswad_aero,solswad_aero) 817 DEALLOCATE(topswai_aero,solswai_aero) 818 DEALLOCATE(topswad0_aero,solswad0_aero) 819 DEALLOCATE(toplwad_aero,sollwad_aero) 820 DEALLOCATE(toplwai_aero,sollwai_aero) 821 DEALLOCATE(toplwad0_aero,sollwad0_aero) 822 DEALLOCATE(topsw_aero,solsw_aero) 823 DEALLOCATE(topsw0_aero,solsw0_aero) 824 DEALLOCATE(topswcf_aero,solswcf_aero) 825 DEALLOCATE(stratomask) 826 DEALLOCATE(tausum_aero) 827 DEALLOCATE(drytausum_aero) 828 DEALLOCATE(tau3d_aero) 829 DEALLOCATE(scdnc) 830 DEALLOCATE(cldncl) 831 DEALLOCATE(reffclwtop) 832 DEALLOCATE(lcc) 833 DEALLOCATE(reffclws) 834 DEALLOCATE(reffclwc) 835 DEALLOCATE(cldnvi) 836 DEALLOCATE(lcc3d) 837 DEALLOCATE(lcc3dcon) 838 DEALLOCATE(lcc3dstra) 839 DEALLOCATE(od443aer) 840 DEALLOCATE(od550aer) 841 DEALLOCATE(od865aer) 842 DEALLOCATE(dryod550aer) 843 DEALLOCATE(abs550aer) 844 DEALLOCATE(ec550aer) 845 DEALLOCATE(od550lt1aer) 846 DEALLOCATE(sconcso4) 847 DEALLOCATE(sconcno3) 848 DEALLOCATE(sconcoa) 849 DEALLOCATE(sconcbc) 850 DEALLOCATE(sconcss) 851 DEALLOCATE(sconcdust) 852 DEALLOCATE(concso4) 853 DEALLOCATE(concno3) 854 DEALLOCATE(concoa) 855 DEALLOCATE(concbc) 856 DEALLOCATE(concss) 857 DEALLOCATE(concdust) 858 DEALLOCATE(loadso4) 859 DEALLOCATE(loadoa) 860 DEALLOCATE(loadbc) 861 DEALLOCATE(loadss) 862 DEALLOCATE(loaddust) 863 DEALLOCATE(loadno3) 864 DEALLOCATE(load_tmp1) 865 DEALLOCATE(load_tmp2) 866 DEALLOCATE(load_tmp3) 867 DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin) 868 DEALLOCATE(d_q_ch4) 869 DEALLOCATE(dv_gwd_rando,dv_gwd_front) 870 DEALLOCATE(east_gwstress,west_gwstress) 868 871 869 872 !IM ajout variables CFMIP2/CMIP5 870 deallocate(topswad_aerop, solswad_aerop)871 deallocate(topswai_aerop, solswai_aerop)872 deallocate(topswad0_aerop, solswad0_aerop)873 deallocate(topsw_aerop, topsw0_aerop)874 deallocate(solsw_aerop, solsw0_aerop)875 deallocate(topswcf_aerop, solswcf_aerop)873 DEALLOCATE(topswad_aerop, solswad_aerop) 874 DEALLOCATE(topswai_aerop, solswai_aerop) 875 DEALLOCATE(topswad0_aerop, solswad0_aerop) 876 DEALLOCATE(topsw_aerop, topsw0_aerop) 877 DEALLOCATE(solsw_aerop, solsw0_aerop) 878 DEALLOCATE(topswcf_aerop, solswcf_aerop) 876 879 877 880 !CK LW diagnostics 878 deallocate(toplwad_aerop, sollwad_aerop)879 deallocate(toplwai_aerop, sollwai_aerop)880 deallocate(toplwad0_aerop, sollwad0_aerop)881 DEALLOCATE(toplwad_aerop, sollwad_aerop) 882 DEALLOCATE(toplwai_aerop, sollwai_aerop) 883 DEALLOCATE(toplwad0_aerop, sollwad0_aerop) 881 884 882 885 ! FH Ajout de celles nécessaires au phys_output_write_mod -
LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90
r2845 r2870 1060 1060 'sollwai', 'LW-AIE at SFR', 'W/m2', (/ ('', i=1, 10) /)) 1061 1061 1062 1063 1062 TYPE(ctrl_out),SAVE,DIMENSION(naero_tot) :: o_tausumaero = & 1064 (/ ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(1), &1063 (/ ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(1), & 1065 1064 "Aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 10) /)), & 1066 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(2), &1065 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(2), & 1067 1066 "Aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 10) /)), & 1068 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(3), &1067 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(3), & 1069 1068 "Aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 10) /)), & 1070 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(4), &1069 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(4), & 1071 1070 "Aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 10) /)), & 1072 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(5), &1071 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(5), & 1073 1072 "Aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 10) /)), & 1074 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(6), &1073 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(6), & 1075 1074 "Aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 10) /)), & 1076 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(7), &1075 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(7), & 1077 1076 "Aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 10) /)), & 1078 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(8), &1077 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(8), & 1079 1078 "Aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 10) /)), & 1080 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(9), &1079 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(9), & 1081 1080 "Aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 10) /)), & 1082 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(10), &1081 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(10), & 1083 1082 "Aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 10) /)), & 1084 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(11), &1083 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(11), & 1085 1084 "Aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 10) /)), & 1086 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(12), &1085 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(12), & 1087 1086 "Aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 10) /)), & 1088 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(13), &1087 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(13), & 1089 1088 "Aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 10) /)), & 1090 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),' OD550_'//name_aero_tau(14), &1089 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(14), & 1091 1090 "Aerosol Optical depth at 550 nm "//name_aero_tau(14),"14", (/ ('', i=1, 10) /)) /) 1091 1092 TYPE(ctrl_out),SAVE,DIMENSION(naero_tot-1) :: o_drytausumaero = & 1093 (/ ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(1), & 1094 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 10) /)), & 1095 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(2), & 1096 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 10) /)), & 1097 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(3), & 1098 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 10) /)), & 1099 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(4), & 1100 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 10) /)), & 1101 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(5), & 1102 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 10) /)), & 1103 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(6), & 1104 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 10) /)), & 1105 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(7), & 1106 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 10) /)), & 1107 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(8), & 1108 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 10) /)), & 1109 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(9), & 1110 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 10) /)), & 1111 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(10), & 1112 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 10) /)), & 1113 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(11), & 1114 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 10) /)), & 1115 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(12), & 1116 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 10) /)), & 1117 ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(13), & 1118 "Dry aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 10) /)) /) 1092 1119 ! 1093 1120 TYPE(ctrl_out), SAVE :: o_tausumaero_lw = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 1094 ' OD_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 10) /))1121 'od_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 10) /)) 1095 1122 ! 1096 1123 TYPE(ctrl_out), SAVE :: o_od443aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & … … 1098 1125 TYPE(ctrl_out), SAVE :: o_od550aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 1099 1126 'od550aer', 'Total aerosol optical depth at 550nm', '-', (/ ('', i=1, 10) /)) 1127 TYPE(ctrl_out), SAVE :: o_dryod550aer = ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1128 'dryod550aer', 'Total dry aerosol optical depth at 550nm', '-', (/ ('', i=1, 10) /)) 1100 1129 TYPE(ctrl_out), SAVE :: o_od865aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 1101 1130 'od865aer', 'Total aerosol optical depth at 870nm', '-', (/ ('', i=1, 10) /)) … … 1140 1169 TYPE(ctrl_out), SAVE :: o_loadno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 1141 1170 'loadno3', 'Column Load of Nitrate ', 'kg/m2', (/ ('', i=1, 10) /)) 1142 TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1171 TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 11, 11, 1, 11, 11, 11, 11, 11, 11, 11/), & 1143 1172 'swtoaas_nat', 'Natural aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1144 TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1173 TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1145 1174 'swsrfas_nat', 'Natural aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1146 TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1175 TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1147 1176 'swtoacs_nat', 'Natural aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1148 TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1177 TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1149 1178 'swsrfcs_nat', 'Natural aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1150 TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1179 TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1151 1180 'swtoaas_ant', 'Anthropogenic aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1152 TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1181 TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1153 1182 'swsrfas_ant', 'Anthropogenic aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1154 TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1183 TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1155 1184 'swtoacs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1156 TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1185 TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1157 1186 'swsrfcs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1158 TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1187 TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1159 1188 'swtoacf_nat', 'Natural aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1160 TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1189 TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1161 1190 'swsrfcf_nat', 'Natural aerosol impact on cloud radiative forcing at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1162 TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1191 TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1163 1192 'swtoacf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1164 TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1193 TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1165 1194 'swsrfcf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1166 TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1195 TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1167 1196 'swtoacf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at TOA', 'W/m2', (/ ('', i=1, 10) /)) 1168 TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &1197 TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1169 1198 'swsrfcf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at SRF', 'W/m2', (/ ('', i=1, 10) /)) 1170 1199 TYPE(ctrl_out), SAVE :: o_cldncl = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & … … 1185 1214 !--strat aerosol optical depth 1186 1215 TYPE(ctrl_out), SAVE :: o_tau_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & 1187 ' OD550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 10) /))1216 'od550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 10) /)) 1188 1217 TYPE(ctrl_out), SAVE :: o_tau_strat_1020 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & 1189 1218 'OD1020_strat_only', 'Stratospheric Aerosol Optical depth at 1020 nm ', '1', (/ ('', i=1, 10) /)) -
LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90
r2839 r2870 519 519 IF (prt_level >= 10) THEN 520 520 WRITE(lunout,*)'swaero_diag=',swaero_diag 521 WRITE(lunout,*)'dryaod_diag=',dryaod_diag 521 522 WRITE(lunout,*)'phys_output_open: ends here' 522 523 ENDIF -
LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90
r2839 r2870 4 4 MODULE phys_output_var_mod 5 5 6 usedimphy6 USE dimphy 7 7 ! Variables outputs pour les ecritures des sorties 8 8 !====================================================================== … … 79 79 80 80 ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics 81 ! dryaod_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics 81 82 !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call 82 83 !-- and corrected back to TRUE based on output requests 83 84 LOGICAL, SAVE :: swaero_diag=.TRUE. 84 !$OMP THREADPRIVATE(swaero_diag) 85 LOGICAL, SAVE :: dryaod_diag=.TRUE. 86 !$OMP THREADPRIVATE(swaero_diag, dryaod_diag) 85 87 86 88 INTEGER, SAVE:: levmin(nfiles) = 1 … … 165 167 !====================================================================== 166 168 SUBROUTINE phys_output_var_end 167 usedimphy169 USE dimphy 168 170 IMPLICIT NONE 169 171 -
LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90
r2845 r2870 100 100 o_solldown, o_dtsvdfo, o_dtsvdft, & 101 101 o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od443aer, o_od550aer, & 102 o_ od865aer, o_abs550aer, o_od550lt1aer, &102 o_dryod550aer, o_od865aer, o_abs550aer, o_od550lt1aer, & 103 103 o_sconcso4, o_sconcno3, o_sconcoa, o_sconcbc, & 104 104 o_sconcss, o_sconcdust, o_concso4, o_concno3, & 105 105 o_concoa, o_concbc, o_concss, o_concdust, & 106 106 o_loadso4, o_loadoa, o_loadbc, o_loadss, & 107 o_loaddust, o_loadno3, o_tausumaero, o_tausumaero_lw, & 107 o_loaddust, o_loadno3, o_tausumaero, & 108 o_drytausumaero, o_tausumaero_lw, & 108 109 o_topswad, o_topswad0, o_solswad, o_solswad0, & 109 110 o_toplwad, o_toplwad0, o_sollwad, o_sollwad0, & … … 252 253 weak_inversion, dthmin, cldtau, cldemi, & 253 254 pmflxr, pmflxs, prfl, psfl, re, fl, rh2m, & 254 qsat2m, tpote, tpot, d_ts, od443aer, od550aer, &255 qsat2m, tpote, tpot, d_ts, od443aer, od550aer, dryod550aer, & 255 256 od865aer, abs550aer, od550lt1aer, sconcso4, sconcno3, & 256 257 sconcoa, sconcbc, sconcss, sconcdust, concso4, concno3, & 257 258 concoa, concbc, concss, concdust, loadso4, & 258 loadoa, loadbc, loadss, loaddust, loadno3, tausum_aero, &259 loadoa, loadbc, loadss, loaddust, loadno3, tausum_aero, drytausum_aero, & 259 260 topswad_aero, topswad0_aero, solswad_aero, & 260 261 solswad0_aero, topsw_aero, solsw_aero, & … … 301 302 USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, & 302 303 bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, & 303 itau_con, nfiles, clef_files, nid_files, &304 itau_con, nfiles, clef_files, nid_files, dryaod_diag, & 304 305 zustr_gwd_hines, zvstr_gwd_hines,zustr_gwd_rando, zvstr_gwd_rando, & 305 306 zustr_gwd_front, zvstr_gwd_front, & … … 1164 1165 CALL histwrite_phy(o_z0m, z0m(:,nbsrf+1)) 1165 1166 CALL histwrite_phy(o_z0h, z0h(:,nbsrf+1)) 1166 ! OD550 per species1167 ! od550 per species 1167 1168 !--OLIVIER 1168 1169 !This is warranted by treating INCA aerosols as offline aerosols … … 1193 1194 CALL histwrite_phy(o_loaddust, loaddust) 1194 1195 CALL histwrite_phy(o_loadno3, loadno3) 1195 !--STRAT AER 1196 ENDIF 1196 CALL histwrite_phy(o_dryod550aer, dryod550aer) 1197 DO naero = 1, naero_tot-1 1198 CALL histwrite_phy(o_drytausumaero(naero),drytausum_aero(:,naero)) 1199 END DO 1200 ENDIF 1201 !--STRAT AER 1197 1202 IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN 1198 1203 DO naero = 1, naero_tot -
LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90
r2839 r2870 92 92 topswcf_aero,solswcf_aero, & 93 93 tausum_aero,tau3d_aero, & 94 drytausum_aero, & 94 95 ! 95 96 !variables CFMIP2/CMIP5 … … 971 972 ! pre-industrial (pi) aerosols 972 973 973 974 INTEGER :: naero 974 975 ! Aerosol optical properties 975 976 CHARACTER*4, DIMENSION(naero_grp) :: rfname … … 1580 1581 !!! xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & 1581 1582 swaero_diag=.TRUE. 1583 1584 !--setting up dryaod_diag to TRUE in XIOS case 1585 DO naero = 1, naero_tot-1 1586 IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. 1587 ENDDO 1582 1588 #endif 1583 1589 … … 2137 2143 2138 2144 !jyg+nrlmd< 2139 IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN 2145 !!jyg IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN 2146 IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,10) .ge. 1) THEN 2140 2147 print *,'debut du splitting de la PBL' 2141 2148 ENDIF … … 2217 2224 ! 2218 2225 ! Add turbulent diffusion tendency to the wake difference variables 2219 IF (mod(iflag_pbl_split,2) .NE. 0) THEN 2226 !!jyg IF (mod(iflag_pbl_split,2) .NE. 0) THEN 2227 IF (mod(iflag_pbl_split,10) .NE. 0) THEN 2220 2228 !jyg< 2221 2229 d_deltat_vdf(:,:) = d_t_vdf_w(:,:)-d_t_vdf_x(:,:) … … 2829 2837 IF (iflag_thermals>=1) THEN 2830 2838 !jyg< 2831 IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN 2839 !! IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN 2840 IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN 2832 2841 ! Appel des thermiques avec les profils exterieurs aux poches 2833 2842 DO k=1,klev … … 2874 2883 ! 2875 2884 !jyg< 2876 IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN 2885 !!jyg IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN 2886 IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN 2877 2887 ! Si les thermiques ne sont presents que hors des 2878 2888 ! poches, la tendance moyenne associ\'ee doit etre … … 2896 2906 call prt_enerbil('the',itap) 2897 2907 ! 2898 ENDIF ! (mod(iflag_pbl_split/ 2,2) .EQ. 1)2908 ENDIF ! (mod(iflag_pbl_split/10,10) .GE. 1) 2899 2909 ! 2900 2910 CALL add_phys_tend(d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs, & … … 3367 3377 tr_seri, mass_solu_aero, mass_solu_aero_pi, & 3368 3378 tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & 3369 tausum_aero, tau3d_aero)3379 tausum_aero, drytausum_aero, tau3d_aero) 3370 3380 #endif 3371 3381 ! … … 3407 3417 ELSE !--flag_aerosol = 0 3408 3418 tausum_aero(:,:,:) = 0. 3419 drytausum_aero(:,:) = 0. 3409 3420 mass_solu_aero(:,:) = 0. 3410 3421 mass_solu_aero_pi(:,:) = 0. … … 3674 3685 #ifndef CPP_XIOS 3675 3686 !--OB 30/05/2016 modified 21/10/2016 3676 !--here we return swaero_diag to FALSE3687 !--here we return swaero_diag and dryaod_diag to FALSE 3677 3688 !--and histdef will switch it back to TRUE if necessary 3678 3689 !--this is necessary to get the right swaero at first step 3679 3690 !--but only in the case of no XIOS as XIOS is covered elsewhere 3680 3691 IF (debut) swaero_diag = .FALSE. 3692 IF (debut) dryaod_diag = .FALSE. 3681 3693 #endif 3682 3694 ! … … 4185 4197 d_t_ec(:,:)=0. 4186 4198 forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA 4187 CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap), &4188 u_seri,v_seri,t_seri,q_seri, pbl_tke(:,:,is_ave)-tke0(:,:), &4199 CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap),qx(:,:,iliq),qx(:,:,isol), & 4200 u_seri,v_seri,t_seri,q_seri,ql_seri,qs_seri,pbl_tke(:,:,is_ave)-tke0(:,:), & 4189 4201 zmasse,exner,d_t_ec) 4190 4202 t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:) -
LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90
r2845 r2870 8 8 flag_bc_internal_mixture, & 9 9 pplay, t_seri, & 10 tausum, tau )10 tausum, drytausum, tau ) 11 11 12 12 USE DIMPHY 13 13 USE aero_mod 14 USE phys_local_var_mod, ONLY: od443aer,od550aer,od865aer,ec550aer,od550lt1aer,abs550aer 14 USE phys_local_var_mod, ONLY: od443aer,od550aer,dryod550aer,od865aer,ec550aer,od550lt1aer,abs550aer 15 USE phys_output_var_mod, ONLY: dryaod_diag 15 16 USE YOMCST, ONLY: RD,RG 16 17 … … 67 68 REAL, DIMENSION(klon), INTENT(OUT) :: ai ! POLDER aerosol index 68 69 REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT) :: tausum 70 REAL, DIMENSION(klon,naero_tot), INTENT(OUT) :: drytausum 69 71 REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau 70 72 ! … … 342 344 ! Initialisations 343 345 ai(:) = 0. 346 abs550aer(:)=0.0 347 drytausum(:,:) = 0. 344 348 tausum(:,:,:) = 0. 345 349 tau(:,:,:,:)=0. 346 347 abs550aer(:)=0.0348 350 349 351 DO k=1, klev … … 476 478 DO la=1,las 477 479 478 !--only 443, 550, 670and 865 nm are used480 !--only 443, 550, and 865 nm are used 479 481 !--to save time 670 and AI are not computed for CMIP6 480 482 !IF (la.NE.la443.AND.la.NE.la550.AND.la.NE.la670.AND.la.NE.la865) CYCLE … … 511 513 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 512 514 515 IF (la.EQ.la550.AND.dryaod_diag) THEN 516 tau_ae5wv_int = alpha_MG_5wv(1,la,classbc) 517 drytausum(i,aerindex)=drytausum(i,aerindex)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac 518 ENDIF 519 513 520 IF (la.EQ.la550) THEN 514 521 abs_ae5wv_int = abs_MG_5wv(RH_num(i,k),la,classbc)+DELTA(i,k)* & … … 532 539 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 533 540 541 IF (la.EQ.la550.AND.dryaod_diag) THEN 542 tau_ae5wv_int = alpha_aers_5wv(1,la,spsol) 543 drytausum(i,aerindex)=drytausum(i,aerindex)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac 544 ENDIF 545 534 546 IF (la.EQ.la550) THEN 535 547 abs_ae5wv_int = abs_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* & … … 554 566 tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex) 555 567 568 IF (la.EQ.la550.AND.dryaod_diag) THEN 569 drytausum(i,aerindex)= drytausum(i,aerindex)+tau(i,k,la,aerindex) 570 ENDIF 571 556 572 IF (la.EQ.la550) THEN 557 abs_ae5wv_int = abs_aeri_5wv(la,sp sol)573 abs_ae5wv_int = abs_aeri_5wv(la,spinsol) 558 574 abs550aer(i)=abs550aer(i)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*abs_ae5wv_int*fac 559 575 ENDIF … … 573 589 od865aer(:)=SUM(tausum(:,la865,:),dim=2) 574 590 591 !--dry AOD calculation for diagnostics la=la550 592 dryod550aer(:)=SUM(drytausum(:,:),dim=2) 593 575 594 !--extinction coefficient for diagnostic 576 595 ec550aer(:,:)=SUM(tau(:,:,la550,:),dim=3)/zdh(:,:) -
LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90
r2839 r2870 6 6 tr_seri, mass_solu_aero, mass_solu_aero_pi, & 7 7 tau_aero, piz_aero, cg_aero, & 8 tausum_aero, tau3d_aero )8 tausum_aero, drytausum_aero, tau3d_aero ) 9 9 10 10 ! This routine will : … … 52 52 REAL, DIMENSION(klon,klev,2,NSW), INTENT(OUT) :: cg_aero ! asymmetry parameter aerosol 53 53 REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT) :: tausum_aero 54 REAL, DIMENSION(klon,naero_tot), INTENT(OUT) :: drytausum_aero 54 55 REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau3d_aero 55 56 … … 231 232 ENDIF 232 233 ! 233 ! Read and interpolate cidustm234 ! Read and interpolate asno3m, csno3m, cino3m 234 235 IF (flag_aerosol .EQ. 6) THEN 235 236 … … 240 241 CALL readaerosol_interp(id_CINO3M_phy, itap, pdtphys, rjourvrai, & 241 242 debut, pplay, paprs, t_seri, nitrinscoarse, nitrinscoarse_pi, load_tmp3) 242 load ss(:)=load_tmp1(:)+load_tmp2(:)+load_tmp3(:)243 loadno3(:)=load_tmp1(:)+load_tmp2(:)+load_tmp3(:) 243 244 244 245 ELSE … … 320 321 flag_bc_internal_mixture, & 321 322 pplay, t_seri, & 322 tausum_aero, tau3d_aero )323 tausum_aero, drytausum_aero, tau3d_aero ) 323 324 324 325 !--call LW optical properties for tropospheric aerosols -
LMDZ5/branches/testing/libf/phylmd/rrtm/rrtm_init_140gp.F90
r1999 r2870 82 82 83 83 CORR1(0) = 1.0_JPRB 84 CORR1( 200) = 1.0_JPRB84 CORR1(400) = 1.0_JPRB 85 85 CORR2(0) = 1.0_JPRB 86 CORR2( 200) = 1.0_JPRB87 DO I = 1, 19988 Z_FP = 0.00 5_JPRB*REAL(I)86 CORR2(400) = 1.0_JPRB 87 DO I = 1,399 88 Z_FP = 0.0025_JPRB*REAL(I) 89 89 Z_RTFP = SQRT(Z_FP) 90 90 CORR1(I) = Z_RTFP/Z_FP -
LMDZ5/branches/testing/libf/phylmd/rrtm/yoerrtbg2.F90
r2056 r2870 13 13 ! ------------------------------------------------------------------- 14 14 15 REAL(KIND=JPRB) :: CORR1(0: 200)16 REAL(KIND=JPRB) :: CORR2(0: 200)15 REAL(KIND=JPRB) :: CORR1(0:400) 16 REAL(KIND=JPRB) :: CORR2(0:400) 17 17 18 18 ! -----------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.