Changeset 1199
- Timestamp:
- Mar 4, 2014, 12:22:00 PM (11 years ago)
- Location:
- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_quarter_ss.F
r674 r1199 129 129 INTEGER :: ierr 130 130 !!MARS 131 132 REAL :: pfu, pfd, phm 133 INTEGER :: hypsometric_opt = 1 ! classic 134 !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction 135 131 136 132 137 … … 537 542 ! respect to the model eqns. 538 543 544 IF (hypsometric_opt == 1) THEN 539 545 DO k = 2,kte 540 546 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) - grid%em_dnw(k-1)*grid%em_mub(i,j)*grid%em_alb(i,k-1,j) 541 547 ENDDO 548 ELSE IF (hypsometric_opt == 2) THEN 549 DO k = 2,kte 550 pfu = grid%em_mub(i,j)*grid%em_znw(k) + grid%p_top 551 pfd = grid%em_mub(i,j)*grid%em_znw(k-1) + grid%p_top 552 phm = grid%em_mub(i,j)*grid%em_znu(k-1) + grid%p_top 553 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) + grid%em_alb(i,k-1,j)*phm*LOG(pfd/pfu) 554 END DO 555 END IF 556 542 557 543 558 ENDDO … … 622 637 623 638 grid%em_ph_1(i,1,j) = 0. 639 IF (hypsometric_opt == 1) THEN 624 640 DO k = 2,kte 625 641 grid%em_ph_1(i,k,j) = grid%em_ph_1(i,k-1,j) - (1./grid%em_rdnw(k-1))*( & … … 630 646 grid%em_ph0(i,k,j) = grid%em_ph_1(i,k,j) + grid%em_phb(i,k,j) 631 647 ENDDO 648 ELSE IF (hypsometric_opt == 2) THEN 649 650 ! Alternative hydrostatic eq.: dZ = -al*p*dLOG(p), where p is dry pressure. 651 ! Note that al*p approximates Rd*T and dLOG(p) does z. 652 ! Here T varies mostly linear with z, the first-order integration produces better result. 653 654 grid%em_ph_2(i,1,j) = grid%em_phb(i,1,j) 655 DO k = 2,kte 656 pfu = grid%em_mu0(i,j)*grid%em_znw(k) + grid%p_top 657 pfd = grid%em_mu0(i,j)*grid%em_znw(k-1) + grid%p_top 658 phm = grid%em_mu0(i,j)*grid%em_znu(k-1) + grid%p_top 659 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) + grid%em_alt(i,k-1,j)*phm*LOG(pfd/pfu) 660 END DO 661 662 DO k = 1,kte 663 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k,j) - grid%em_phb(i,k,j) 664 grid%em_ph_1(i,k,j) = grid%em_ph_2(i,k,j) 665 END DO 666 667 END IF 668 669 632 670 633 671 IF ( wrf_dm_on_monitor() ) THEN … … 677 715 ! rebalance hydrostatically 678 716 717 IF (hypsometric_opt == 1) THEN 718 679 719 DO k = 2,kte 680 720 grid%em_ph_1(i,k,j) = grid%em_ph_1(i,k-1,j) - (1./grid%em_rdnw(k-1))*( & … … 685 725 grid%em_ph0(i,k,j) = grid%em_ph_1(i,k,j) + grid%em_phb(i,k,j) 686 726 ENDDO 727 728 ELSE IF (hypsometric_opt == 2) THEN 729 730 ! Alternative hydrostatic eq.: dZ = -al*p*dLOG(p), where p is dry pressure. 731 ! Note that al*p approximates Rd*T and dLOG(p) does z. 732 ! Here T varies mostly linear with z, the first-order integration produces better result. 733 734 grid%em_ph_2(i,1,j) = grid%em_phb(i,1,j) 735 DO k = 2,kte 736 pfu = grid%em_mu0(i,j)*grid%em_znw(k) + grid%p_top 737 pfd = grid%em_mu0(i,j)*grid%em_znw(k-1) + grid%p_top 738 phm = grid%em_mu0(i,j)*grid%em_znu(k-1) + grid%p_top 739 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) + grid%em_alt(i,k-1,j)*phm*LOG(pfd/pfu) 740 END DO 741 742 DO k = 1,kte 743 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k,j) - grid%em_phb(i,k,j) 744 grid%em_ph_1(i,k,j) = grid%em_ph_2(i,k,j) 745 END DO 746 747 END IF 748 687 749 688 750 ENDDO -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
r856 r1199 144 144 REAl :: yeah, yeahc, yeah2 145 145 !****MARS 146 146 INTEGER :: hypsometric_opt = 1 ! classic 147 !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction 148 REAL :: pfu, pfd, phm 147 149 148 150 … … 2264 2266 2265 2267 grid%em_phb(i,1,j) = grid%ht(i,j) * g 2266 DO k = 2,kte 2267 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) - grid%em_dnw(k-1)*grid%em_mub(i,j)*grid%em_alb(i,k-1,j) 2268 END DO 2268 IF (hypsometric_opt == 1) THEN 2269 DO k = 2,kte 2270 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) - grid%em_dnw(k-1)*grid%em_mub(i,j)*grid%em_alb(i,k-1,j) 2271 END DO 2272 ELSE IF (hypsometric_opt == 2) THEN 2273 DO k = 2,kte 2274 pfu = grid%em_mub(i,j)*grid%em_znw(k) + grid%p_top 2275 pfd = grid%em_mub(i,j)*grid%em_znw(k-1) + grid%p_top 2276 phm = grid%em_mub(i,j)*grid%em_znu(k-1) + grid%p_top 2277 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) + grid%em_alb(i,k-1,j)*phm*LOG(pfd/pfu) 2278 END DO 2279 END IF 2280 2269 2281 END DO 2270 2282 END DO … … 2382 2394 grid%em_al(i,k,j) = grid%em_alt(i,k,j) - grid%em_alb(i,k,j) 2383 2395 END DO 2384 2396 2385 2397 ! This is the hydrostatic equation used in the model after the small timesteps. In 2386 2398 ! the model, grid%em_al (inverse density) is computed from the geopotential. 2387 2399 2388 DO k = 2,kte 2389 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) - & 2390 grid%em_dnw(k-1) * ( (grid%em_mub(i,j)+grid%em_mu_2(i,j))*grid%em_al(i,k-1,j) & 2391 + grid%em_mu_2(i,j)*grid%em_alb(i,k-1,j) ) 2392 grid%em_ph0(i,k,j) = grid%em_ph_2(i,k,j) + grid%em_phb(i,k,j) 2393 END DO 2400 IF (hypsometric_opt == 1) THEN 2401 DO k = 2,kte 2402 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) - & 2403 grid%em_dnw(k-1) * ( (grid%em_mub(i,j)+grid%em_mu_2(i,j))*grid%em_al(i,k-1,j) & 2404 + grid%em_mu_2(i,j)*grid%em_alb(i,k-1,j) ) 2405 grid%em_ph0(i,k,j) = grid%em_ph_2(i,k,j) + grid%em_phb(i,k,j) 2406 END DO 2407 ELSE IF (hypsometric_opt == 2) THEN 2408 ! Alternative hydrostatic eq.: dZ = -al*p*dLOG(p), where p is dry pressure. 2409 ! Note that al*p approximates Rd*T and dLOG(p) does z. 2410 ! Here T varies mostly linear with z, the first-order integration produces better result. 2411 PRINT*,"WEE ET AL. 2012 CORRECTION." 2412 grid%em_ph_2(i,1,j) = grid%em_phb(i,1,j) 2413 DO k = 2,kte 2414 pfu = grid%em_mu0(i,j)*grid%em_znw(k) + grid%p_top 2415 pfd = grid%em_mu0(i,j)*grid%em_znw(k-1) + grid%p_top 2416 phm = grid%em_mu0(i,j)*grid%em_znu(k-1) + grid%p_top 2417 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) + grid%em_alt(i,k-1,j)*phm*LOG(pfd/pfu) 2418 END DO 2419 2420 DO k = 1,kte 2421 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k,j) - grid%em_phb(i,k,j) 2422 END DO 2423 END IF 2424 2394 2425 2395 2426 ! ! Adjust the column pressure so that the computed 500 mb height is close to the … … 2610 2641 i, j, k 2611 2642 2643 REAL :: pfu, pfd, phm 2644 INTEGER :: hypsometric_opt = 1 ! classic 2645 !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction 2646 2647 2648 2612 2649 #ifdef DM_PARALLEL 2613 2650 # include "em_data_calls.inc" … … 2716 2753 2717 2754 grid%em_phb(i,1,j) = grid%ht_fine(i,j) * g 2718 DO k = 2,kte 2719 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) - grid%em_dnw(k-1)*grid%em_mub(i,j)*grid%em_alb(i,k-1,j) 2720 END DO 2755 IF (hypsometric_opt == 1) THEN 2756 DO k = 2,kte 2757 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) - grid%em_dnw(k-1)*grid%em_mub(i,j)*grid%em_alb(i,k-1,j) 2758 END DO 2759 ELSE IF (hypsometric_opt == 2) THEN 2760 DO k = 2,kte 2761 pfu = grid%em_mub(i,j)*grid%em_znw(k) + grid%p_top 2762 pfd = grid%em_mub(i,j)*grid%em_znw(k-1) + grid%p_top 2763 phm = grid%em_mub(i,j)*grid%em_znu(k-1) + grid%p_top 2764 grid%em_phb(i,k,j) = grid%em_phb(i,k-1,j) + grid%em_alb(i,k-1,j)*phm*LOG(pfd/pfu) 2765 END DO 2766 END IF 2721 2767 END DO 2722 2768 END DO … … 2771 2817 END DO 2772 2818 2773 ! This is the hydrostatic equation used in the model after the small timesteps. In 2774 ! the model, grid%em_al (inverse density) is computed from the geopotential. 2775 2776 DO k = 2,kte 2777 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) - & 2778 grid%em_dnw(k-1) * ( (grid%em_mub(i,j)+grid%em_mu_2(i,j))*grid%em_al(i,k-1,j) & 2779 + grid%em_mu_2(i,j)*grid%em_alb(i,k-1,j) ) 2780 grid%em_ph0(i,k,j) = grid%em_ph_2(i,k,j) + grid%em_phb(i,k,j) 2781 END DO 2782 2819 ! This is the hydrostatic equation used in the model after the small timesteps. In 2820 ! the model, grid%al (inverse density) is computed from the geopotential. 2821 2822 IF (hypsometric_opt == 1) THEN 2823 DO k = 2,kte 2824 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) - & 2825 grid%em_dnw(k-1) * ( (grid%em_mub(i,j)+grid%em_mu_2(i,j))*grid%em_al(i,k-1,j) & 2826 + grid%em_mu_2(i,j)*grid%em_alb(i,k-1,j) ) 2827 grid%em_ph0(i,k,j) = grid%em_ph_2(i,k,j) + grid%em_phb(i,k,j) 2828 END DO 2829 ELSE IF (hypsometric_opt == 2) THEN 2830 2831 ! Alternative hydrostatic eq.: dZ = -al*p*dLOG(p), where p is dry pressure. 2832 ! Note that al*p approximates Rd*T and dLOG(p) does z. 2833 ! Here T varies mostly linear with z, the first-order integration produces better result. 2834 2835 grid%em_ph_2(i,1,j) = grid%em_phb(i,1,j) 2836 DO k = 2,kte 2837 pfu = grid%em_mu0(i,j)*grid%em_znw(k) + grid%p_top 2838 pfd = grid%em_mu0(i,j)*grid%em_znw(k-1) + grid%p_top 2839 phm = grid%em_mu0(i,j)*grid%em_znu(k-1) + grid%p_top 2840 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k-1,j) + grid%em_alt(i,k-1,j)*phm*LOG(pfd/pfu) 2841 END DO 2842 2843 DO k = 1,kte 2844 grid%em_ph_2(i,k,j) = grid%em_ph_2(i,k,j) - grid%em_phb(i,k,j) 2845 END DO 2846 2847 END IF 2848 2783 2849 END DO 2784 2850 END DO
Note: See TracChangeset
for help on using the changeset viewer.