[MITgcm-devel] testing on faulks
Martin Losch
mlosch at awi-bremerhaven.de
Tue May 25 02:08:02 EDT 2004
Hi Jean-Michel,
I told you, that I would introduce at least two new bugs with this
lateral friction.
On Wednesday, May 19, 2004, at 05:41 PM, Jean-Michel Campin wrote:
> Hi Martin,
>
> I would like to be sure about the testing, (specially if faulks
> is going to be upgraded or replaced) but I did not
> think it was your recent modifications that were involved.
>
> I have 2 comment about calc_gw.F:
>
> 1) The things you checked-in are a litle bit confusing:
>
> line 69:
> PARAMETER(One=0.5D0)
This is clearly wrong! My mistake, it should be One=1.0D0.
> line 137:
> (maskS(I,J,K-1,bi,bj)*maskS(I,J,K,bi,bj)-2. _d 0))
> line 153:
> (maskW(I,J,K-1,bi,bj)*maskW(I,J,K,bi,bj)-1. _d 0))
Again, my mistake, line 137 should be 1. instead of 2.
>
> 2) Otherwise, I am not sure that the previous version
> would have been correct with slipSideFac=+/-0.5
> (I was cautious, and kept slipSideFac=0.) with full cell.
> But with the modification you propose, I don't know.
> There could be an issue with friction along the solid
> wall that you want to have on 1 side (to decelerate the
> deepest side) but not on the other (not to accelerate the shallow
> side).
Clearly, the half slip version for w is inconsistent with full or no
slip for u and v, so I thought that, while I am at it, I should try and
make it consistent. I agree that the coding is not very clear. I should
have introduced field such as
hFacWS = max(hFacS(i,j,k-1,bi,bj)-Half,0)+min(hFacS(i,j,k,bi,bj),Half)
hFacWW= max(hFacW(i,j,k-1,bi,bj)-Half,0)+min(hFacW(i,j,k,bi,bj),Half)
With these definitions, things become a little clearer. But even then,
there are problems in the boundary conditions, I agree, especially in
the no slip case.
The easiest implementation would be a weighted average of viscous
stress at an open water interface and viscous stress at the closed
boundary interface. With the above definition for hFacWW, the following
snipped for the viscous stress term at the western face should be
correct:
-viscAh* _recip_dxC(i,j,bi,bj)*
( hFacWW*(wVel(i,j,k,bi,bj)-wVel(i-1,j,k,bi,bj))
+(1-hFacWW)*(1-slipSideFac)*wVel(i,j,k,bi,bj))
The first part is the open water contribution, the second part is the
closed boundary contribution. Maybe working out the brackets yields
faster (but less intelligible) code:
-viscAh* _recip_dxC(i,j,bi,bj)*(
(1-slipSideFac*(1-hFacWW))*wVel(i,j,k,bi,bj)+hFacWW*wVel(i-1,j,k,bi,bj))
I would be very happy, if someone could have a look at this before I
check it in (again, it will require modified exp5 and plume_on_slope).
Martin
Martin Losch // mailto:mlosch at awi-bremerhaven.de
Alfred-Wegener-Institut für Polar- und Meeresforschung
Postfach 120161, 27515 Bremerhaven, Germany
Tel./Fax: ++49(471)4831-1872/1797
http://www.awi-bremerhaven.de/People/show?mlosch
More information about the MITgcm-devel
mailing list