Noise of vertical mixing using GLS turbulence closure model

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Noise of vertical mixing using GLS turbulence closure model

#1 Unread post by Jianxing »

Hi Everyone,

Thanks for reading this post.

I'm doing my research on circulation and stratification in microtidal estuaries. I use an idealized straight-channel estuary grid (show below) and I'm looking at the wind effects on the circulation and stratification.

here is my model domain. The grid resolution is 50m*50m in the channel and decreases gradually in the sound area to save computational cost. There are 30 vertical layers.

Code: Select all

 Lm == 1550            ! Number of I-direction INTERIOR RHO-points
 Mm == 99           ! Number of J-direction INTERIOR RHO-points
 N == 30         ! Number of vertical levels
 THETA_S == 0.0d0                      ! surface stretching parameter
 THETA_B == 0.0d0                      ! bottom  stretching parameter
 TCLINE == 1.0d+16                     ! critical depth (m)
Image

The north and south shore is closed and free slip, the salinity is 0 PSU in the channel and 16 PSU in the sound initially. There is no tide. The boundary condition is shown below:

Code: Select all

!                   W       S       E       N
!                   e       o       a       o
!                   s       u       s       r
!                   t       t       t       t
!                           h               h
!
!                   1       2       3       4

   LBC(isFsur) ==   Gra     Clo     Cha     Clo         ! free-surface
   LBC(isUbar) ==   Cla     Clo     Cla     Clo         ! 2D U-momentum
   LBC(isVbar) ==   Cla     Clo     Cla     Clo         ! 2D V-momentum
   LBC(isUvel) ==   Gra     Clo     Rad     Clo         ! 3D U-momentum
   LBC(isVvel) ==   Gra     Clo     Rad     Clo         ! 3D V-momentum
   LBC(isMtke) ==   Gra     Clo     Rad     Clo         ! mixing TKE

   LBC(isTvar) ==   Cla     Clo     RadNud     Clo \       ! temperature
                    Cla     Clo     RadNud     Clo         ! salinity
The cpp list is shown below:

Code: Select all

#define ROMS_MODEL

#define UV_LOGDRAG
#define SALINITY
#define SOLVE3D
#define SPLINES_VVISC
#define SPLINES_VDIFF
#define DJ_GRADPS
#define CURVGRID
#define UV_ADV
#undef  UV_COR
#define UV_VIS2
#define MIX_GEO_UV
#define TS_DIF2
#define MIX_GEO_TS

#define GLS_MIXING
#if defined GLS_MIXING
# define KANTHA_CLAYSON
# define N2S2_HORAVG
#define RI_SPLINES
#endif

#define MASKING
#define ANA_INITIAL
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_BTFLUX
#define ANA_SSFLUX
#define ANA_BSFLUX
#define ANA_SPFLUX
#define ANA_BPFLUX
#define ANA_TOBC
#define ANA_M2OBC
#define ANA_M3OBC
#define ANA_FSOBC
#define AVERAGES
#define PERFECT_RESTART
#define DIAGNOSTICS_UV
#define DIAGNOSTICS_TS
I run the scenario for two month to make sure it reach to the steady state and then apply the constant wind (linearly increase and remain constant of 5 m/s after 12 hours). All the actual salinity and velocity profile look great. But when I look into the budget terms from momentum equation I found out that the vertical mixing of momentum is really noisy and I'm not sure why. The budget term profiles at X=30km location are shown below (20 hours after wind blowing) and the vertical mixing term itself.

Image
Image

I tried to use canuto A stability function rather than Kantha one and the vertical mixing looks better but that noise stuff still exists. But when I switch to MY2.5 turbulence closure model there is no this noise stuff at all. Any idea what's causing this issue?

Thanks again for reading my post!!

jcwarner
Posts: 1204
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Noise of vertical mixing using GLS turbulence closure model

#2 Unread post by jcwarner »

What is the horizontal white box across the middle-top of the cross-section plots?
Maybe try these switches on/off:

#define SPLINES_VVISC try with this off
#define SPLINES_VDIFF try with this off

#define UV_VIS2
#define MIX_GEO_UV < --- try mix_s_uv
#define TS_DIF2
#define MIX_GEO_TS < --- try mix_s_ts

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#3 Unread post by Jianxing »

Hi John,

Thanks for your reply! It took me a while to play around with all the options and found out the best for our study.

For the white box, it's just due to the vertical grid is evenly layered so the grid size is bigger in the middle compared to the side of the channel because of depth change. The wind blow down channel and the surface elevation decreased. And I interpolate the vertical profile to 0.1m interval in the MATLAB. That's why there is white box (no data) at surface 0.1m in the middle of the channel.

And we tried to turn the SPLINE off and looks like there is extra noise created at the two sides of the channel (see figures below):
Image

For using MIX_S_UV and TS, the noise looks good but there is a middle peak value in the y-mixing and y-,z- advection which we believe is due to the the cornor of the bathymetry:
Image

At last, we try to use canuto B stability function and the result looks good and meet out requirement. So we plan to use this setting:
Image

All the figures are plot 72h after wind blowing.

Anyway thanks for your suggestion! Let us know if you have any more thinking!

jcwarner
Posts: 1204
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Noise of vertical mixing using GLS turbulence closure model

#4 Unread post by jcwarner »

i dont normally see that kind of noise.
what are the ocean.in gls settings?

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#5 Unread post by Jianxing »

Hi John,
I show the gls setting below here. Please check it.

Code: Select all

! Generic length-scale turbulence closure parameters.
       GLS_P == 2.0d0                           ! 
       GLS_M == 1.0d0
       GLS_N == -0.67d0
    GLS_Kmin == 1.0d-8
    GLS_Pmin == 1.0d-8

    GLS_CMU0 == 0.5544d0
      GLS_C1 == 1.0d0
      GLS_C2 == 1.22d0
     GLS_C3M == 0.1d0
     GLS_C3P == 1.0d0
    GLS_SIGK == 0.8d0
    GLS_SIGP == 1.07d0

jcwarner
Posts: 1204
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Noise of vertical mixing using GLS turbulence closure model

#6 Unread post by jcwarner »

give this a try

! Generic length-scale turbulence closure parameters.

GLS_P == 3.0d0 ! K-epsilon
GLS_M == 1.5d0
GLS_N == -1.0d0
GLS_Kmin == 7.6d-6
GLS_Pmin == 1.0d-12

GLS_CMU0 == 0.5477d0
GLS_C1 == 1.44d0
GLS_C2 == 1.92d0
GLS_C3M == -0.4d0
GLS_C3P == 1.0d0
GLS_SIGK == 1.0d0
GLS_SIGP == 1.30d0

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#7 Unread post by Jianxing »

Hi John,

These are the one used to represent the k-epsilon turbulent closure model, not the gls one right? I've tried the k-epsilon one before and there is no noise for the vertical mixing.

But k-epsilon model tends to overmix and not very appropriate for stratified estuary situation so that's why we stick to the gls one. Let me know if I'm wrong.

jcwarner
Posts: 1204
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Noise of vertical mixing using GLS turbulence closure model

#8 Unread post by jcwarner »

Ah!
ok , yes i gave you the k-e. And we dont see those wiggles with k-e.
I dont typically use the k-gen settings. Wonder if you can adjust any parameters to get rid of that noise.
try this:

Generic length-scale turbulence closure parameters.
GLS_P == 2.0d0 !
GLS_M == 1.0d0
GLS_N == -0.67d0
GLS_Kmin ==7.6d-6
GLS_Pmin == 1.0d-12

GLS_CMU0 == 0.5544d0
GLS_C1 == 1.0d0
GLS_C2 == 1.22d0
GLS_C3M == 0.1d0
GLS_C3P == 1.0d0
GLS_SIGK == 0.8d0
GLS_SIGP == 1.07d0
with the KC stability functs.

harcourt
Posts: 8
Joined: Mon May 06, 2013 8:37 pm
Location: Univ Washington

Re: Noise of vertical mixing using GLS turbulence closure model

#9 Unread post by harcourt »

There is a problem with the advection schemes for turbulence if you are not specifying one of the 2 centered schemes, which may be contributing to the noise you are dealing with. Please see my modified code posted for GLS and MY25 here: viewtopic.php?p=25663#p25663
I will try to put this up somewhere on github over the coming weeks.
-Ramsey

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#10 Unread post by Jianxing »

jcwarner wrote: Wed Sep 25, 2024 12:13 pm Ah!
ok , yes i gave you the k-e. And we dont see those wiggles with k-e.
I dont typically use the k-gen settings. Wonder if you can adjust any parameters to get rid of that noise.
try this:

Generic length-scale turbulence closure parameters.
GLS_P == 2.0d0 !
GLS_M == 1.0d0
GLS_N == -0.67d0
GLS_Kmin ==7.6d-6
GLS_Pmin == 1.0d-12

GLS_CMU0 == 0.5544d0
GLS_C1 == 1.0d0
GLS_C2 == 1.22d0
GLS_C3M == 0.1d0
GLS_C3P == 1.0d0
GLS_SIGK == 0.8d0
GLS_SIGP == 1.07d0
with the KC stability functs.
Hi John,

I tried this setting with KC stability function and the noise is still there and i didn't see much decrease of that noise.

By increasing the GLS_Kmin, the model results in stronger mixing and the salt wedge intrudes shorter upstream so I have to decrease the river inflow to achieve the salt wedge distance I want. But it doesn't seem to smooth out this noise.

I attach the momentum budget after 72 hours below. Let me know your thinking!

Also I tryied what Ramsey suggests and it doesn't make any change to the result.

Image

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#11 Unread post by Jianxing »

harcourt wrote: Thu Sep 26, 2024 8:00 am There is a problem with the advection schemes for turbulence if you are not specifying one of the 2 centered schemes, which may be contributing to the noise you are dealing with. Please see my modified code posted for GLS and MY25 here: viewtopic.php?p=25663#p25663
I will try to put this up somewhere on github over the coming weeks.
-Ramsey
Hi Ramsey,

Thanks for your reply! I replaced your code files to my ROMS model and ran the model again and looks like it doesn't help reducing the noise. According to your explanation this advection schemes problem happen on both GLS and MY25 turbulence closure model. But I don't have this noise on the vertical mixing profile if I choose MY25 model. So I think this advection problem might not be important to my issue. Let me know what you think!

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Noise of vertical mixing using GLS turbulence closure model

#12 Unread post by wilkin »

Re-reading this thread, I notice you don't say what horizontal and vertical advection schemes you are using, and the values of any explicit horizontal mixing coefficients for comparisons to your grid resolution. It may be that these are contributing to the noise and the vertical mixing is not the culprit.

Also,you say you regrid the solution in Matlab for plotting. Is that creating the appearance of noise? Why not plot the actual solution in its native vertical s-coordinates?
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#13 Unread post by Jianxing »

Hi Wilkin,

I believe by default the horizontal advection is 3rd-order upstream bias and vertical advection is 4th-order centered. I didn't specify advection schemes myself and so I think it uses the default setting.

I set the horizontal mixing coefficients as 1 m^2/s and I attach the code below.

Code: Select all

! Harmonic/biharmonic horizontal diffusion of tracer for nonlinear model
! and adjoint-based algorithms: [1:NAT+NPT,Ngrids].

        TNU2 == 1.0d0  1.0d0                    ! m2/s
        TNU4 == 2.0d0  0.0d0                    ! m4/s

     ad_TNU2 == 0.0d0  0.0d0                    ! m2/s
     ad_TNU4 == 0.0d0  0.0d0                    ! m4/s

! Harmonic/biharmonic, horizontal viscosity coefficient for nonlinear model
! and adjoint-based algorithms: [Ngrids].

       VISC2 == 1.0d0                         ! m2/s
       VISC4 == 0.0d0                           ! m4/s

    ad_VISC2 == 0.0d0                           ! m2/s
    ad_VISC4 == 0.0d0                           ! m4/s
And to make sure it's not the matlab regriding that cause the problem, I plot the actual s-coordinates vertical mixing profile and show below, this is the scenario above with modified GLS_Kmin (7.6d-6), GLS_Pmin(1.0d-12) and KC stability function.

Image
word and character count

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Noise of vertical mixing using GLS turbulence closure model

#14 Unread post by wilkin »

So, in your roms.in you have ?

Code: Select all

! The user has the option of specifying the full Keyword or the first
! two letters, regardless if using uppercase or lowercase. If nested
! grids, specify values for each grid (see glossary below).

   Hadvection == U3       \                     ! temperature
                 U3                          ! salinity

   Vadvection == C4       \                     ! temperature
                 C4                          ! salinity
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#15 Unread post by Jianxing »

Hi Wilkin,

I just check the roms.in and I have the advection scheme as this:

Code: Select all

! The user has the option of specifying the full Keyword or the first
! two letters, regardless if using uppercase or lowercase. If nested
! grids, specify values for each grid (see glossary below).

   Hadvection == A4       \                     ! temperature
                 MPDATA                             ! salinity

   Vadvection == A4       \                     ! temperature
                 MPDATA                             ! salinity
Sorry for telling the wrong information.

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Noise of vertical mixing using GLS turbulence closure model

#16 Unread post by wilkin »

Mixing schemes for temp and salt might be ill-advised.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#17 Unread post by Jianxing »

Hi Wilkin,

Do you mean GLS might not be a good choice?

Also should I try to switch back the advection scheme to U3 and C4 and see if it helps?

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Noise of vertical mixing using GLS turbulence closure model

#18 Unread post by wilkin »

GLS is fine. But I suggest you use the same advection scheme choice for both tracers. You have A4 for temperature and MPDATA for salinity which will introduce small differences that might be your noise.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Jianxing
Posts: 12
Joined: Fri May 24, 2024 7:40 pm
Location: Institude of Marine Science at UNC

Re: Noise of vertical mixing using GLS turbulence closure model

#19 Unread post by Jianxing »

Hi Wilkin,

Thanks. I'll try it and will update the result in this thread.

Post Reply