#1935 closed Bug (fixed)
Kinetic Energy calculation is wrong
Reported by: | timgraham | Owned by: | nemo |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | OCE | Version: | v3.6 |
Severity: | Keywords: | eken DIA diagnostics | |
Cc: |
Description (last modified by nicolasmartin)
Context
The calculation of KE in diawri.F90 is not correct. Also note that using the short name "eken" is misleading as this is not the Kinetic Energy and not the Eddy Kinetic Energy
Analysis
In the code at line 302 we have
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 ! 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) ) & & * zztmp ! rke(ji,jj,jk) = 0.5_wp * ( zztmpx + zztmpy )
i.e. velocity * velocity * length * thickness / (area * thickness) giving units of m/s2 rather than m2/s2 as we would expect.
Fix
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) * 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 ! rke(ji,jj,jk) = 0.5_wp * ( zztmpx + zztmpy )
Commit History (3)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
8473 | timgraham | 2017-08-30T11:38:39+02:00 | Corrected fix for #1935 (not using variables that don't exist in nemo_v3_6_stable) |
8465 | timgraham | 2017-08-25T10:34:47+02:00 | |
8464 | timgraham | 2017-08-25T10:31:40+02:00 |
Change History (4)
comment:1 Changed 7 years ago by timgraham
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 7 years ago by arsouze
- Resolution fixed deleted
- Status changed from closed to reopened
It looks like variables r1_e1e2t, e1e2u, e1e2v are not defined in NEMO_v3_6_STABLE.
comment:3 Changed 7 years ago by timgraham
- Resolution set to fixed
- Status changed from reopened to closed
Sorry about that. Now fixed at r8473
comment:4 Changed 7 years ago by nicolasmartin
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
Fixed at r8464 of nemo_v3_6_stable and r8465 in the trunk