Changeset 724 for codes/icosagcm/devel
- Timestamp:
- 08/09/18 13:55:51 (6 years ago)
- Location:
- codes/icosagcm/devel/src/kernels_hex
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/kernels_hex/caldyn_wflux.k90
r624 r724 2 2 !---------------------------- caldyn_wflux ---------------------------------- 3 3 DO l = llm-1,1,-1 4 !DIR$ SIMD 4 5 DO ij=ij_omp_begin,ij_omp_end 5 6 ! cumulate mass flux convergence from top to bottom … … 7 8 END DO 8 9 END DO 10 !DIR$ SIMD 9 11 DO ij=ij_omp_begin,ij_omp_end 10 12 dmass_col(ij) = convm(ij,1) 11 13 END DO 12 14 DO l = 2,llm 15 !DIR$ SIMD 13 16 DO ij=ij_omp_begin,ij_omp_end 14 17 ! Compute vertical mass flux (l=1,llm+1 set to zero at init) -
codes/icosagcm/devel/src/kernels_hex/compute_NH_geopot.k90
r657 r724 9 9 ! compute Phi_star 10 10 DO l = 1,llm+1 11 !DIR$ SIMD 11 12 DO ij=ij_omp_begin_ext,ij_omp_end_ext 12 13 Phi_star_il(ij,l) = Phi_il(ij,l) + tau*g2*(W_il(ij,l)/m_il(ij,l)-tau) … … 19 20 CASE(thermo_theta) 20 21 DO l = 1,llm 22 !DIR$ SIMD 21 23 DO ij=ij_omp_begin_ext,ij_omp_end_ext 22 24 rho_ij = (g*m_ik(ij,l))/(Phi_il(ij,l+1)-Phi_il(ij,l)) … … 29 31 CASE(thermo_entropy) 30 32 DO l = 1,llm 33 !DIR$ SIMD 31 34 DO ij=ij_omp_begin_ext,ij_omp_end_ext 32 35 rho_ij = (g*m_ik(ij,l))/(Phi_il(ij,l+1)-Phi_il(ij,l)) … … 44 47 ! Solve -A(l-1)x(l-1) + B(l)x(l) - A(l)x(l+1) = R(l) using Thomas algorithm 45 48 ! Compute residual R_il and B_il 49 !DIR$ SIMD 46 50 DO ij=ij_omp_begin_ext,ij_omp_end_ext 47 51 ! bottom interface l=1 … … 52 56 END DO 53 57 DO l = 2,llm 58 !DIR$ SIMD 54 59 DO ij=ij_omp_begin_ext,ij_omp_end_ext 55 60 ! inner interfaces … … 63 68 END DO 64 69 END DO 70 !DIR$ SIMD 65 71 DO ij=ij_omp_begin_ext,ij_omp_end_ext 66 72 ! top interface l=llm+1 … … 74 80 ! C(0)=0, C(l) = -A(l) / (B(l)+A(l-1)C(l-1)), 75 81 ! D(0)=0, D(l) = (R(l)+A(l-1)D(l-1)) / (B(l)+A(l-1)C(l-1)) 82 !DIR$ SIMD 76 83 DO ij=ij_omp_begin_ext,ij_omp_end_ext 77 84 X_ij = 1./B_il(ij,1) … … 80 87 END DO 81 88 DO l = 2,llm 89 !DIR$ SIMD 82 90 DO ij=ij_omp_begin_ext,ij_omp_end_ext 83 91 X_ij = 1./( B_il(ij,l) + A_ik(ij,l-1)*C_ik(ij,l-1) ) … … 86 94 END DO 87 95 END DO 96 !DIR$ SIMD 88 97 DO ij=ij_omp_begin_ext,ij_omp_end_ext 89 98 X_ij = 1./( B_il(ij,llm+1) + A_ik(ij,llm+1 -1)*C_ik(ij,llm+1 -1) ) … … 97 106 END DO 98 107 DO l = llm,1,-1 108 !DIR$ SIMD 99 109 DO ij=ij_omp_begin_ext,ij_omp_end_ext 100 110 ! Back substitution at lower interfaces -
codes/icosagcm/devel/src/kernels_hex/compute_geopot.k90
r563 r724 4 4 CASE(thermo_boussinesq) 5 5 ! use hydrostatic balance with theta*rhodz to find pk (=Lagrange multiplier=pressure) 6 !DIR$ SIMD 6 7 DO ij=ij_omp_begin_ext,ij_omp_end_ext 7 8 pk(ij,llm) = ptop + .5*g* theta(ij,llm,1)*rhodz(ij,llm) 8 9 END DO 9 10 DO l = llm-1,1,-1 11 !DIR$ SIMD 10 12 DO ij=ij_omp_begin_ext,ij_omp_end_ext 11 13 pk(ij,l) = pk(ij,l+1) + (.5*g)*( theta(ij,l,1)*rhodz(ij,l) + theta(ij,l+1,1)*rhodz(ij,l+1) ) … … 13 15 END DO 14 16 IF(caldyn_eta == eta_lag) THEN 17 !DIR$ SIMD 15 18 DO ij=ij_omp_begin_ext,ij_omp_end_ext 16 19 ps(ij) = pk(ij,1) + .5*g* theta(ij,1,1)*rhodz(ij,1) … … 20 23 ! specific volume 1 = dphi/g/rhodz 21 24 DO l = 1,llm 25 !DIR$ SIMD 22 26 DO ij=ij_omp_begin_ext,ij_omp_end_ext 23 27 geopot(ij,l+1) = geopot(ij,l) + g*rhodz(ij,l) … … 25 29 END DO 26 30 CASE(thermo_theta) 31 !DIR$ SIMD 27 32 DO ij=ij_omp_begin_ext,ij_omp_end_ext 28 33 pk(ij,llm) = ptop + .5*g* rhodz(ij,llm) 29 34 END DO 30 35 DO l = llm-1,1,-1 36 !DIR$ SIMD 31 37 DO ij=ij_omp_begin_ext,ij_omp_end_ext 32 38 pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l) + rhodz(ij,l+1) ) … … 34 40 END DO 35 41 IF(caldyn_eta == eta_lag) THEN 42 !DIR$ SIMD 36 43 DO ij=ij_omp_begin_ext,ij_omp_end_ext 37 44 ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1) … … 39 46 END IF 40 47 DO l = 1,llm 48 !DIR$ SIMD 41 49 DO ij=ij_omp_begin_ext,ij_omp_end_ext 42 50 p_ik = pk(ij,l) … … 48 56 END DO 49 57 CASE(thermo_entropy) 58 !DIR$ SIMD 50 59 DO ij=ij_omp_begin_ext,ij_omp_end_ext 51 60 pk(ij,llm) = ptop + .5*g* rhodz(ij,llm) 52 61 END DO 53 62 DO l = llm-1,1,-1 63 !DIR$ SIMD 54 64 DO ij=ij_omp_begin_ext,ij_omp_end_ext 55 65 pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l) + rhodz(ij,l+1) ) … … 57 67 END DO 58 68 IF(caldyn_eta == eta_lag) THEN 69 !DIR$ SIMD 59 70 DO ij=ij_omp_begin_ext,ij_omp_end_ext 60 71 ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1) … … 62 73 END IF 63 74 DO l = 1,llm 75 !DIR$ SIMD 64 76 DO ij=ij_omp_begin_ext,ij_omp_end_ext 65 77 p_ik = pk(ij,l) … … 71 83 END DO 72 84 CASE(thermo_moist) 85 !DIR$ SIMD 73 86 DO ij=ij_omp_begin_ext,ij_omp_end_ext 74 87 pk(ij,llm) = ptop + .5*g* rhodz(ij,llm)*(1.+theta(ij,llm,2)) 75 88 END DO 76 89 DO l = llm-1,1,-1 90 !DIR$ SIMD 77 91 DO ij=ij_omp_begin_ext,ij_omp_end_ext 78 92 pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l)*(1.+theta(ij,l,2)) + rhodz(ij,l+1)*(1.+theta(ij,l+1,2)) ) … … 80 94 END DO 81 95 IF(caldyn_eta == eta_lag) THEN 96 !DIR$ SIMD 82 97 DO ij=ij_omp_begin_ext,ij_omp_end_ext 83 98 ps(ij) = pk(ij,1) + .5*g* rhodz(ij,1)*(1.+theta(ij,1,2)) … … 85 100 END IF 86 101 DO l = 1,llm 102 !DIR$ SIMD 87 103 DO ij=ij_omp_begin_ext,ij_omp_end_ext 88 104 p_ik = pk(ij,l) -
codes/icosagcm/devel/src/kernels_hex/energy_fluxes.k90
r601 r724 3 3 ! First diagnose geopotential and temperature, column-wise 4 4 !$OMP BARRIER 5 !DIR$ SIMD 5 6 DO ij=ij_omp_begin_ext,ij_omp_end_ext 6 7 pk(ij,llm) = ptop + .5*g*rhodz(ij,llm) 7 8 END DO 8 9 DO l = llm-1,1,-1 10 !DIR$ SIMD 9 11 DO ij=ij_omp_begin_ext,ij_omp_end_ext 10 12 pk(ij,l) = pk(ij,l+1) + (.5*g)*( rhodz(ij,l)+rhodz(ij,l+1) ) … … 16 18 CASE(thermo_theta) 17 19 DO l = 1,llm 20 !DIR$ SIMD 18 21 DO ij=ij_omp_begin_ext,ij_omp_end_ext 19 22 p_ik = pk(ij,l) … … 28 31 CASE(thermo_entropy) 29 32 DO l = 1,llm 33 !DIR$ SIMD 30 34 DO ij=ij_omp_begin_ext,ij_omp_end_ext 31 35 p_ik = pk(ij,l)
Note: See TracChangeset
for help on using the changeset viewer.