Ignore:
Timestamp:
Mar 4, 2014, 12:22:00 PM (11 years ago)
Author:
aslmd
Message:

MESOSCALE. possibility to experiment simulations with Wee et al. 2012 changes in initialization (more consistent handling of hypsometric equation)

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  
    129129 INTEGER :: ierr
    130130!!MARS
     131
     132      REAL :: pfu, pfd, phm
     133      INTEGER :: hypsometric_opt = 1 ! classic
     134      !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction
     135
    131136
    132137
     
    537542!  respect to the model eqns.
    538543
     544   IF (hypsometric_opt == 1) THEN
    539545    DO k  = 2,kte
    540546      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)
    541547    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
    542557
    543558  ENDDO
     
    622637
    623638    grid%em_ph_1(i,1,j) = 0.
     639   IF (hypsometric_opt == 1) THEN
    624640    DO k  = 2,kte
    625641      grid%em_ph_1(i,k,j) = grid%em_ph_1(i,k-1,j) - (1./grid%em_rdnw(k-1))*(       &
     
    630646      grid%em_ph0(i,k,j) = grid%em_ph_1(i,k,j) + grid%em_phb(i,k,j)
    631647    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
    632670
    633671    IF ( wrf_dm_on_monitor() ) THEN
     
    677715!  rebalance hydrostatically
    678716
     717   IF (hypsometric_opt == 1) THEN
     718
    679719      DO k  = 2,kte
    680720        grid%em_ph_1(i,k,j) = grid%em_ph_1(i,k-1,j) - (1./grid%em_rdnw(k-1))*(       &
     
    685725        grid%em_ph0(i,k,j) = grid%em_ph_1(i,k,j) + grid%em_phb(i,k,j)
    686726      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
    687749
    688750    ENDDO
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F

    r856 r1199  
    144144      REAl :: yeah, yeahc, yeah2
    145145!****MARS
    146 
     146      INTEGER :: hypsometric_opt = 1 ! classic
     147      !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction
     148      REAL :: pfu, pfd, phm
    147149
    148150
     
    22642266
    22652267            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
    22692281         END DO
    22702282      END DO
     
    23822394                  grid%em_al(i,k,j) = grid%em_alt(i,k,j) - grid%em_alb(i,k,j)
    23832395               END DO
    2384          
     2396       
    23852397               !  This is the hydrostatic equation used in the model after the small timesteps.  In
    23862398               !  the model, grid%em_al (inverse density) is computed from the geopotential.
    23872399         
    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
    23942425
    23952426!               !  Adjust the column pressure so that the computed 500 mb height is close to the
     
    26102641                                     i, j, k
    26112642
     2643      REAL :: pfu, pfd, phm
     2644      INTEGER :: hypsometric_opt = 1 ! classic
     2645      !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction
     2646
     2647
     2648
    26122649#ifdef DM_PARALLEL
    26132650#    include "em_data_calls.inc"
     
    27162753
    27172754            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
    27212767         END DO
    27222768      END DO
     
    27712817            END DO
    27722818     
    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
    27832849         END DO
    27842850      END DO
Note: See TracChangeset for help on using the changeset viewer.