A simple question about the t3dmix2_s

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
seashellingolds
Posts: 39
Joined: Wed Jun 25, 2008 2:49 am
Location: Georgia Institute of Technology

A simple question about the t3dmix2_s

#1 Post by seashellingolds » Fri Jul 06, 2012 7:18 am

Hi All

I happened to look at the code in the t3dmix2_s.h and met something I couldnt understand.

Code: Select all

cff=0.25_r8*(diff3d_r(i,j,k)+diff3d_r(i-1,j,k))*pmon_u(i,j)
FX(i,j)=cff*(Hz(i,j,k)+Hz(i-1,j,k))*(t(i,j,k,nrhs,itrc)-t(i-1,j,k,nrhs,itrc))

similar for FE

cff=dt(ng)*pm(i,j)*pn(i,j)
cff1=cff*FX(i+1,j)-FX(i,j))
cff2=cff*FE(i,j+1)-FE(i,j))
cff3=cff1+cff2
t(i,j,k,nnew,itrc)=t(i,j,k,nnew,itrc)+cff3
What I wanted to ask is why cff3 in the last line doesnt need to be divided by Hz? (FX and FE have been multiplied by Hz). Do I miss anything here?

Thanks a lot

User avatar
shchepet
Posts: 185
Joined: Fri Nov 14, 2003 4:57 pm

Re: A simple question about the t3dmix2_s

#2 Post by shchepet » Sat Jul 07, 2012 2:07 am

Because at this moment t(i,j,k,nnew,itrc) has the meaning of tracer concentration
multiplied by Hz(i,j,k). Since Hz changes because of free surface evolution, tracers
are multiplied by Hz at time step "n" before the barotropic time stepping begins for
the current 3D time step, then all fluxes are added in to the product, and finally the
outcome is divided by Hz, which happens implicitly during the tri-diagonal solver
associated with vertical diffusion.

This algorithm allows to avoid extra storage associated with Hz because only one
time frame is needed for it.

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

Re: A simple question about the t3dmix2_s

#3 Post by wilkin » Sat Jul 07, 2012 2:57 am

Immediately above the code segment you quote there is the comment:

Code: Select all

!
! Time-step harmonic, S-surfaces diffusion term (m Tunits).
!
At this place in the code the tracer array is in flux units of layer thickness (Hz, in m) times Tracer units (Tunits). The return to simple tracer units occurs later.

See also https://www.myroms.org/wiki/index.php/Horizontal_Mixing
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply