Hi all,
I am now doing simulation of internal tides using ROMS. I got a problem of the output 2-D brotropic velocity ubar and vbar.
I have calculated the barotropic velocity using the output 3-D u v, call it ubar1 and vbar1.
However, the values of model output ubar vbar and calculated ubar1 vbar1 are quite different.
Does anybody got similar problems and can somebody tell me the reason?
thanks!
disagreement between ouput ubar and calculated values
Re: disagreement between ouput ubar and calculated values
Remember that ROMS uses a vertically stretched s-coordinate system (set by your choice of Vtransform, Vstretching and the parameters theta_s, theta_b etc.). These determine the layer thicknesses you need to use to correctly calculate a vertical integral. The time varying sea surface height, zeta, enters into the calculation, so the layer thicknesses also change in time.
The staggered grid means that you need to also get h and zeta at the respective u,v points to correctly compute the vertical integral of u,v and to divide by the correct h+zeta averged to u,v points.
Trust me ... ROMS is doing the calculation of ubar,vbar from u,v correctly.
There are contributed Matlab and Python tools to post-process these calculations. The stretching is also documented in the section ...
in the GLOSSARY comments at the end of all the example roms_*.in files.
ROMS also gives you the option to write the coordinates directly into the output netcdf files. See the options in roms_*.in:
The layer thicknesses at rho-points are the vertical difference of z_w, but you still need to get these onto to u,v points to do the vertical integral correctly. You can't take differences of z_u,z_v, but they are there to help you check you code.
You should verify that when you sum the layer thicknesses you have that you get exactly h+zeta at the u,v points.
The staggered grid means that you need to also get h and zeta at the respective u,v points to correctly compute the vertical integral of u,v and to divide by the correct h+zeta averged to u,v points.
Trust me ... ROMS is doing the calculation of ubar,vbar from u,v correctly.
There are contributed Matlab and Python tools to post-process these calculations. The stretching is also documented in the section ...
Code: Select all
!------------------------------------------------------------------------------
! Vertical S-coordinates parameters.
!---
ROMS also gives you the option to write the coordinates directly into the output netcdf files. See the options in roms_*.in:
Code: Select all
Hout(idpthR) == F ! z_rho time-varying depths of RHO-points
Hout(idpthU) == F ! z_u time-varying depths of U-points
Hout(idpthV) == F ! z_v time-varying depths of V-points
Hout(idpthW) == F ! z_w time-varying depths of W-points
You should verify that when you sum the layer thicknesses you have that you get exactly h+zeta at the u,v points.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: disagreement between ouput ubar and calculated values
Thanks, Wilkin! I actually calculated the ubar1 and vbar1 as you mentioned, I will double check my matlab script.