I'm running tide simulations and want to compare the results of 2d simulations to 3d barotropic simulations (no tracers, homegeneous density). Vertical viscosity is constant and prescribed by AKV_BAK.
Should I expect the 3d solution to converge to the 2d solution for very large AKV, e.g. AKV=1e5? I tried it and u is indeed vertically constant in the 3d run (as I expect with large AKV_BAK), and the velocity fields look almost (but not exactly) identical to ubar/vbar from the 2d run. However the M2 amplitudes at some stations differ by about 20cm, which is a lot.
Is "Clo" the right boundary condition for the open boundary 3d velocity for this experiment? I use Chapman for zeta and Flather with reduced physics for ubar/vbar.
I noticed a paper that describes problems regarding bottom friction and the splitting algorithm [1], but I don't think this is relevant if the velocity profile is vertically constant.
Should compare it with a 3d run with NDTFAST=1?
[1] Numerically Accurate treatment of bottomdrag in ocean models with mode and timesplitting. Alexander F. Shchepetkin. Salt Lake Sity, UT, February 2012
http://people.atmos.ucla.edu/alex/ROMS/ ... 12Talk.pdf
Differences 2d vs. 3d barotropic simulation with very large AKV_BAK
Re: Differences 2d vs. 3d barotropic simulation with very large AKV_BAK
A run with ndtfast=4 is much similar to the 2d solution.
Could it be that the "slow forcing" terms in the 2d momentum equations are the reason? In my case, these are
* vertically integrated 3d "rhs" terms (rhs3d.f90)
* bottom/surface stress plus (rhs3d.f90)
* 3d horizontal viscosity (uv3dmix.f90)
These are held constant during the fast time steps.
Could it be that the "slow forcing" terms in the 2d momentum equations are the reason? In my case, these are
* vertically integrated 3d "rhs" terms (rhs3d.f90)
* bottom/surface stress plus (rhs3d.f90)
* 3d horizontal viscosity (uv3dmix.f90)
These are held constant during the fast time steps.
Last edited by stef on Tue Dec 07, 2021 9:31 am, edited 2 times in total.
Re: Differences 2d vs. 3d barotropic simulation with very large AKV_BAK
I think the difference is mostly due to the differences in bottom stress application between 2d vs. 3d.
From main3d.f90 it seems that the bottom stress is computed at the beginning of the baroclinic time step (set_vbc) and held constant throughout the barotropic stepping, whereas in 2d applications set_vbc is called at each barotropic time step.
For testing I set up a 3d run in which not the entire "rufrc" (slow forcing) is applied in "step2d", and instead only the bottom stress ("bustr/sustr") component, which is normally computed in "set_vbc" and added to the 2d slow forcing in "rhs3d". Results are very similar to the original 3d run, so I assume that the other parts of the slow forcing are not important in causing the difference (I guess the baroclinic part of the pressure gradient should be identical to zero in my particular experiment with homogeneous density anyway, but I'm less sure about advection and turbulent viscosity etc....I'm a bit rusty on the mode splitting, and even some years ago I did not understand it in detail....).
Then I set up a 3d run where I compute "bustr/sustr" in step2d from the updated barotropic velocity. Results are very similar to the 2d experiment. One caveat is that I overwrote the bustr/sustr fields, and I'm not sure if those are used anywhere in the 3d code (e.g. vertical viscosity in step3d_uv?).
So is it plausible to attribute the difference to the different application of bottom stress?
But now I wonder: In addition to bottom stress, tidal forcing is also applied at the boundary only once per baroclinic timestep. Right? I only started 3d modelling recently. For dx=8000 (tidal forcing is applied on the coarsest parent grid, the baroclinic timestep is on the order of 10 minutes with ndfast about 20 and typical offshore depths.
For tidal analysis, temporal sampling varies. Most harmonic analysis is made with dt=1 hour, which yields a sufficiently high Nyquist frequency to cover most of the tidal spectrum of interest even in shallow water. But for high/low water analysis, I got the feeling that most agencies use somewhere around 6 minutes.
Do we have to worry about the baroclinic step becoming too large in the coarsest grid for tidal analysis? I have not seen any posts regarding this topic.
From main3d.f90 it seems that the bottom stress is computed at the beginning of the baroclinic time step (set_vbc) and held constant throughout the barotropic stepping, whereas in 2d applications set_vbc is called at each barotropic time step.
For testing I set up a 3d run in which not the entire "rufrc" (slow forcing) is applied in "step2d", and instead only the bottom stress ("bustr/sustr") component, which is normally computed in "set_vbc" and added to the 2d slow forcing in "rhs3d". Results are very similar to the original 3d run, so I assume that the other parts of the slow forcing are not important in causing the difference (I guess the baroclinic part of the pressure gradient should be identical to zero in my particular experiment with homogeneous density anyway, but I'm less sure about advection and turbulent viscosity etc....I'm a bit rusty on the mode splitting, and even some years ago I did not understand it in detail....).
Then I set up a 3d run where I compute "bustr/sustr" in step2d from the updated barotropic velocity. Results are very similar to the 2d experiment. One caveat is that I overwrote the bustr/sustr fields, and I'm not sure if those are used anywhere in the 3d code (e.g. vertical viscosity in step3d_uv?).
So is it plausible to attribute the difference to the different application of bottom stress?
But now I wonder: In addition to bottom stress, tidal forcing is also applied at the boundary only once per baroclinic timestep. Right? I only started 3d modelling recently. For dx=8000 (tidal forcing is applied on the coarsest parent grid, the baroclinic timestep is on the order of 10 minutes with ndfast about 20 and typical offshore depths.
For tidal analysis, temporal sampling varies. Most harmonic analysis is made with dt=1 hour, which yields a sufficiently high Nyquist frequency to cover most of the tidal spectrum of interest even in shallow water. But for high/low water analysis, I got the feeling that most agencies use somewhere around 6 minutes.
Do we have to worry about the baroclinic step becoming too large in the coarsest grid for tidal analysis? I have not seen any posts regarding this topic.
Last edited by stef on Tue Dec 07, 2021 9:32 am, edited 2 times in total.
Re: Differences 2d vs. 3d barotropic simulation with very large AKV_BAK
Turns out I probably took the wrong turn here. Most of the difference does not appear to be due to the splitting itself, but due to the fact that that bottom stress was artificially limited in the 3d application.
In set_vbc.F, there is:
Further above, cff is defined as
where dt is the *baroclinic* timestep. So if we go from 2d to 3d, "dt" becomes larger, and the LIMIT_BSTRESS becomes more restrictive. In my original 3d application, there was an (almost permanent?) cap on the bottom stress in some regions. I had not configured LIMIT_BSTRESS explicitly, but it was automatically switched on in globaldefs.h because I had WET_DRY (whose effect I intentionally eliminated earlier by setting a large minimum depth, so I forgot about it).
But now I'm not sure if I should have had limited the bstress in the 2d application? I'll check it.
In set_vbc.F, there is:
Code: Select all
# ifdef LIMIT_BSTRESS
cff3=cff*0.5_r8*(Hz(i-1,j,1)+Hz(i,j,1))
bustr(i,j)=SIGN(1.0_r8, bustr(i,j))* &
& MIN(ABS(bustr(i,j)), &
& ABS(u(i,j,1,nrhs))*cff3)
# endif
Code: Select all
cff=0.75_r8/dt(ng)
where dt is the *baroclinic* timestep. So if we go from 2d to 3d, "dt" becomes larger, and the LIMIT_BSTRESS becomes more restrictive. In my original 3d application, there was an (almost permanent?) cap on the bottom stress in some regions. I had not configured LIMIT_BSTRESS explicitly, but it was automatically switched on in globaldefs.h because I had WET_DRY (whose effect I intentionally eliminated earlier by setting a large minimum depth, so I forgot about it).
But now I'm not sure if I should have had limited the bstress in the 2d application? I'll check it.