[MITgcm-support] Potential problem with layers package and variable topography

Christopher L. Wolfe clwolfe at ucsd.edu
Mon May 9 17:45:41 EDT 2011


Hi all,

I just noticed what seems to be small error in the layers package that may cause people problems when using it in models with variable topography (really any topography other than a flat bottom). The problem occurs when the "binning" field, either theta or salt, is linearly interpolated onto a vertical grid which is finer than the original vertical grid:

Let k be an index of the original vertical grid. In a model with topography, we can easily have hFacW(i,i,k) = 1 but hFacW(i,j,k+1) = 0 (similarly with hFacS). Since the model sets tracer fields inside topography to zero, this means that theta(i,j,k+1) = 0 even if theta(i,j,k) > 0. In this case, the interpolated theta will decrease linearly from its value at k to half this value at the interpolated bottom (assuming the cell faces are halfway between the cell centers). This is rather unphysical and inconsistent with the model's no-flux boundary condition on tracers. A more appropriate strategy would be to make theta constant on interpolated levels that fall between rC(k) and the bottom.

A simple fix is to replace lines like

        TatU = MapFact(kk) *
    &    0.5 _d 0 * (theta(i-1,j,k,bi,bj)+theta(i,j,k,bi,bj)) +
    &    (1-MapFact(kk)) *
    &    0.5 _d 0 * (theta(i-1,j,k+1,bi,bj)+theta(i,j,k+1,bi,bj))

with

	IF (hFacW(i,j,k+1,bi,bj) .EQ. 0)
	 TatU = 0.5 _d 0 * (theta(i-1,j,k,bi,bj) + theta(i,j,k,bi,bj)
	ELSE
        TatU = MapFact(kk) *
    &    0.5 _d 0 * (theta(i-1,j,k,bi,bj)+theta(i,j,k,bi,bj)) +
    &    (1-MapFact(kk)) *
    &    0.5 _d 0 * (theta(i-1,j,k+1,bi,bj)+theta(i,j,k+1,bi,bj))
	ENDIF

This fix might have to be modified if you use partial bottom cells.

Hope this helps someone ...

Cheers,
Christopher

-----------------------------------------------------------
Dr. Christopher L. Wolfe              	   858-534-4560
Climate, Atmospheric Science, and Physical Oceanography
Scripps Institution of Oceanography, UCSD  clwolfe at ucsd.edu
-----------------------------------------------------------





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20110509/1ce4d65a/attachment-0001.htm>


More information about the MITgcm-support mailing list