Coriolis force computed twice without momentum advection (ln_dynadv_OFF = T) and mixed enstrophy/energy conserving scheme (ln_dynvor_mix = T)
Context
ln_dynadv_OFF = T
(no momentum advection)
AND
ln_dynvor_mix = T
(enstrophy/energy conserving scheme)
Analysis
ln_dynvor_mix = T
is a combination of energy conserving scheme for planetary vorticity term and enstrophy conserving scheme for relative vorticity. Since linear dynamics are considered, this scheme should revert to ln_dynvor_ene = T
.
However, in dyn_vor
routine, there are still two calls to vor_ene
and vor_ens
for both the planetary vorticity term. e.g.:
CASE( np_MIX )
CALL vor_ens( kt, Kmm, nrvm, puu(:,:,:,Kmm) , pvv(:,:,:,Kmm) , puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )
CALL vor_ene( kt, Kmm, ncor, puu(:,:,:,Kmm) , pvv(:,:,:,Kmm) , puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )
since nrvm = ncor
in the special case of ln_dynadv_OFF = T
Fix
Skip the call to vor_ens
in the linear case, e.g., modify the piece of code above as:
IF( n_dynadv /= np_LIN_dyn ) CALL vor_ens( kt, Kmm, nrvm, puu(:,:,:,Kmm) , pvv(:,:,:,Kmm) , puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )
You can
-
📋 Copy code blocks (```fortran ...```) or diff outputs (```diff ...```) -
📎 Include files -
🔗 Add external links.