Possible Coding Error in my25_corstep.F

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
sflin
Posts: 6
Joined: Wed Oct 12, 2016 12:49 pm
Location: Dalhousie University

Possible Coding Error in my25_corstep.F

#1 Unread post by sflin »

Hi all,

In the Vertical Mixing Parameterization of MY2.5, the dissipation of turbulent energy is calculated as, 𝜀 = 𝑞^3/(𝐵1 𝑙), following Mellor and Yamada (1982) or Warner et al. (2005).

But in my25_corstep.F, Qdiss is written as:
!
! Compute dissipation of turbulent energy (m3/s3). Add in vertical
! mixing term.
!
Qdiss=dt(ng)*SQRT(tke(i,j,k,nstp))/(my_B1*Ls_unlmt)


should it be: Qdiss=dt(ng)*SQRT(tke(i,j,k,nstp)**3)/(my_B1*Ls_unlmt) ?

Not 100% sure, hope someone would have any thoughts on this?

Thanks for any reply.

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

Re: Possible Coding Error in my25_corstep.F

#2 Unread post by jcwarner »

i see what you are saying, but the full section of code is:

! Compute dissipation of turbulent energy (m3/s3). Add in vertical
! mixing term.
!
Qdiss=dt(ng)*SQRT(tke(i,j,k,nstp))/(my_B1*Ls_unlmt)
cff=Ls_unlmt*(1.0_r8/(z_w(i,j,N(ng))-z_w(i,j,k))+ &
& 1.0_r8/(z_w(i,j,k)-z_w(i,j,0)))
Wscale=1.0_r8+cff3*cff*cff
BCK(i,k)=cff1*(1.0_r8+2.0_r8*Qdiss)-FCK(i,k)-FCK(i,k+1)
BCP(i,k)=cff1*(1.0_r8+Wscale*Qdiss)-FCK(i,k)-FCK(i,k+1)

Perhaps the Qdiss was not a good choice for that variable name, maybe i should have just used cff4 or something. The Qdiss is dimensionless:
s m/s /m
For the BCK computation it has to be dimensionless because we have 1+2*Qdiss. similar for BCP.
I am on travel and dont have all those notes handy, but this is setting up the tri-diagonal solver a few lines later and i think it is ok.
Let me check when i get back.
-j

sflin
Posts: 6
Joined: Wed Oct 12, 2016 12:49 pm
Location: Dalhousie University

Re: Possible Coding Error in my25_corstep.F

#3 Unread post by sflin »

Hi John,

After look into all the code,I got what you mean. Qdiss is dimensionless and used in the tri-diagnoal solver.

Thank you very much for you reply.

-sflin

Post Reply