Sponge layer

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
matias.dinapoli
Posts: 18
Joined: Tue Jun 23, 2015 5:42 pm
Location: CIMA, ARG
Contact:

Sponge layer

#1 Unread post by matias.dinapoli »

Hi! I'm testing the OBC. But when I set a sponge layer I think that ROMS don't read it.

In my *.h I have:

Code: Select all

#undef  SOLVE3D
#define UV_COR
#define UV_ADV
#define UV_VIS2
#define UV_QDRAG
#define NONLINEAR

#define ANA_GRID
#define ANA_INITIAL
#define ANA_SMFLUX
#define ANA_DIAG
#define AVERAGES

#define OBC_WEST
#define OBC_EAST
#define ANA_SPONGE
#define SPONGE
#define OUT_DOUBLE

In ana_sponge.h :

Code: Select all

width=20.0_r8
MIXING(ng)%visc2_r(IstrT:IstrT+INT(width),JstrT:JendT)=100.0_r8
MIXING(ng)%visc2_p(IstrT:IstrT+INT(width),JstrT:JendT)=100.0_r8
MIXING(ng)%visc2_r(IendT-INT(width):IendT,JstrT:JendT)=100.0_r8
MIXING(ng)%visc2_p(IendT-INT(width):IendT,JstrT:JendT)=100.0_r8
I think that with this, ROMS understood that I want a sponge layer in the western and eastern boundary.

And in the *.in:

Code: Select all

LBC(isFsur) ==  Cha     Clo     Cha     Clo            ! free-surface
LBC(isUbar) ==  Rad     Clo     Rad     Clo            ! 2D U-momentum
LBC(isVbar) ==  Rad     Clo     Rad     Clo            ! 2D V-momentum

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

LuvSponge == T                              ! horizontal momentum
LtracerSponge == F F                            ! temperature, salinity, inert
X_SPONGE == 200.0d+3
V_SPONGE == 100.0
The X_SPONGE and V_SPONGE optiones I copied them from other examples.

Thanks!

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

Re: Sponge layer

#2 Unread post by wilkin »

If you are using the myroms.org source code you need to customize Functionals/ana_sponge.h for your application to apply the sponge where and how you what. The code will scale the input viscosity accordingly. But in your ocean.in you have visc2 = 0, so unless you change that the sponge layer is only going to scale zero.

X_SPONGE and V_SPONGE are parameters in the ROMS Agrif code. If that is the source code you are using then there is no Functionals/ana_sponge.h to deal with and you'll need to get advice from the Agrif user community.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

matias.dinapoli
Posts: 18
Joined: Tue Jun 23, 2015 5:42 pm
Location: CIMA, ARG
Contact:

Re: Sponge layer

#3 Unread post by matias.dinapoli »

Thanks! I thought that both ROMS were the same, I use roms.org. So I must modify only ana_sponge.h, therefore just with:

Code: Select all

width=20.0_r8
MIXING(ng)%visc2_r(IstrT:IstrT+INT(width),JstrT:JendT)=5.0_r8
MIXING(ng)%visc2_p(IstrT:IstrT+INT(width),JstrT:JendT)=5.0_r8
MIXING(ng)%visc2_r(IendT-INT(width):IendT,JstrT:JendT)=5.0_r8
MIXING(ng)%visc2_p(IendT-INT(width):IendT,JstrT:JendT)=5.0_r8
and

Code: Select all

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

LuvSponge == T                              ! horizontal momentum
LtracerSponge == F F                            ! temperature, salinity, inert
, I create two sponge layer in the western and eastern edge whose viscosity is 5 m2/s and the other grid points is 1 m2/s??

Is it possible ask to ROMS that give me back a matrix with the values of visc??

Post Reply