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.
2009WP/2009Stream3/VVL – NEMO
wiki:2009WP/2009Stream3/VVL

Version 10 (modified by gm, 15 years ago) (diff)

--


Restoring variable volume option (key_vvl)


Last edited Timestamp?

This page gives a non exhaustive description of the work done to restore VVL option from NEMO version 3.1
At this stage (april 2009) :

  • variable volume option can be used with either z, zps and s coordinate in fitered free surface
  • time splitting issue is under investigation

1. Getting the code

At this time (04-20-09), the work has been done on a branch starting from svn rev1359.

  • Outside modipsl :

svn co --username nemo_user http://forge.ipsl.jussieu.fr/nemo/svn/branches/dev_004_VVL/NEMO

  • Using modipsl :

Edit modipsl/util/mod.def and replace tags/nemo_v3_1 by branches/dev_004_VVL in NEMO section

Note that this branch has been created some time after nemo_v3_1 release (svn rev1332) so it includes intermediate developments and correction not dealing with vvl, including:

  • complete work on time origin in outputs (ticket:335) + downward vertical axis (ticket:357)
  • Update lib_mpp, see ticket #379
  • add s-sigma coordinates option, ticket #378
  • Update lib_mpp, see ticket #379 -first implementation of iom_put, see ticket:387
  • update of diaptr

In addition, the VVL has been synchronized with the trunk :

  • dev_004_VVL:sync: see ticket #417 : corrections for IOM
  • dev_004_VVL:sync: synchro with trunk, see ticket #361 : correction in diaptr
  • dev_004_VVL:sync: synchronisation with the trunk, see ticket #388 : bound salt exchange


2. Code organisation

2.1 Flow chart

(original from Mathieu Leclair)
NEMO/OPA flowchart

2.2 Sea surface height repartition

Repartition on the whole water column, so key_sigma_vll has been suppressed. Reference coordinate is referred as e3t_0 for instance, and pre-processing (in domzgr_substitute.h90) is used to define before, now, after scale factors, for instance :
# define fsdept_n(i,j,k) (fsdept_0(i,j,k)*(1+sshn(i,j)*mut(i,j,k)))

Note: we shouldn't need 3d array mut (muu, muv) , but the model results change with 2D arrays.


3. Modified routines

  • domvvl is now used only for initialisation (called from istate) (===> should be better to call it from domain....)
  • dynspg_flt, dynspg_ts, dynspg_exp : no more update of ssh, just barotropic contribution for velocities
  • trazdf_exp, trazdf_imp : ponderation by the correct scale factors
  • wzvmod : suprresion of wzv_mod routine, addition of ssh_wzv to compute ssh after from the ssh equation, update the vertical coordinate and compute vertical velocity, addition of ssh_nxt for ssh time stepping
  • dynnxt, tranxt : rewritting, take vvl case into account
  • zdfevd : for stability issue, test to apply enhanced diffusion has to be performed on now Brunt-Vaisala frequency


4. Cautions

  • use s-coordinate pressure gradient when using variable volume (alternative scheme from Jerome is to be considered)
  • the time splitting is minimalistic (i.e. Leap-frog + asselin). Predictor-corrector scheme as in ROMS will be incorporated (see jerome's work)
  • sea ice and vvl : the sea-surface boundary condition is wrong. The salt flux exchanged with sea-ice should be added to the salinity equation
  • vertical velocity in output is now i.e. computed at the begining of step, not at the end


5. To be done

5.1 bug corrections

  • correct forcing term in salinity equation: remplace emps by fsalt, a salt flux so that :

in vvl case d(e3 S)/dt = ... + fsalt (salt flux only)
without vvl d(e3 S)/dt = ... + fsalt + emp * SSS (salt flux + concentration/dillution effect)
see 2009WP/2009Stream3/LeapFrogC

  • correct the left-hand-side of the momentum equation in vector invariant formulation :

time derivative of e3 should not be not included in the left hand side of the momentum equation
solve dU/dt = ... and not d( e3 U)/dt = ... ).
Change to be done in both dynnxt AND dynspg (_ts and flt)

  • ensure that BDY and OBC are working with the new time-stepping strategy
  • label all fse3 with its adequate time label (before, now, after) everywhere in the code. Some may be wrong today.
  • suppress mu* 3D arrays, and anly use instead 2D arrays

5.2 improvments

  • Add the Leclair-Madec conservative leap-Frog in order to enable strict conservation tests

1- shift all ocean forcing term to kt+1/2 (change in sbcmod and trasbc)
2- remove the forcing from the asselin filter (change in tranxt)

  • replace the leap-frog by a predictor-corrector shceme for time splitting (as Jérome does)
  • develop a pressure gradient algorithm specific and more accurate for zps-vvl (not only the use of the standard s-coord pressure gradient) (see Jérome work)
  • Simplification for code :

work on the tracer content tendancy everywhere, not on the tracer tendency
move the time stepping of the momentum equation at the end of dynspg_ts and dynspg_exp
put the call to domvvl in domain.F90 (not in istate)

  • embedded sea-ice (Gurvan and Yevgeni) : introduce 2 others ways of nandling sea-ice (in both vvl and constant cases):

1- standard case: levitating sea-ice with virtual salt flux : ice-ocean exchange are salt flux (true + C/D effct) only no volume flux 2- first new case: levitating sea-ice with salt conservation : ice-ocean exchange true salt flux + volume flux, but not suface pressure associated to sea-ice 3- 2nd new case: full sea-ice embeddement : ice-ocean exchange true salt flux + volume flux + surface pressure gradient associated with the mass of ice+snow

  • introduce a optional Roullet-madec damping force in the time splitting routine (no more use of elliptic solver)


6. Tests

6.1 Paris

  • ORCA2_LIM zps fixed volume and filtred free surface
  • ORCA2_LIM zps variable volume and filtred free surface
  • ORCA2_LIM zps fixed volume and time splitting free surface
  • ORCA2_LIM zps variable volume and time splitting free surface
  • restartability
  • Agrif test case
  • parallelisation
  • conservation (with Asselin filter to 0 and ice tracer fluxes to 0)

Attachments (5)

Download all attachments as: .zip