[Mitgcm-support] butterflies

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:51:12 EDT 2003


Hi,

Working with ecco_c44_e22 I have found some butterflies by compiling and
running the code with array boundary check. See the list below.

You might want to add an array boundary check as a standard test case of the 
code.

Ralf


Code version: ecco_c44_e22
==========================
- iikey is set in thermodynamics but also used in dynamics
  it should either be defined in ecco_the_model_main
  or thermodynamics and dynamics should use different key variables.

- tmpvar used but not defined in ctrl_unpack.F

- using undefined values of kapparv in mom_v_bottomdrag
  mom_v_bottomdrag must have iMin,iMax,jMin,jMax as arguments
  and only use values being calculated in calc_viscosity
  There are probably many more routines in mom_fluxform and mom_vecin
  using undefined values.

dynamics.F:
---------------
C--     Start computation of dynamics
        iMin = 1-OLx+2
        iMax = sNx+OLx-1
        jMin = 1-OLy+2
        jMax = sNy+OLy-1
...
#ifdef  INCLUDE_CALC_DIFFUSIVITY_CALL
C--      Calculate the total vertical diffusivity
        DO k=1,Nr
         CALL CALC_VISCOSITY(
     I        bi,bj,iMin,iMax,jMin,jMax,k,
     O        KappaRU,KappaRV,
     I        myThid)
       ENDDO
#endif
...
#ifndef DISABLE_MOM_FLUXFORM
           IF (.NOT. vectorInvariantMomentum) CALL MOM_FLUXFORM(
     I         bi,bj,iMin,iMax,jMin,jMax,k,kup,kDown,
     I         phiHyd,KappaRU,KappaRV,
     U         fVerU, fVerV,
     I         myTime, myIter, myThid)
#endif

mom_fluxform.F:
---------------
      IF (momViscosity.AND.bottomDragTerms) THEN
       CALL MOM_V_BOTTOMDRAG(bi,bj,k,vFld,KE,KappaRV,vF,myThid)
       DO j=jMin,jMax
        DO i=iMin,iMax
         gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j)
        ENDDO
       ENDDO
      ENDIF

mom_v_bottomdrag.F: The variable (kapparv(-3,-2,23)) has an undefined value.
---------------

      DO j=1-Oly+1,sNy+Oly-1
       DO i=1-Olx,sNx+Olx-1
        maskDown=_maskS(i,j,kp1,bi,bj)
        IF (k.EQ.Nr) maskDown=0.
        vDragTerms(i,j)=
     &   -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)
     &   *( 
     &      2.*KappaRV(i,j,kp1)*rkFac*rdrckp1*viscFac
     &     + bottomDragLinear
     &    )*(1.-maskDown)*vFld(i,j)
        IF ( (KE(i,j)+KE(i,j-1)) .NE. 0. ) THEN
         vDragTerms(i,j)=vDragTerms(i,j)
     &    -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)
     &    *bottomDragQuadratic*sqrt(KE(i,j)+KE(i,j-1))
     &    *(1.-maskDown)*vFld(i,j)
        ENDIF
       ENDDO
      ENDDO

-- 
###################################################
 Dr. Ralf Giering
 FastOpt
 Martinistr. 21
 20251, Hamburg, Germany
 Tel. : +49 40 48096347
 Fax  : +49 40 48096357
 Email: Ralf.Giering at FastOpt.de
 URL  : http://www.FastOpt.de
###################################################



More information about the MITgcm-support mailing list