Changeset 916 for codes/icosagcm/devel/src
- Timestamp:
- 06/18/19 14:17:55 (5 years ago)
- Location:
- codes/icosagcm/devel/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/diagnostics/compute_temperature.F90
r915 r916 1 1 MODULE compute_temperature_mod 2 USE earth_const, ONLY : cpp, cppv, kappa, Rd, Rv, preff, Treff, &3 caldyn_thermo, physics_thermo, &4 thermo_theta, thermo_entropy, thermo_ moist, thermo_fake_moist2 USE earth_const, ONLY : cpp, cppv, kappa, Rd, Rv, preff, Treff, nu, & 3 caldyn_thermo, physics_thermo, thermo_fake_moist, & 4 thermo_theta, thermo_entropy, thermo_variable_Cp, thermo_moist 5 5 USE grid_param 6 6 IMPLICIT NONE … … 79 79 temp_ik = Treff*exp((theta_ik + Rd*log(p_ik/preff))/cpp) 80 80 {% endcall %} 81 CASE(thermo_variable_Cp) 82 {% call loop_compute_temperature() %} 83 Cp_ik = nu*( theta_ik + Rd*log(p_ik/preff) ) 84 temp_ik = Treff* (Cp_ik/cpp)**(1./nu) 85 {% endcall %} 81 86 CASE(thermo_moist) 82 87 {% call loop_compute_temperature() %} … … 95 100 REAL(rstd),INTENT(IN) :: q(llm, primal_num, nqtot) 96 101 REAL(rstd),INTENT(INOUT) :: temp(llm, primal_num) 97 REAL(rstd) :: p_ik, theta_ik, temp_ik, qv, chi, Rmix 102 REAL(rstd) :: p_ik, theta_ik, temp_ik, qv, chi, Rmix, Cp_ik 98 103 DECLARE_INDICES 99 104 #include "../kernels_unst/compute_temperature.k90" … … 107 112 REAL(rstd),INTENT(INOUT) :: temp(iim*jjm,llm) 108 113 109 REAL(rstd) :: p_ik, theta_ik, temp_ik, qv, chi, Rmix 114 REAL(rstd) :: p_ik, theta_ik, temp_ik, qv, chi, Rmix, Cp_ik 110 115 INTEGER :: ij,l 111 116 #include "../kernels_hex/compute_temperature.k90" -
codes/icosagcm/devel/src/kernels_hex/compute_temperature.k90
r915 r916 52 52 END DO 53 53 END IF 54 CASE(thermo_variable_Cp) 55 DO l = ll_begin, ll_end 56 !DIR$ SIMD 57 DO ij=ij_begin, ij_end 58 p_ik = pmid(ij,l) 59 theta_ik = temp(ij,l) 60 qv = q(ij,l,1) ! water vapor mixing ratio = mv/md 61 Cp_ik = nu*( theta_ik + Rd*log(p_ik/preff) ) 62 temp_ik = Treff* (Cp_ik/cpp)**(1./nu) 63 temp(ij,l) = temp_ik 64 END DO 65 END DO 54 66 CASE(thermo_moist) 55 67 DO l = ll_begin, ll_end -
codes/icosagcm/devel/src/kernels_unst/compute_temperature.k90
r915 r916 60 60 !$OMP END DO 61 61 END IF 62 CASE(thermo_variable_Cp) 63 !$OMP DO SCHEDULE(STATIC) 64 DO ij = 1, primal_num 65 !DIR$ SIMD 66 DO l = 1, llm 67 p_ik = pmid(l,ij) 68 theta_ik = temp(l,ij) 69 qv = q(l,ij,1) ! water vapor mixing ratio = mv/md 70 Cp_ik = nu*( theta_ik + Rd*log(p_ik/preff) ) 71 temp_ik = Treff* (Cp_ik/cpp)**(1./nu) 72 temp(l,ij) = temp_ik 73 END DO 74 END DO 75 !$OMP END DO 62 76 CASE(thermo_moist) 63 77 !$OMP DO SCHEDULE(STATIC)
Note: See TracChangeset
for help on using the changeset viewer.