- Timestamp:
- Mar 2, 2024, 12:54:02 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_wake.F90
r4836 r4838 2449 2449 REAL, DIMENSION (klon) :: sum_dth 2450 2450 2451 INTEGER, DIMENSION (klon) :: k_ptop_provis 2452 REAL, DIMENSION (klon) :: omega !! 2453 REAL, DIMENSION (klon,klev+1) :: int_dth !! 2454 REAL, DIMENSION (klon,klev+1) :: dzz !! 2455 REAL, DIMENSION (klon,klev+1) :: zzz !! 2456 REAL, DIMENSION (klon) :: frac_int_dth !! 2457 REAL :: epsil !! 2458 REAL :: ddd!! 2459 2460 LOGICAL :: new_ptop 2461 2462 INTEGER, SAVE :: ipas=0 2463 2464 2465 LOGICAL new_top 2466 2451 2467 !INTEGER, SAVE :: compte=0 2452 2468 … … 2456 2472 !compte=compte+1 2457 2473 !print*,'compte=',compte 2474 2475 new_top=.false. 2458 2476 2459 2477 … … 2618 2636 kupper(i) = min(kupper(i), klev-1) 2619 2637 END DO 2638 2639 ! ----------------------------------------------------------------------- 2640 ! nouveau calcul de hw et ptop 2641 ! ----------------------------------------------------------------------- 2642 if (new_ptop) then 2643 2644 epsil = 0.05 ! 5 pour cent 2645 ! epsil = 0.20 2646 2647 DO i = 1, klon 2648 IF (wk_adv(i)) THEN 2649 int_dth(i,1) = 0. 2650 END IF 2651 END DO 2652 2653 2654 2655 DO K = 2, klev+1 2656 Do i = 1, klon 2657 IF (wk_adv(i)) THEN 2658 if (k<=k_ptop_provis(i)) then 2659 ddd=dth(i,k-1)*(ph(i,k-1) - min(ptop_provis(i),ph(i,k))) 2660 else 2661 ddd=0. 2662 endif 2663 int_dth(i,k) = int_dth(i,k-1) + ddd 2664 END IF 2665 END DO 2666 END DO 2667 ! print*, 'xxx, int_dth', (k,int_dth(1,k),k=1,klev) 2668 ! print*, 'xxx, k_ptop_provis', k_ptop_provis(1) 2669 2670 2671 DO i=1,klon 2672 IF (wk_adv(i)) THEN 2673 frac_int_dth(i)=(1.-epsil)*int_dth(i,k_ptop_provis(i)) 2674 ENDIF 2675 ENDDO 2676 DO k = 1,klev 2677 DO i =1, klon 2678 ! print*,ipas,'yyy ',k,int_dth(i,k),frac_int_dth(i) 2679 IF (wk_adv(i) .AND. int_dth(i,k)>=frac_int_dth(i)) THEN 2680 ktop1(i) = min(k, k_ptop_provis(i)) 2681 !print*,ipas,'yyy ktop1= ',ktop1 2682 END if 2683 END DO 2684 END DO 2685 !print*, 'LAMINE' 2686 2687 DO i = 1, klon 2688 IF (wk_adv(i)) THEN 2689 !print*, ipas,'xxx1, int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) ',ktop1 2690 ddd=int_dth(i,ktop1(i)+1)-int_dth(i,ktop1(i)) 2691 if (ddd==0.) then 2692 omega(i)=0. 2693 else 2694 omega(i) = (frac_int_dth(i) - int_dth(i,ktop1(i)))/ddd 2695 endif 2696 print*,'OMEGA ',omega(i) 2697 END IF 2698 END DO 2699 2700 print*, 'xxx' 2701 DO i = 1, klon 2702 IF (wk_adv(i)) THEN 2703 ! print*, 'xxx, int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) ', & 2704 ! int_dth(i,ktop1(i)), frac_int_dth(i), int_dth(i,ktop1(i)+1) 2705 ! print*, 'xxx, omega(i), ph(i,ktop1(i)), ph(i,ktop1(i)+1) ', & 2706 !e omega(i), ph(i,ktop1(i)), ph(i,ktop1(i)+1) 2707 ptop1(i) = min((1 - omega(i))*ph(i,ktop1(i)) + omega(i)*ph(i,ktop1(i)+1), ph(i,1)) 2708 END IF 2709 END DO 2710 2711 DO i=1, klon 2712 IF (wk_adv(i)) THEN 2713 zzz(i, 1) = 0 2714 END IF 2715 END DO 2716 DO k = 1, klev 2717 DO i = 1, klon 2718 IF (wk_adv(i)) THEN 2719 dzz(i,k) = (ph(i,k) - ph(i,k+1))/(rho(i,k)*RG) 2720 zzz(i,k+1) = zzz(i,k) + dzz(i,k) 2721 END IF 2722 END DO 2723 END DO 2724 2725 DO i =1, klon 2726 IF (wk_adv(i)) THEN 2727 h_zzz(i) = max((1- omega(i))*zzz(i,ktop1(i)) + omega(i)*zzz(i,ktop1(i)+1), hwmin) 2728 END IF 2729 END DO 2730 2731 endif 2732 !---------- FIN nouveau calcul hw et ptop ------------------------------------- 2733 2620 2734 RETURN 2621 2735 END SUBROUTINE pkupper
Note: See TracChangeset
for help on using the changeset viewer.