Changeset 192 for codes/icosagcm/trunk


Ignore:
Timestamp:
06/25/14 15:00:24 (10 years ago)
Author:
dubos
Message:

Fixed DCMIP5 physics/etat0

Location:
codes/icosagcm/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/etat0.f90

    r186 r192  
    77  SUBROUTINE etat0(f_ps,f_mass,f_phis,f_theta_rhodz,f_u, f_q) 
    88    USE icosa 
     9    USE mpipara, ONLY : is_mpi_root 
    910    USE disvert_mod 
    1011    USE etat0_williamson_mod, ONLY : etat0_williamson_new 
     
    6162       CALL etat0_dcmip3(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
    6263     CASE ('dcmip4') 
     64        IF(nqtot<2) THEN 
     65           IF (is_mpi_root)  THEN 
     66              PRINT *, "nqtot must be at least 2 for test case DCMIP4" 
     67           END IF 
     68           STOP 
     69        END IF 
    6370       CALL etat0_dcmip4(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
    6471     CASE ('dcmip5') 
  • codes/icosagcm/trunk/src/etat0_dcmip5.f90

    r186 r192  
    9696    lonc=Pi  
    9797 
    98     Tv0=T0/(1+0.608*q0) 
     98    Tv0=T0*(1+0.608*q0) 
    9999    Tvt=Tv0-Gamma*zt 
    100100   
  • codes/icosagcm/trunk/src/physics_dcmip.f90

    r186 r192  
    1616  IMPLICIT NONE 
    1717 
    18     testcase=1 
     18    testcase=1 ! OK for 4.2 (moist baroclinic instability) 
    1919    CALL getin("dcmip_physics",testcase) 
    2020    CALL allocate_field(f_out_i,field_t,type_real,llm) 
     
    106106    INTEGER :: i,j,l,ij 
    107107      
    108     PRINT *,'Entering in DCMIP physics'     
     108!    PRINT *,'Entering in DCMIP physics'     
    109109    CALL compute_pression(ps,p,0) 
    110110    CALL compute_exner(ps,p,pks,pk,0) 
     
    112112    CALL compute_geopotential(phis,pks,pk,theta,phi,0) 
    113113    CALL compute_theta_rhodz2temperature(ps,theta_rhodz,T,0) 
    114    CALL compute_wind_centered(ue,uc) 
    115    CALL compute_wind_centered_lonlat_compound(uc, u, v) 
    116  
     114    ! Reconstruct wind vector at hexagons 
     115    CALL compute_wind_centered(ue,uc) 
     116    CALL compute_wind_centered_lonlat_compound(uc, u, v) 
     117 
     118    ! Convert from Tv to T 
     119    DO l=1,llm 
     120      DO j=jj_begin,jj_end 
     121        DO i=ii_begin,ii_end 
     122          ij=(j-1)*iim+i 
     123          T(ij,l)=T(ij,l)/(1+0.608*q(ij,l)) 
     124        ENDDO 
     125      ENDDO 
     126    ENDDO        
     127     
    117128    DO j=jj_begin,jj_end 
    118129      DO i=ii_begin,ii_end 
     
    122133    ENDDO 
    123134    
     135    ! bottom-up indexing (DYNAMICO) : u,utemp, v,vtemp                                                                      
     136    ! top-down vertical indexing (DCMIP) : ufi, vfi, ...                                                              
     137    ! => copy fields and mirror vertical index                                                        
    124138    DO l=1,llm+1 
    125139      DO j=jj_begin,jj_end 
     
    131145    ENDDO 
    132146     
     147    ! Pressure inside layers                                                                                              
    133148    DO l=1,llm 
    134149      DO j=jj_begin,jj_end 
     
    140155    ENDDO 
    141156     
     157    ! Pressure difference between two layers 
    142158    DO l=1,llm 
    143159      DO j=jj_begin,jj_end 
     
    149165    ENDDO        
    150166        
    151      
    152 !    ufi=u 
    153 !    vfi=v     
    154      
    155     DO l=1,llm 
    156       DO j=jj_begin,jj_end 
    157         DO i=ii_begin,ii_end 
    158           ij=(j-1)*iim+i 
    159           T(ij,l)=T(ij,l)/(1+0.608*q(ij,l)) 
    160         ENDDO 
    161       ENDDO 
    162     ENDDO        
    163      
     167    ! Copy T,u,v,q for input to physics 
    164168    DO l=1,llm 
    165169      DO j=jj_begin,jj_end 
     
    174178    ENDDO        
    175179     
    176 !    q=0 
    177 !    out_i=T 
    178      
    179180    CALL simple_physics(iim*jjm, llm, dt, lat, tfi, qfi , ufi, vfi, pmid, pint, pdel, 1/pdel, ps, precl, testcase)  
    180181     
     182    ! Copy back T,u,v,q and mirror vertical index 
    181183    DO l=1,llm 
    182184      DO j=jj_begin,jj_end 
     
    192194 
    193195 
     196    ! Convert back T to Tv 
    194197    DO l=1,llm 
    195198      DO j=jj_begin,jj_end 
     
    201204    ENDDO        
    202205 
    203 !    out_i=q 
    204          
     206    ! Compute velocity update at hexagons                                                                                 
    205207    utemp=utemp-u 
    206208    vtemp=vtemp-v 
    207209 
     210    ! lon-lat -> 3D 
    208211    DO l=1,llm 
    209212      DO j=jj_begin,jj_end 
     
    215218    ENDDO 
    216219 
    217 !    out_i=ufi 
    218      
     220    ! Update velocity at velocity points 
    219221    DO l=1,llm 
    220222      DO j=jj_begin,jj_end 
     
    519521      end do 
    520522 
    521       IF (test==0) return 
    522523!=============================================================================== 
    523524! Send variables to history file - THIS PROCESS WILL BE MODEL SPECIFIC 
Note: See TracChangeset for help on using the changeset viewer.