Changeset 2671 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Oct 16, 2016, 6:10:59 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/calwake.F90
r2635 r2671 71 71 REAL :: aire 72 72 REAL, DIMENSION(klon, klev) :: p, pi 73 REAL, DIMENSION(klon, klev+1) :: ph, omgbe 73 REAL, DIMENSION(klon, klev+1) :: ph 74 REAL, DIMENSION(klon, klev) :: omgbe 74 75 REAL, DIMENSION(klon, klev) :: te, qe 75 76 REAL, DIMENSION(klon, klev) :: dtdwn, dqdwn … … 81 82 REAL, DIMENSION(klon) :: hw, wape, fip, gfl 82 83 REAL, DIMENSION(klon) :: sigmaw, wdens 83 REAL, DIMENSION(klon, klev +1):: omgbdth84 REAL, DIMENSION(klon, klev) :: omgbdth 84 85 REAL, DIMENSION(klon, klev) :: dp_omgb 85 86 REAL, DIMENSION(klon, klev) :: dtke, dqke 86 REAL, DIMENSION(klon, klev +1):: omg87 REAL, DIMENSION(klon, klev) :: omg 87 88 REAL, DIMENSION(klon, klev) :: dp_deltomg, spread 88 89 REAL, DIMENSION(klon) :: cstar … … 122 123 END DO 123 124 END DO 124 125 omgbe(:, klev+1) = 0.126 125 127 126 DO i = 1, klon -
LMDZ5/trunk/libf/phylmd/cv3_routines.F90
r2638 r2671 2354 2354 2355 2355 ! ------------------------------------------------------ 2356 IF (prt_level .GE. 10) print *,' ->cv3_unsat, iflag(1) ', iflag(1) 2356 2357 2357 2358 ! ============================= … … 2359 2360 ! ============================= 2360 2361 ! (loops up to nl+1) 2362 mp(:,:) = 0. 2363 rp(:,:) = 0. 2364 up(:,:) = 0. 2365 vp(:,:) = 0. 2366 water(:,:) = 0. 2367 evap(:,:) = 0. 2368 wt(:,:) = 0. 2369 ice(:,:) = 0. 2370 fondue(:,:) = 0. 2371 faci(:,:) = 0. 2372 b(:,:) = 0. 2373 sigd(:) = 0. 2374 !! RomP >>> 2375 wdtrainA(:,:) = 0. 2376 wdtrainM(:,:) = 0. 2377 !! RomP <<< 2361 2378 2362 2379 DO i = 1, nlp 2363 2380 DO il = 1, ncum 2364 mp(il, i) = 0.02365 2381 rp(il, i) = rr(il, i) 2366 2382 up(il, i) = u(il, i) 2367 2383 vp(il, i) = v(il, i) 2368 2384 wt(il, i) = 0.001 2369 water(il, i) = 0.0 2370 faci(il, i) = 0.0 2371 ice(il, i) = 0.0 2372 fondue(il, i) = 0.0 2373 evap(il, i) = 0.0 2374 b(il, i) = 0.0 2375 END DO 2376 END DO 2377 !! RomP >>> 2378 DO i = 1, nlp 2379 DO il = 1, ncum 2380 wdtrainA(il, i) = 0.0 2381 wdtrainM(il, i) = 0.0 2382 END DO 2383 END DO 2384 !! RomP <<< 2385 END DO 2386 END DO 2385 2387 2386 2388 ! *** Set the fractionnal area sigd of precipitating downdraughts … … 2422 2424 !! lwork(il)=.TRUE. 2423 2425 !! if(ep(il,inb(il)).lt.0.0001)lwork(il)=.FALSE. 2424 lwork(il) = ep(il, inb(il)) >= 0.0001 2426 !jyg< 2427 !! lwork(il) = ep(il, inb(il)) >= 0.0001 2428 lwork(il) = ep(il, inb(il)) >= 0.0001 .AND. iflag(il) <= 2 2425 2429 END DO 2426 2430 … … 2725 2729 2726 2730 END IF !(i.le.inb(il) .and. lwork(il) .and. i.ne.1) 2731 IF (prt_level .GE. 20) THEN 2732 PRINT *,'cv3_unsat, mp hydrostatic ', i, mp(il,i) 2733 ENDIF 2727 2734 END DO 2728 2735 ! ---------------------------------------------------------------- … … 2771 2778 END IF 2772 2779 mp(il, i) = max(0.0, mp(il,i)) 2780 IF (prt_level .GE. 20) THEN 2781 PRINT *,'cv3_unsat, mp cubic ', i, mp(il,i) 2782 ENDIF 2773 2783 2774 2784 IF (cvflag_ice) THEN -
LMDZ5/trunk/libf/phylmd/wake.F90
r2635 r2671 125 125 126 126 REAL, DIMENSION (klon, klev), INTENT(IN) :: p, pi 127 REAL, DIMENSION (klon, klev+1), INTENT(IN) :: ph, omgb 127 REAL, DIMENSION (klon, klev+1), INTENT(IN) :: ph 128 REAL, DIMENSION (klon, klev), INTENT(IN) :: omgb 128 129 REAL, INTENT(IN) :: dtime 129 130 REAL, DIMENSION (klon, klev), INTENT(IN) :: te0, qe0 … … 148 149 REAL, DIMENSION (klon, klev), INTENT(OUT) :: dtke, dqke 149 150 REAL, DIMENSION (klon, klev), INTENT(OUT) :: spread 150 REAL, DIMENSION (klon, klev +1),INTENT(OUT) :: omgbdth, omg151 REAL, DIMENSION (klon, klev), INTENT(OUT) :: omgbdth, omg 151 152 REAL, DIMENSION (klon, klev), INTENT(OUT) :: dp_omgb, dp_deltomg 152 153 REAL, DIMENSION (klon, klev), INTENT(OUT) :: d_deltat_gw … … 161 162 162 163 ! Variables à fixer 164 INTEGER, SAVE :: igout 165 !$OMP THREADPRIVATE(igout) 163 166 REAL :: alon 164 167 LOGICAL, SAVE :: first = .TRUE. … … 182 185 REAL, DIMENSION (klon, klev) :: deltaqw0 183 186 REAL, DIMENSION (klon, klev) :: te, qe 184 REAL, DIMENSION (klon) :: sigmaw0, sigmaw1 187 REAL, DIMENSION (klon) :: sigmaw0 188 !! REAL, DIMENSION (klon) :: sigmaw1 185 189 186 190 ! Variables pour les GW … … 228 232 REAL, DIMENSION (klon, klev) :: the, thu 229 233 230 REAL, DIMENSION (klon, klev +1):: omgbw234 REAL, DIMENSION (klon, klev) :: omgbw 231 235 REAL, DIMENSION (klon) :: pupper 232 236 REAL, DIMENSION (klon) :: omgtop … … 250 254 251 255 ! cc nrlmd 252 REAL, DIMENSION (klon) :: death_rate, nat_rate 256 REAL, DIMENSION (klon) :: death_rate 257 !! REAL, DIMENSION (klon) :: nat_rate 253 258 REAL, DIMENSION (klon, klev) :: entr 254 259 REAL, DIMENSION (klon, klev) :: detr … … 296 301 297 302 if (first) then 303 304 igout = klon/2+1/klon 305 298 306 crep_upper = 0.9 299 307 crep_sol = 1.0 … … 332 340 delta_t_min = 0.2 333 341 334 ! 1. - Save initial values and initialize tendencies 335 ! -------------------------------------------------- 336 337 DO k = 1, klev 338 DO i = 1, klon 339 ppi(i, k) = pi(i, k) 340 deltatw0(i, k) = deltatw(i, k) 341 deltaqw0(i, k) = deltaqw(i, k) 342 te(i, k) = te0(i, k) 343 qe(i, k) = qe0(i, k) 344 dtls(i, k) = 0. 345 dqls(i, k) = 0. 346 d_deltat_gw(i, k) = 0. 347 d_te(i, k) = 0. 348 d_qe(i, k) = 0. 349 d_deltatw(i, k) = 0. 350 d_deltaqw(i, k) = 0. 351 ! IM 060508 beg 352 d_deltatw2(i, k) = 0. 353 d_deltaqw2(i, k) = 0. 354 ! IM 060508 end 355 END DO 356 END DO 357 DO i = 1, klon 358 sigmaw_in(i) = sigmaw(i) 359 END DO 342 ! 1. - Save initial values, initialize tendencies, initialize output fields 343 ! ------------------------------------------------------------------------ 344 345 !jyg< 346 !! DO k = 1, klev 347 !! DO i = 1, klon 348 !! ppi(i, k) = pi(i, k) 349 !! deltatw0(i, k) = deltatw(i, k) 350 !! deltaqw0(i, k) = deltaqw(i, k) 351 !! te(i, k) = te0(i, k) 352 !! qe(i, k) = qe0(i, k) 353 !! dtls(i, k) = 0. 354 !! dqls(i, k) = 0. 355 !! d_deltat_gw(i, k) = 0. 356 !! d_te(i, k) = 0. 357 !! d_qe(i, k) = 0. 358 !! d_deltatw(i, k) = 0. 359 !! d_deltaqw(i, k) = 0. 360 !! ! IM 060508 beg 361 !! d_deltatw2(i, k) = 0. 362 !! d_deltaqw2(i, k) = 0. 363 !! ! IM 060508 end 364 !! END DO 365 !! END DO 366 ppi(:,:) = pi(:,:) 367 deltatw0(:,:) = deltatw(:,:) 368 deltaqw0(:,:) = deltaqw(:,:) 369 te(:,:) = te0(:,:) 370 qe(:,:) = qe0(:,:) 371 dtls(:,:) = 0. 372 dqls(:,:) = 0. 373 d_deltat_gw(:,:) = 0. 374 d_te(:,:) = 0. 375 d_qe(:,:) = 0. 376 d_deltatw(:,:) = 0. 377 d_deltaqw(:,:) = 0. 378 d_deltatw2(:,:) = 0. 379 d_deltaqw2(:,:) = 0. 380 !! DO i = 1, klon 381 !! sigmaw_in(i) = sigmaw(i) 382 !! END DO 383 sigmaw_in(:) = sigmaw(:) 384 !>jyg 385 360 386 ! sigmaw1=sigmaw 361 387 ! IF (sigd_con.GT.sigmaw1) THEN … … 378 404 ktopw(i) = 0 379 405 END DO 380 406 ! 407 !<jyg 408 dth(:,:) = 0. 409 tu(:,:) = 0. 410 qu(:,:) = 0. 411 dtke(:,:) = 0. 412 dqke(:,:) = 0. 413 spread(:,:) = 0. 414 omgbdth(:,:) = 0. 415 omg(:,:) = 0. 416 dp_omgb(:,:) = 0. 417 dp_deltomg(:,:) = 0. 418 hw(:) = 0. 419 wape(:) = 0. 420 fip(:) = 0. 421 gfl(:) = 0. 422 cstar(:) = 0. 423 ktopw(:) = 0 424 ! 425 ! Vertical advection local variables 426 omgbw(:,:) = 0. 427 omgtop(:) = 0 428 dp_omgbw(:,:) = 0. 429 omgbdq(:,:) = 0. 430 !>jyg 431 ! 432 IF (prt_level>=10) THEN 433 PRINT *, 'wake-1, sigmaw(igout) ', sigmaw(igout) 434 PRINT *, 'wake-1, deltatw(igout,k) ', (k,deltatw(igout,k), k=1,klev) 435 PRINT *, 'wake-1, deltaqw(igout,k) ', (k,deltaqw(igout,k), k=1,klev) 436 PRINT *, 'wake-1, dowwdraughts, amdwn(igout,k) ', (k,amdwn(igout,k), k=1,klev) 437 PRINT *, 'wake-1, dowwdraughts, dtdwn(igout,k) ', (k,dtdwn(igout,k), k=1,klev) 438 PRINT *, 'wake-1, dowwdraughts, dqdwn(igout,k) ', (k,dqdwn(igout,k), k=1,klev) 439 PRINT *, 'wake-1, updraughts, amup(igout,k) ', (k,amup(igout,k), k=1,klev) 440 PRINT *, 'wake-1, updraughts, dta(igout,k) ', (k,dta(igout,k), k=1,klev) 441 PRINT *, 'wake-1, updraughts, dqa(igout,k) ', (k,dqa(igout,k), k=1,klev) 442 ENDIF 381 443 382 444 ! 2. - Prognostic part … … 570 632 END DO 571 633 634 IF (prt_level>=10) THEN 635 PRINT *, 'wake-2, ptop_provis(igout), ptop(igout) ', ptop_provis(igout), ptop(igout) 636 ENDIF 637 572 638 573 639 ! -5/ Determination de ktop et kupper … … 611 677 END DO 612 678 END DO 679 680 IF (prt_level>=10) THEN 681 PRINT *, 'wake-3, ktop(igout), kupper(igout) ', ktop(igout), kupper(igout) 682 ENDIF 613 683 614 684 ! -5/ Set deltatw & deltaqw to 0 above kupper … … 753 823 END DO 754 824 825 IF (prt_level>=10) THEN 826 PRINT *, 'wake-4, sigmaw(igout), cstar(igout), wape(igout) ', & 827 sigmaw(igout), cstar(igout), wape(igout) 828 ENDIF 829 830 755 831 ! C ----------------------------------------------------------------- 756 832 ! Sub-time-stepping … … 769 845 wk_adv(i) = ok_qx_qw(i) .AND. alpha(i) >= 1. 770 846 END DO 847 IF (prt_level>=10) THEN 848 PRINT *, 'wake-4.1, isubstep,wk_adv(igout),cstar(igout),wape(igout) ', & 849 isubstep,wk_adv(igout),cstar(igout),wape(igout) 850 ENDIF 771 851 772 852 ! cc nrlmd Ajout d'un recalcul de wdens dans le cas d'un entrainement … … 835 915 ! calcul de la difference de vitesse verticale poche - zone non perturbee 836 916 ! IM 060208 differences par rapport au code initial; init. a 0 dp_deltomg 837 ! IM 060208 et omg sur les niveaux de 1 a klev+1, alors que avant l'on 838 ! definit 917 ! IM 060208 et omg sur les niveaux de 1 a klev+1, alors que avant l'on definit 839 918 ! IM 060208 au niveau k=1..? 919 !JYG 161013 Correction : maintenant omg est dimensionne a klev. 840 920 DO k = 1, klev 841 921 DO i = 1, klon … … 845 925 END DO 846 926 END DO 847 DO k = 1, klev + 1927 DO k = 1, klev 848 928 DO i = 1, klon 849 929 IF (wk_adv(i)) THEN !!! nrlmd … … 879 959 END IF 880 960 END DO 961 962 IF (prt_level>=10) THEN 963 PRINT *, 'wake-4.2, omg(igout,k) ', (k,omg(igout,k), k=1,klev) 964 PRINT *, 'wake-4.2, omgtop(igout) ', omgtop(igout) 965 ENDIF 881 966 882 967 ! ----------------- … … 926 1011 END DO 927 1012 END DO 1013 !! print *,'omg(igout,k) ', (k,omg(igout,k),k=1,klev) 928 1014 ! cc nrlmd 929 1015 ! c DO i=1,klon … … 936 1022 937 1023 938 DO k = 1, klev + 11024 DO k = 1, klev 939 1025 DO i = 1, klon 940 1026 IF (wk_adv(i)) THEN … … 945 1031 ! -- and its vertical gradient dp_omgbw 946 1032 947 DO k = 1, klev 1033 DO k = 1, klev-1 948 1034 DO i = 1, klon 949 1035 IF (wk_adv(i)) THEN … … 951 1037 END IF 952 1038 END DO 1039 END DO 1040 DO i = 1, klon 1041 IF (wk_adv(i)) THEN 1042 dp_omgbw(i, klev) = 0. 1043 END IF 953 1044 END DO 954 1045 … … 1030 1121 END DO 1031 1122 1123 IF (prt_level>=10) THEN 1124 PRINT *, 'wake-4.3, th1(igout,k) ', (k,th1(igout,k), k=1,klev) 1125 PRINT *, 'wake-4.3, th2(igout,k) ', (k,th2(igout,k), k=1,klev) 1126 PRINT *, 'wake-4.3, dth(igout,k) ', (k,dth(igout,k), k=1,klev) 1127 PRINT *, 'wake-4.3, omgbdth(igout,k) ', (k,omgbdth(igout,k), k=1,klev) 1128 ENDIF 1129 1032 1130 ! ----------------------------------------------------------------- 1033 DO k = 1, klev 1131 DO k = 1, klev-1 1034 1132 DO i = 1, klon 1035 1133 IF (wk_adv(i) .AND. k<=kupper(i)-1) THEN … … 1043 1141 (1.-alpha_up(i,k))*omgbdth(i,k)- & 1044 1142 alpha_up(i,k+1)*omgbdth(i,k+1))*ppi(i, k) 1045 ! print*,'d_deltatw=',d_deltatw(i,k)1143 ! print*,'d_deltatw=', k, d_deltatw(i,k) 1046 1144 1047 1145 d_deltaqw(i, k) = dtimesub/(ph(i,k)-ph(i,k+1))* & … … 1050 1148 (1.-alpha_up(i,k))*omgbdq(i,k)- & 1051 1149 alpha_up(i,k+1)*omgbdq(i,k+1)) 1052 ! print*,'d_deltaqw=',d_deltaqw(i,k)1150 ! print*,'d_deltaqw=', k, d_deltaqw(i,k) 1053 1151 1054 1152 ! and increment large scale tendencies … … 1080 1178 END DO 1081 1179 ! ------------------------------------------------------------------ 1180 1181 IF (prt_level>=10) THEN 1182 PRINT *, 'wake-4.3, d_deltatw(igout,k) ', (k,d_deltatw(igout,k), k=1,klev) 1183 PRINT *, 'wake-4.3, d_deltaqw(igout,k) ', (k,d_deltaqw(igout,k), k=1,klev) 1184 ENDIF 1082 1185 1083 1186 ! Increment state variables … … 1505 1608 END DO ! end sub-timestep loop 1506 1609 1610 IF (prt_level>=10) THEN 1611 PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout) ', & 1612 sigmaw(igout), cstar(igout), wape(igout) 1613 ENDIF 1507 1614 1508 1615 … … 1761 1868 ! c $ wape(i),wape2(i),ktopw(i),OK_qx_qw(i) 1762 1869 END DO 1870 1871 IF (prt_level>=10) THEN 1872 PRINT *, 'wake-6, wape wape2 ktopw OK_qx_qw =', & 1873 wape(igout),wape2(igout),ktopw(igout),OK_qx_qw(igout) 1874 ENDIF 1875 1763 1876 1764 1877 ! -----------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.