update and automate dynspg_ts parameters
Simplify namdyn_spg
Clem proposed to replace
!-----------------------------------------------------------------------
&namdyn_spg ! surface pressure gradient (default: NO selection)
!-----------------------------------------------------------------------
ln_dynspg_exp = .false. ! explicit free surface
ln_dynspg_ts = .false. ! split-explicit free surface
ln_bt_fw = .true. ! Forward integration of barotropic Eqs.
ln_bt_av = .true. ! Time filtering of barotropic variables
nn_bt_flt = 1 ! Time filter choice = 0 None
! ! = 1 Boxcar over nn_e sub-steps
! ! = 2 Boxcar over 2*nn_e " "
ln_bt_auto = .true. ! Number of sub-step defined from:
rn_bt_cmax = 0.8 ! =T : the Maximum Courant Number allowed
nn_e = 30 ! =F : the number of sub-step in rn_Dt seconds
rn_bt_alpha = 0. ! Temporal diffusion parameter (if ln_bt_av=F)
/
with
!-----------------------------------------------------------------------
&namdyn_spg ! surface pressure gradient (default: NO selection)
!-----------------------------------------------------------------------
ln_dynspg_exp = .false. ! explicit free surface
ln_dynspg_ts = .false. ! split-explicit free surface
ln_bt_fw = .true. ! Forward integration of barotropic Eqs.
nn_bt_flt = 1 ! Add dissipation with either nn_e width boxcar averaging
! ! or dissipative Forward-Backward
! ! = 0 None
! ! = 1 Boxcar over nn_e sub-steps
! ! = 2 Boxcar over 2*nn_e " "
! ! = 3 Temporal dissipation (Demange 2019)
ln_bt_auto = .true. ! Number of sub-step defined from:
rn_bt_cmax = 0.8 ! =T : the Maximum Courant Number allowed
nn_e = 30 ! =F : the number of sub-step in rn_Dt seconds
rn_bt_alpha = 0. ! Temporal diffusion parameter (if nn_bt_flt=3)
Automate alpha and Nsplit computation wrt Lemarié 2024
In Florian's paper.
Nsplit = Dt / sqrt(1/dx**2 + 1/dy**2) * c0 / alpha_gw
theta = (N * c0 / g)**2 * ( Nsplit / 6 )
In NEMO.
Cc0 = Dt / sqrt(1/dx**2 + 1/dy**2) * c0
Cc0k = Cc0 * N/g*h
nn_e = 240 * Cc0 / (sqrt( 49182 * Cc0**2 - xxx * Cc0k**4 ) - 35 Cc0k**2
alpha = bn2 * ht_0 / g * nn_e / 12
Rk : In NEMO bn2 (rank=0) ~ 8 * 10-4 it is quite big compare to the max value of the paper. Given the formula of annex B2 of Lemarié 2024, alpha is huge (alpha ~ 2).
The question is how to define a proper value for N**2 (bn2) otherwise nn_e is Nan !