[Mitgcm-support] Re: free slip/no slip

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:42:03 EDT 2003


Hi Arne,

C     Eddy component of vertical flux
      IF (no_slip_bottom) THEN
       DO j=jMin,jMax
        DO i=iMin,iMax
         vf(i,j) =
     &   -KappaRU(i,j,k)
     & *_RA_AT_W
     &   *( ( 2.-_maskW(i,j,k,bi,bj) )*uVel(i,j,kM1,bi,bj)
     &     -     _maskW(i,j,k,bi,bj)  *uVel(i,j,k,bi,bj)
     &    )*rkFac*recip_drC(k)
        ENDDO
       ENDDO
      ELSE
       DO j=jMin,jMax
        DO i=iMin,iMax
         vf(i,j) =
     &   -KappaRU(i,j,k)
     & *_RA_AT_W
     &   *( uVel(i,j,km1,bi,bj)-uVel(i,j,k,bi,bj)
     &    )*rkFac*recip_drC(k)
     &    *_maskW(i,j,k,bi,bj)*rVelMaskOverride
        ENDDO
       ENDDO
      ENDIF

no_slip_bottom=.TRUE., in interior maskW(k)=1
so  ( 2-maskW(k) ) U(k-1) - maskW(k) U(k)
    =  1 U(k-1) - 1 U(k)

no_slip_bottom=.TRUE., at bottom maskW(k)=0
so  ( 2-maskW(k) ) U(k-1) - maskW(k) U(k)
    =  2 U(k-1) - 0 U(k)

no_slip_bottom=.FALSE., in interior maskW(k)=1
so  maskW(k) [ U(k-1) - maskW(k) U(k) ]
    =  1 [ U(k-1) - 1 U(k) ]

no_slip_bottom=.FALSE., at bottom maskW(k)=0
so  maskW(k) [ U(k-1) - maskW(k) U(k) ]
    =  0 [ U(k-1) - 1 U(k) ]

Looks right to me. This is the sort of code
that doesn't get tested properly (beyond me thinking
about it) so if you're convinced it's wrong
show me a test.

Regards,

Alistair.
PS> I would dearly love to tidy up calc_mom_rhs(). It
takes much more CPU than it should mostly because
of using these intermediate arrays like vf, af and df.
One day ...




More information about the MITgcm-support mailing list