volume conservation

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
wendy
Posts: 15
Joined: Thu Jan 06, 2005 5:19 pm
Location: Institute of Ocean Sciences

volume conservation

#1 Unread post by wendy »

Shchepetkin and McWilliams (2005) give the discrete continuity equation as:

dV(t2,k,j,i) = dV(t1,k,j,i) - dt*{U(k,j,i+1/2) - U(k,j,i-1/2) + V(k,j+1/2,i) - V(k,j-1/2,i) + W(k+1/2,j,i) - W(k-1/2,j,i)}

where U = u*dy*dz, V = v*dx*dz (W is defined separately but appears to be W = omega*dy*dz)

(essentially this is dV/dt = DIV(u)*dV, for a single grid cell)

This is quite logical to me, but I don't find that it works with the u, v and omega output by ROMS when tested on a single grid cell over a few time steps. the dV/dt and the DIV(u)*dV curves are different shapes and, in the case of steep topography, the two curves are an order of magnitude different. Am I missing the point? Are the u,v and omega output by ROMS not the same as those discussed in the paper?

Thanks in advance,
Wendy

Yunli
Posts: 10
Joined: Thu May 31, 2007 2:33 pm
Location: HPL

Re: volume conservation

#2 Unread post by Yunli »

How do you calculate dx and dy? If you used
dx(i,j) at v points = 0.5*( dx(i,j) + dx(i,j-1) )
I am afraid it might cause trouble because ROMS actually uses
dx(i,j) at v points = 2.0/( pm(i,j) + pm(i,j-1) )
For the reason, please see the following message posted here a long time ago.
viewtopic.php?f=19&t=169&p=331&hilit=om_u#p331

I recently did coupling between ROMS and another Water Quality(WQ) model. ROMS velocities can be easily passed to the later, but the different ways to calculate DX and DY really jeopardize WQ's conservation to some degree. Now I have to bury myself into the code and look for clues. But I am wondering if there is a simply equation to check the conservation directly from ROMS u, v, w(or omega), or if there is a small matlab file in the toolbox can help us. Thanks.

wendy wrote:Shchepetkin and McWilliams (2005) give the discrete continuity equation as:

dV(t2,k,j,i) = dV(t1,k,j,i) - dt*{U(k,j,i+1/2) - U(k,j,i-1/2) + V(k,j+1/2,i) - V(k,j-1/2,i) + W(k+1/2,j,i) - W(k-1/2,j,i)}

where U = u*dy*dz, V = v*dx*dz (W is defined separately but appears to be W = omega*dy*dz)
(essentially this is dV/dt = DIV(u)*dV, for a single grid cell)
.....
Wendy

Post Reply