Changeset 555 for codes/icosagcm/trunk/src/dynamics/caldyn_kernels_base.F90
- Timestamp:
- 09/18/17 17:03:05 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/dynamics/caldyn_kernels_base.F90
r548 r555 35 35 36 36 INTEGER :: i,j,ij,l 37 REAL(rstd) :: Rd, p_ik, exner_ik, temp_ik, qv, chi, Rmix 37 REAL(rstd) :: Rd, p_ik, exner_ik, temp_ik, qv, chi, Rmix, gv 38 38 INTEGER :: ij_omp_begin_ext, ij_omp_end_ext 39 39 … … 47 47 48 48 Rd = kappa*cpp 49 50 #ifdef CPP_DYSL 51 !#if 0 52 #include "../kernels/compute_geopot.k90" 53 #else 49 54 50 55 ! Pressure is computed first top-down (temporarily stored in pk) … … 158 163 END IF 159 164 165 #endif 166 160 167 !ym flush geopot 161 168 !$OMP BARRIER … … 297 304 REAL(rstd),INTENT(INOUT) :: dW(iim*jjm,llm+1) 298 305 ! local arrays 299 REAL(rstd) :: eta_dot(iim*jjm ) ! eta_dot in full layers300 REAL(rstd) :: wcov(iim*jjm ) ! covariant vertical momentum in full layers306 REAL(rstd) :: eta_dot(iim*jjm, llm) ! eta_dot in full layers 307 REAL(rstd) :: wcov(iim*jjm,llm) ! covariant vertical momentum in full layers 301 308 REAL(rstd) :: W_etadot(iim*jjm,llm) ! vertical flux of vertical momentum 302 309 ! indices and temporary values … … 306 313 CALL trace_start("compute_caldyn_vert_nh") 307 314 315 #ifdef CPP_DYSL 316 !#if 0 317 #include "../kernels/caldyn_vert_NH.k90" 318 #else 319 #define ETA_DOT(ij) eta_dot(ij,1) 320 #define WCOV(ij) wcov(ij,1) 321 308 322 DO l=ll_begin,ll_end 309 323 ! compute the local arrays … … 313 327 w_ij = .5*(W(ij,l)+W(ij,l+1))/mass(ij,l) 314 328 W_etadot(ij,l) = wflux_ij*w_ij 315 eta_dot(ij) = wflux_ij / mass(ij,l)316 wcov(ij) = w_ij*(geopot(ij,l+1)-geopot(ij,l))329 ETA_DOT(ij) = wflux_ij / mass(ij,l) 330 WCOV(ij) = w_ij*(geopot(ij,l+1)-geopot(ij,l)) 317 331 ENDDO 318 332 ! add NH term to du … … 320 334 DO ij=ij_begin,ij_end 321 335 du(ij+u_right,l) = du(ij+u_right,l) & 322 - .5*( wcov(ij+t_right)+wcov(ij)) &323 *ne_right*( eta_dot(ij+t_right)-eta_dot(ij))336 - .5*(WCOV(ij+t_right)+WCOV(ij)) & 337 *ne_right*(ETA_DOT(ij+t_right)-ETA_DOT(ij)) 324 338 du(ij+u_lup,l) = du(ij+u_lup,l) & 325 - .5*( wcov(ij+t_lup)+wcov(ij)) &326 *ne_lup*( eta_dot(ij+t_lup)-eta_dot(ij))339 - .5*(WCOV(ij+t_lup)+WCOV(ij)) & 340 *ne_lup*(ETA_DOT(ij+t_lup)-ETA_DOT(ij)) 327 341 du(ij+u_ldown,l) = du(ij+u_ldown,l) & 328 - .5*( wcov(ij+t_ldown)+wcov(ij)) &329 *ne_ldown*( eta_dot(ij+t_ldown)-eta_dot(ij))342 - .5*(WCOV(ij+t_ldown)+WCOV(ij)) & 343 *ne_ldown*(ETA_DOT(ij+t_ldown)-ETA_DOT(ij)) 330 344 END DO 331 345 ENDDO … … 346 360 END DO 347 361 END DO 362 363 #undef ETA_DOT 364 #undef WCOV 365 #endif 366 348 367 CALL trace_end("compute_caldyn_vert_nh") 349 368
Note: See TracChangeset
for help on using the changeset viewer.