It can go both ways, but we need to test. The section of the code in question is rarely used since we specify both tidal elevation and tidal currents. For the case that only tidal elevation is activated, we need to approximate the tidal currents with reduced-physics terms evaluated at the open boundary: barotropic pressure gradient, Coriolis, and stresses. Here,
bry_pgr (m3/s2) is the barotropic pressure gradient.
Thus, we either leave it as it is:
Code: Select all
#if defined SSH_TIDES && !defined UV_TIDES
IF (LBC(iwest,isFsur,ng)%acquire) THEN
bry_pgr=-g*(zeta(Istr,j,know)- &
& BOUNDARY(ng)%zeta_west(j))* &
& 0.5_r8*GRID(ng)%pm(Istr,j)
ELSE
bry_pgr=-g*(zeta(Istr ,j,know)- &
& zeta(Istr-1,j,know))* &
& 0.5_r8*(GRID(ng)%pm(Istr-1,j)+ &
& GRID(ng)%pm(Istr ,j))
END IF
remove the
0.5 factor:
Code: Select all
#if defined SSH_TIDES && !defined UV_TIDES
IF (LBC(iwest,isFsur,ng)%acquire) THEN
bry_pgr=-g*(zeta(Istr,j,know)- &
& BOUNDARY(ng)%zeta_west(j))* &
& GRID(ng)%pm(Istr,j)
ELSE
bry_pgr=-g*(zeta(Istr ,j,know)- &
& zeta(Istr-1,j,know))* &
& 0.5_r8*(GRID(ng)%pm(Istr-1,j)+ &
& GRID(ng)%pm(Istr ,j))
END IF
Or average the grid spacing:
Code: Select all
#if defined SSH_TIDES && !defined UV_TIDES
IF (LBC(iwest,isFsur,ng)%acquire) THEN
bry_pgr=-g*(zeta(Istr,j,know)- &
& BOUNDARY(ng)%zeta_west(j))* &
& 0.5_r8*(GRID(ng)%pm(Istr-1,j)+ &
& GRID(ng)%pm(Istr ,j))
ELSE
bry_pgr=-g*(zeta(Istr ,j,know)- &
& zeta(Istr-1,j,know))* &
& 0.5_r8*(GRID(ng)%pm(Istr-1,j)+ &
& GRID(ng)%pm(Istr ,j))
END IF
Similar treatment can be done on the
ubar eastern boundary, and southern/northern
vbar boundaries.
Of course, this needs to be tested on an application. I am swamped now. Perhaps, you can give it a try and let us know.