Version 3 (modified by gm, 15 years ago) (diff) |
---|
Miscellaneous Items
Last edited Timestamp?
Purpose:
Series of various improvements that have not been introduced in the schedule.
1. Time step management
The size of the time step may be different at the first time step (nit000), whether an Euler start is used or not (neuler namelist parameter)
This means that neuler appears and is used in all the following modules :
C1D_SRC/dynnxt_c1d.F90
NST_SRC/agrif_opa_interp.F90
OFF_SRC/DOM/dom_oce.F90
OPA_SRC/DOM/dom_oce.F90 , domvvl.F90
OPA_SRC/DYN/dynnxt.F90 , dynspg.F90 , dynspg_flt.F90 , dynspg_rl.F90 , dynspg_ts.F90 , dynzdf.F90 , wzvmod.F90
OPA_SRC/OBC/obcdta.F90 , obcspg.F90
OPA_SRC/SOL/solmat.F90
OPA_SRC/TRA/traadv_muscl.F90 , traadv_muscl2.F90 , traadv_qck.F90 , traadv_tvd.F90 , traadv_ubs.F90 , traldf.F90 , tranxt.F90 , trazdf.F90
OPA_SRC/TRD/trdmod.F90
TOP_SRC/LOBSTER/trcexp.F90
TOP_SRC/TRP/trcadv_tvd.F90 , trcnxt.F90 , trczdf_exp.F90 , TRP/trczdf_imp.F90 , trczdf_iso.F90 , trczdf_iso_vopt.F90
OPA_SRC/istate.F90, restart.F90
TOP_SRC/oce_trc.F90
A solution is to introduce in OPA/SRC/DOM/dom_oce.F90 two new variable (r2dt_dyn, r2dt_tra) which are updted once for all in step.F90 module or even better in opa.F90
In dom_oce.F90
!!---------------------------------------------------------------------- !! time domain !!---------------------------------------------------------------------- ... REAL(wp) :: r2dt_dyn !: time-step, =2*rdt , except at nit000 (=rdt ) if neuler=0 REAL(wp), DIMENSION(jpk) :: r2dt_tra !: time-step, =2*rdttra, except at nit000 (=rdttra) if neuler=0
In opa.F90 the correct time step is defined during the first 2 time-step only:
istp = nit000 IF( lk_c1d ) THEN ! 1D configuration (no AGRIF zoom) ! DO WHILE ( istp <= nitend .AND. nstop == 0 ) IF( neuler == 0 .AND. kt == nit000 ) THEN ! nit000 with Euler time stepping r2dt_dyn = rdt r2dt_tra(:) = rdttra(:) ELSEIF( kt <= nit000 + 1) THEN ! nit000(+1) without Euler or nit000 + 1 with Euler r2dt_dyn = 2. * rdt r2dt_tra(:) = 2. * rdttra(:) ENDIF CALL stp_c1d( istp ) istp = istp + 1 END DO ELSE ! 3D ocean with or without AGRIF zoom ! DO WHILE ( istp <= nitend .AND. nstop == 0 ) IF( neuler == 0 .AND. kt == nit000 ) THEN ! nit000 with Euler time stepping r2dt_dyn = rdt r2dt_tra(:) = rdttra(:) ELSEIF( kt <= nit000 + 1) THEN ! nit000(+1) without Euler or nit000 + 1 with Euler r2dt_dyn = 2. * rdt r2dt_tra(:) = 2. * rdttra(:) ENDIF #if defined key_agrif CALL Agrif_Step( stp ) #else CALL stp( istp ) #endif istp = istp + 1 IF( lk_mpp ) CALL mpp_max( nstop ) END DO ENDIF
and then remove neuler case from all other routine where it appears. Indeed, in the euler initialisation 'before fields' = 'now fields'so the computation is OK.
CAUTION : check potential problem in daymod.F90(use rdt, rdttra, not r2dt_dyn or r2dt_tra)
2. Namelist naming convention
Once for all, the namelist naming convention should be applied to all the variables that appear in all the namelists.
Recall : namelist naming convention — a namelist variable name should start with the following prefix:
namelist integer real logical character structure etc... variable nn_ rn_ ln_ cn_ sn_ ...
3. Tricky trick on mbathy
A tricky trick on mbathy have been introduced 20 years ago! The read mbathy field is modified in the model, and even worse it take different alues in different part of the code (domhgr, dommsk and all other routines called in step). tricky tricks are always dangerous and source of numerous bugs. They should be removed from the system.
here, the forseen solution is to introduce in domzgr.F90, arrays known by all modules that defined the last ocean level at t, u, v, w point. Such arrays already exist (at least some of them) in numerous places in the code, see for example mbatu, mbatv in zpshde.F90, or are recomputed at each time step (see dynhpf, trabbc, trabbl, traldf_iso, ...).
4. Achieved the time stepping before dynnxt
In a mirror of the tracer time stepping strategy, the momentum time stepping can be achieved in dynzdf, or in dynspg so that dynnxt only perform the filter and the swap.
A priori faster, much simpler especially with vvl and the plug-in of AGRIF, BDY and OBC.
5. Isopycnal Slopes…
Introduce in ldfslp the call to eos et zpshde at before time-step (not bn2 as it is used in zdfevd) (simplification of step)
change the computation of the slopes from the use of rdn, bn2 to the use of alfbet computed at u-, v- and w-points using their local pressure. A priori, faster and adapted for the crazy vertical coordinate developped by Matthieu Leclair. It also prefigures the Griffies operator.
6. Revised ZDF
With zdftke2 in the process of becoming the standard turbulent closure scheme, a wide horizontal stencil is no more required to compute avmu and avmv. They can be evaluated by just using the 2 neighbouring avm at w-point. Therefore, all zdf.. can be modified to compute only momentum and tracer turbulent mixing coefficient at w-point. avmu, avmv can be removed and in dynzdf_exp and dynzdf_imp a averaged value of avm is used instead of avmu and avmv arrays.
This will save between 6 and 12 call to lbc_lnk by time step [[BR]]
The pending issue is that the algorithm of the KPP scheme should be revisited so that it becomes stable without any averaging. Similarly for the GLS scheme, but this should be OK, as the turbulent closure available in GLS come from Burchard, the guy who has found how to stabilise the TKE scheme without a wide horizontal averaging procedure.
7. others…
Attachments (2)
-
zdf_oce.F90
(8.0 KB) -
added by gm 15 years ago.
merge zdfini.F90 with zdf_oce.F90
-
zdf_oce+style.F90
(7.9 KB) -
added by gm 15 years ago.
merge zdfini.F90 with zdf_oce.F90 ===> with style improvement
Download all attachments as: .zip