Ignore:
Timestamp:
12/30/17 01:56:49 (7 years ago)
Author:
dubos
Message:

devel/hex : updated kernels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/kernels_hex/caldyn_solver.k90

    r578 r657  
    11   !-------------------------------------------------------------------------- 
    22   !---------------------------- caldyn_solver ---------------------------------- 
    3    IF (ll_begin==1) THEN 
    4       !DIR$ SIMD 
    5       DO ij=ij_begin_ext, ij_end_ext 
    6          m_il(ij,1) = .5*rhodz(ij,1) 
    7       END DO 
    8    END IF 
    9    DO l = ll_beginp1, ll_end 
    10       !DIR$ SIMD 
    11       DO ij=ij_begin_ext, ij_end_ext 
    12          m_il(ij,l) = .5*(rhodz(ij,l)+rhodz(ij,l-1)) 
    13       END DO 
    14    END DO 
    15    IF(ll_endp1==llm+1) THEN 
    16       !DIR$ SIMD 
    17       DO ij=ij_begin_ext, ij_end_ext 
    18          m_il(ij,llm+1) = .5*rhodz(ij,llm+1 -1) 
    19       END DO 
    20    END IF 
    21    ! 
    22    IF(tau>0) THEN ! solve implicit problem for geopotential 
    23       CALL compute_NH_geopot(tau,PHI_BOT_VAR, rhodz, m_il, theta, W, geopot) 
    24    END IF 
    253   ! 
    264   ! Compute pressure (pres) and Exner function (pk) 
     
    308   gamma = 1./(1.-kappa) 
    319   vreff = Rd*Treff/preff ! reference specific volume 
    32    Cvd = cpp-Rd 
     10   Cvd = 1./(cpp-Rd) 
     11   Rd_preff = kappa*cpp/preff 
    3312   DO l = ll_begin, ll_end 
    3413      !DIR$ SIMD 
     
    3615         SELECT CASE(caldyn_thermo) 
    3716         CASE(thermo_theta) 
    38             rho_ij = g*rhodz(ij,l)/(geopot(ij,l+1)-geopot(ij,l)) 
    39             X_ij = (cpp/preff)*kappa*theta(ij,l,1)*rho_ij 
     17            rho_ij = 1./(geopot(ij,l+1)-geopot(ij,l)) 
     18            rho_ij = rho_ij*g*rhodz(ij,l) 
     19            X_ij = Rd_preff*theta(ij,l,1)*rho_ij 
    4020            ! kappa.theta.rho = p/exner 
    4121            ! => X = (p/p0)/(exner/Cp) 
     
    4626            pk(ij,l) = cpp*((pres(ij,l)/preff)**kappa) ! Exner 
    4727         CASE(thermo_entropy) 
    48             rho_ij = g*rhodz(ij,l)/(geopot(ij,l+1)-geopot(ij,l)) 
    49             T_ij = Treff*exp( (theta(ij,l,1)+Rd*log(vreff*rho_ij))/Cvd ) 
     28            rho_ij = 1./(geopot(ij,l+1)-geopot(ij,l)) 
     29            rho_ij = rho_ij*g*rhodz(ij,l) 
     30            T_ij = Treff*exp( (theta(ij,l,1)+Rd*log(vreff*rho_ij))*Cvd ) 
    5031            pres(ij,l) = rho_ij*Rd*T_ij 
    5132            pk(ij,l) = T_ij 
Note: See TracChangeset for help on using the changeset viewer.