/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_calc_rhs.F
ViewVC logotype

Diff of /MITgcm/pkg/generic_advdiff/gad_calc_rhs.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.53 by jahn, Fri Jun 26 23:10:09 2009 UTC revision 1.54 by jmc, Fri Apr 2 19:29:01 2010 UTC
# Line 579  C-    Set non local KPP transport term ( Line 579  C-    Set non local KPP transport term (
579       I           myTime, myIter, myThid )       I           myTime, myIter, myThid )
580  #endif  #endif
581         ELSE         ELSE
582          PRINT*,'invalid tracer indentity: ', tracerIdentity          WRITE(errorMessageUnit,*)
583          STOP 'GAD_CALC_RHS: Ooops'       &    'tracer identity =', tracerIdentity, ' is not valid => STOP'
584            STOP 'ABNORMAL END: S/R GAD_CALC_RHS: invalid tracer identity'
585         ENDIF         ENDIF
586         DO j=1-Oly,sNy+Oly         DO j=1-Oly,sNy+Oly
587          DO i=1-Olx,sNx+Olx          DO i=1-Olx,sNx+Olx
# Line 588  C-    Set non local KPP transport term ( Line 589  C-    Set non local KPP transport term (
589       &                  + df(i,j)*maskUp(i,j)*rhoFacF(k)       &                  + df(i,j)*maskUp(i,j)*rhoFacF(k)
590          ENDDO          ENDDO
591         ENDDO         ENDDO
592        ENDIF  #ifdef ALLOW_DIAGNOSTICS
593    C-    Diagnostics of Non-Local Tracer (vertical) flux
594           IF ( useDiagnostics ) THEN
595             diagName = 'KPPg'//diagSufx
596             CALL DIAGNOSTICS_FILL( df, diagName, k,1, 2,bi,bj, myThid )
597    C- note: needs to explicitly increment the counter since DIAGNOSTICS_FILL
598    C        does it only if k=1 (never the case here)
599             IF ( k.EQ.2 ) CALL DIAGNOSTICS_COUNT(diagName,bi,bj,myThid)
600           ENDIF
601  #endif  #endif
602          ENDIF
603    #endif /* ALLOW_KPP */
604    
605  #ifdef GAD_SMOLARKIEWICZ_HACK  #ifdef GAD_SMOLARKIEWICZ_HACK
606  coj   Hack to make redi (and everything else in this s/r) positive  coj   Hack to make redi (and everything else in this s/r) positive
# Line 623  coj   If tracer is already negative, sca Line 634  coj   If tracer is already negative, sca
634             fac = MAX(0. _d 0,SmolarkiewiczMaxFrac*trac/outFlux)             fac = MAX(0. _d 0,SmolarkiewiczMaxFrac*trac/outFlux)
635    
636             IF (fZon(i+1,j).GT.0. _d 0) fZon(i+1,j)=fac*fZon(i+1,j)             IF (fZon(i+1,j).GT.0. _d 0) fZon(i+1,j)=fac*fZon(i+1,j)
637             IF (-fZon(i,j) .GT.0. _d 0) fZon(i,j)  =fac*fZon(i,j)                   IF (-fZon(i,j) .GT.0. _d 0) fZon(i,j)  =fac*fZon(i,j)
638             IF (fMer(i,j+1).GT.0. _d 0) fMer(i,j+1)=fac*fMer(i,j+1)             IF (fMer(i,j+1).GT.0. _d 0) fMer(i,j+1)=fac*fMer(i,j+1)
639             IF (-fMer(i,j) .GT.0. _d 0) fMer(i,j)  =fac*fMer(i,j)             IF (-fMer(i,j) .GT.0. _d 0) fMer(i,j)  =fac*fMer(i,j)
640             IF (-fVerT(i,j,kUp)*rkSign .GT.0. _d 0)             IF (-fVerT(i,j,kUp)*rkSign .GT.0. _d 0)

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.22