New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ticket/1674_TMX – NEMO
wiki:ticket/1674_TMX

Version 6 (modified by gm, 8 years ago) (diff)

--

Last edited Timestamp?

Author : Casimir de Lavergne, Gurvan Madec

ticket : #1674

Branch : 2015/dev_r6287_ZDFTMX_new


Description

Introduce in the v3.6_STABLE a non intrusive version of a new parameterization of internal wave-driven mixing.

The original parameterization that has been developed is implemented with the two following undesirable features for the v3.6_STABLE:
(1) a module replacing the existing zdftmx.F90 module (impossible to use the old param);
(2) avt and avs arrays always defined (suppression of zdfddm_substitute.h90 which introduces changes in ~25 modules)

Here, the parameterization is introduced as an additional option, making both the current parameterization and the new one available, and the new one will only be available if double diffusion mixing is activated (key_zdfddm defined). Therefore changes in the code are restricted to the namlist and zdftmx.F90 (+ an update of the ZDF chapter of the Documentation).


Strategy

In Changeset 6294 the following changes have been made :

(1) in zdftmx: introduce in zdftmx.F90 a new CPP key : key_zdftmx_new so that:

MODULE zdftmx
...
#if defined key_zdftmx   ||   defined key_esopa
   !!----------------------------------------------------------------------
   !!   'key_zdftmx'                                  Tidal vertical mixing   <<<==OLD version
   !!----------------------------------------------------------------------
   !!   zdf_tmx      : global     momentum & tracer Kz with tidal induced Kz
   !!   tmx_itf      : Indonesian momentum & tracer Kz with tidal induced Kz 
   !!   zdf_tmx_init : initialisation of tidal induced Kz
   !!----------------------------------------------------------------------
   ...
   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftmx = .TRUE.    !: tidal mixing flag     <<=== same flag
   ...
#elif defined key_zdftmx_new
   !!----------------------------------------------------------------------
   !!   'key_zdftmx_new'                          New Tidal vertical mixing   <<<==NEW version
   !!----------------------------------------------------------------------
   !!   zdf_tmx      : global     momentum & tracer Kz with tidal induced Kz
   !!   zdf_tmx_init : initialisation of tidal induced Kz
   !!----------------------------------------------------------------------
   ...
   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftmx = .TRUE.    !: tidal mixing flag     <<=== same flag
   ...
#else
   !!----------------------------------------------------------------------
   !!   Default option          Dummy module                NO Tidal MiXing
   !!----------------------------------------------------------------------
   ...
#endif

(2) add in the new param a test to stop the code if key_zdfddm not defined)

(3) introduce in the Namelist_ref, a new namelist: namzdf_tmx_new used if key_zdftmx_new and key_zdfddm are defined. Update field_def.xml with new possible output

(4) introduce changes in in both zdfddm.F90 and zdftke.F90 (changes surrounded by #ifdef key_zdftmx_new and #endif : no changes when the key is not defined)

(5) add in the input file of both ORCA2 and ORCA1 the input files of the new TMX