subroutine cnstpby (pwk) c c======================================================================= c === c This routine ensures that the values of the transport === c streamfunction in the working array are constant under land. === c === c ------ === c Input: === c ------ === c === c PWK transport streamfunction working array. (real array) === c === c Common Blocks: === c === c /FULLWD/ === c === c ICOAST coast x-coordinate. (integer array) === c JCOAST coast y-coordinate. (integer array) === c LANDP transport streamfunction mask. (integer array) === c === c ------- === c Output: === c ------- === c === c PWK transport streamfunction w/ constant land. (real array) === c === c ------ === c Calls: === c ------ === c === c none === c === c======================================================================= c c----------------------------------------------------------------------- c Define global data. c----------------------------------------------------------------------- c #include #include #include c c----------------------------------------------------------------------- c Define local data. c----------------------------------------------------------------------- c integer i,j,n real pwk(imt,jmt) c c======================================================================= c Begin executable code. c======================================================================= c c----------------------------------------------------------------------- c Fix southern & northern boundaries. c----------------------------------------------------------------------- c do 10 i = 1, imt n = landp(i,1) if (n.ne.0) then pwk(i,1) = pwk(icoast(1,n),jcoast(1,n)) end if n = landp(i,jmt) if (n.ne.0) then pwk(i,jmt) = pwk(icoast(1,n),jcoast(1,n)) end if 10 continue c c----------------------------------------------------------------------- c Fix western & eastern boundaries. c----------------------------------------------------------------------- c do 20 j = 2, jmtm1 n = landp(1,j) if (n.ne.0) then pwk(1,j) = pwk(icoast(1,n),jcoast(1,n)) end if n = landp(imt,j) if (n.ne.0) then pwk(imt,j) = pwk(icoast(1,n),jcoast(1,n)) end if 20 continue c return end