# Changeset 8465

Ignore:
Timestamp:
2017-08-25T10:34:47+02:00 (4 years ago)
Message:

#1934 and #1935 - correct calculation of KE in diawri.F90

File:
1 edited

Unmodified
Added
Removed
• ## trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

 r7753 ! IF ( iom_use("eken") ) THEN rke(:,:,jk) = 0._wp                               !      kinetic energy rke(:,:,jpk) = 0._wp                               !      kinetic energy DO jk = 1, jpkm1 DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1   ! vector opt. zztmp   = 1._wp / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) ) zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)    & &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) )  & zztmp   = r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e1e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)    & &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e1e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) )  & &          *  zztmp ! zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * e3v_n(ji,jj-1,jk)    & &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) )  & zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1e2v(ji,jj-1) * e3v_n(ji,jj-1,jk)    & &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1e2v(ji,jj  ) * e3v_n(ji,jj  ,jk) )  & &          *  zztmp !
Note: See TracChangeset for help on using the changeset viewer.