Changeset 35


Ignore:
Timestamp:
07/27/12 16:10:12 (12 years ago)
Author:
ymipsl
Message:

add compute_temperature2theta_rhodz functionnlity

YM

File:
1 edited

Legend:

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

    r19 r35  
    171171     
    172172  END SUBROUTINE compute_theta_rhodz2temperature 
    173    
     173 
     174  SUBROUTINE compute_temperature2theta_rhodz(ps,temp,theta_rhodz,offset) 
     175  USE icosa 
     176  USE pression_mod 
     177  USE exner_mod 
     178  IMPLICIT NONE 
     179    REAL(rstd),INTENT(IN) :: ps(iim*jjm) 
     180    REAL(rstd),INTENT(OUT) :: theta_rhodz(iim*jjm,llm) 
     181    REAL(rstd),INTENT(IN) :: temp(iim*jjm,llm) 
     182    INTEGER,INTENT(IN) :: offset 
     183    INTEGER :: i,j,ij,l 
     184    REAL(rstd) :: p(iim*jjm,llm+1) 
     185    REAL(rstd) :: pk(iim*jjm,llm) 
     186    REAL(rstd) :: pks(iim*jjm) 
     187 
     188    CALL compute_pression(ps,p,offset) 
     189    CALL compute_exner(ps,p,pks,pk,offset) 
     190         
     191    DO    l    = 1, llm 
     192      DO j=jj_begin-offset,jj_end+offset 
     193        DO i=ii_begin-offset,ii_end+offset 
     194          ij=(j-1)*iim+i 
     195!          temp(ij,l) = ( theta_rhodz(ij,l) / ((p(ij,l)-p(ij,l+1))/g) ) * pk(ij,l) / cpp 
     196          theta_rhodz(ij,l) = temp(ij,l) * ((p(ij,l)-p(ij,l+1))/g) / (pk(ij,l) / cpp ) 
     197        ENDDO 
     198      ENDDO 
     199    ENDDO 
     200     
     201  END SUBROUTINE compute_temperature2theta_rhodz 
     202    
    174203END MODULE theta2theta_rhodz_mod 
Note: See TracChangeset for help on using the changeset viewer.