!-------------------------------------------------------------------------- !---------------------------- compute_hydrostatic_pressure ---------------------------------- SELECT CASE(caldyn_thermo) CASE(thermo_boussinesq) ! use hydrostatic balance with theta*rhodz to find pk (=Lagrange multiplier=pressure) !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext pk(ij,llm) = ptop + .5*g* theta_rhodz(ij,llm,1) END DO DO l = llm-1,1,-1 !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext pk(ij,l) = pk(ij,l+1) + (.5*g)*( theta_rhodz(ij,l,1) + theta_rhodz(ij,l+1,1) ) END DO END DO IF(caldyn_eta == eta_lag) THEN !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext ps(ij) = pk(ij,1) + .5*g* theta_rhodz(ij,1,1) END DO END IF CASE(thermo_theta, thermo_entropy, thermo_variable_Cp) !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext pk(ij,llm) = ptop + .5*g* rhodz(ij,llm) END DO DO l = llm-1,1,-1 !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l) + rhodz(ij,l+1) ) END DO END DO IF(caldyn_eta == eta_lag) THEN !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1) END DO END IF CASE(thermo_moist) !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext pk(ij,llm) = ptop + .5*g* (rhodz(ij,llm)+theta_rhodz(ij,llm,2)) END DO DO l = llm-1,1,-1 !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext pk(ij,l) = pk(ij,l+1) + (.5*g)*( (rhodz(ij,l)+theta_rhodz(ij,l,2)) + (rhodz(ij,l+1)+theta_rhodz(ij,l+1,2)) ) END DO END DO IF(caldyn_eta == eta_lag) THEN !DIR$ SIMD DO ij=ij_begin_ext,ij_end_ext ps(ij) = pk(ij,1) + .5*g* (rhodz(ij,1)+theta_rhodz(ij,1,2)) END DO END IF END SELECT !---------------------------- compute_hydrostatic_pressure ---------------------------------- !--------------------------------------------------------------------------