Hi all,
I am developing a quasi-barotropic model with NEMO 4.2 (minimal vertical structure—e.g., top and bottom layers only—with z* coordinates and partial steps, non-linear free surface, initialized with constant T and S across the whole domain, non-linear bottom friction, no explicit tides included, SEOS, etc.).
The model runs properly when no wind forcing is applied. It also behaves as expected when forced with atmospheric pressure and/or tides. However, as soon as I include wind forcing, it loses barotropicity: after a few hours, tracer fields are no longer constant.
To address this, I considered activating the ln_traadv_OFF flag (I am currently using ln_traadv_mus). However, when I enable it, the model blows up in salinity at several points in the domain after only a few time steps. This happens even without any external forcing. I also tested using a linear free surface instead of a non-linear one, but it did not resolve the issue.
Has anyone used ln_traadv_OFF in realistic simulations, or was it developed only for idealized experiments? What could be the cause of this issue?
Thank you all in advance for your help,
Anna Chiara Goglio
Hi Anna,
I’m also in the process of developing a fairly similar configuration, although for sigma coordinates, from NEMO/Main (so NEMO v5+). I’m using a recipe from previous work at earlier NEMO versions. It might be helpful to share our approaches. I’m not yet certain that this recipe will work, so “take it with a pinch of salt”…
[I would also be grateful if you, or others, have any comments or suggestions for improvements to the recipe.]
-
Define a new variable, ‘ln_2D’, with default=.false., in namelist_ref.
-
Bypass the update of steric correction and Brunt-Vaisala frequency in step.F90. [now stprk3.F90]
-
Bypass the vertical physics routines in zdfphy.F90, except for bottom friction (which the 2D barotropic configuration uses).
-
Set the initial velocity to zero and T & S to constant in istate.F90.
-
Bypass the calls to various tracer subroutines in nemogcm.F90 (ldf_tra_init (lateral ocean tracer physics), tra_qst_init (penetrative solar radiation), tra_bbc_init (bottom heat flux), tra_bbl_init (advective (and/or diffusive) bottom boundary layer scheme), tra_dmp_init (internal tracer damping), tra_adv_init (horizontal & vertical advection), tra_ldf_init (lateral mixing)).
-
In domain.F90, add ‘ln_2d’ as a new variable within the &namdom namelist. Also, write a message to stdout, listing ln_2d and its actual value in the namelist (i.e. T or F).
-
Make a new usrdef_istate.F90, in which we set a constant T & S, to use for testing when ln_2d=.false. – i.e. when using NEMO in 3D.
-
Add a line to dtatsd.F90 that writes out info about the config being 2D, started from rest and with constant T&S.
-
Add a line to domzgr.F90 which enforces a mandatory check that 2D mode (ln_2D=T) is used with sigma coordinates.
-
Define the new variable, ‘ln_2D’, in dom_oce.F90.
-
Modify dynhpg.F90 to calculate the horizontal pressure gradient term differently for the s-coord version, if in 2D mode. *** needs clarifying ***.
-
Update the namelist_cfg in EXPREF for ln_2D=.T. if want to run in 2D mode (as it should default to .false.).
It’s possibly not applicable to your case, but I need to also examine any implications of using RK3 timestepping over the modified-leapfrog timestepping that was used in my reference configurations for this recipe. Those were at NEMO 3.6 and 4.0.4. Not sure whether they might also be helpful to you. If so, let me know and I’ll ask the relevant people if it’s okay to share with you.
Hope this helps.
Chris
Hello,
One should not use ln_traadv_OFF=T with non linear free surface ! That should not be allowed in the code because it violates conservation in that case.
When you say T/S are constant, you mean even in the vertical ?
Have you tried to use an other tracer advection scheme than muscl (like fct) ?
By how much T/S change when you add wind forcing ?
Hi, and thank you.
So, if I understand correctly, to use ln_traadv_OFF = .true., I need to use a linear free surface. To do this, unless I’m mistaken, I should remove key_qco, add key_linssh, and set ln_linssh = .true. in the namelist. I’ll give it a try, although I would prefer to keep the non-linear free surface.
The model is initialized with constant fields (uniform both vertically and horizontally across the whole basin). When I added wind forcing using the MUSCL scheme for tracer advection, I noticed that after a few hours of simulation, T and S were no longer uniform in the first layer. I haven’t checked the bottom layer yet. However, I’m currently running another test with constant wind forcing (added through the usrdef_sbc.F90 routine), so I can quantify how long it takes for T and S to change, and how large the deviation from the initial value is. I’ll share the results as soon as I have them.
So far, I’ve only tested the MUSCL tracer advection scheme. Would you recommend trying FCT instead?
Thank you,
Anna Chiara
I was finally able to run the quasi-barotropic model forced by ECMWF wind using the MUSCL tracer advection scheme. The key was properly handling the surface boundary conditions.
Thank you,
Anna Chiara
1 Like
Hi, why do you mean by properly handling surface boundary conditions ?