<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><p data-start="115" data-end="124">Dear all,</p><p data-start="126" data-end="263">I’m encountering some unexpected behavior with the RBCS package. Specifically, the relaxation doesn't always seem to have the effect that I expect. </p><p data-start="265" data-end="433">While looking through the code, I came across a section in <code data-start="324" data-end="345">rbcs_add_tendency.F</code> that did not make sense to me. The loops for the relaxations is currently written like:</p></div><div><div><div><pre style="overflow-wrap: break-word; text-wrap-mode: wrap;">     IF ( tracerNum.EQ.1 .AND. useRBCtemp ) THEN
        irbc = MIN(maskLEN,tracerNum)
        rec_tauRlx = rbcsVanishingFac/tauRelaxT
        DO j=0,sNy+1
         DO i=0,sNx+1
          gTendency(i,j) = gTendency(i,j)
     &       - RBC_mask(i,j,k,bi,bj,irbc)*rec_tauRlx
     &        *( theta(i,j,k,bi,bj)- RBCtemp(i,j,k,bi,bj) )

         ENDDO
        ENDDO
      ENDIF</pre></div></div><div><br></div><div><p data-start="790" data-end="839">Should this instead use halo-aware indexing like:</p><pre class="overflow-visible!" data-start="841" data-end="912"><div class="contain-inline-size rounded-2xl border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary"><div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none rounded-t-2xl">      DO j = 1-OLy, sNy+OLy
       DO i = 1-OLx, sNx+OLx</div></div></pre></div><div><p data-start="914" data-end="1017">Is the current gridding intentional, or could this be contributing to the relaxation issues I’m seeing?</p><p data-start="1019" data-end="1049">Thanks for your time and help!</p><p data-start="1051" data-end="1067">Best,<br data-start="1056" data-end="1059">Katarina</p></div></div></body></html>