/[MITgcm]/MITgcm/model/src/thermodynamics.F
ViewVC logotype

Diff of /MITgcm/model/src/thermodynamics.F

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

revision 1.74 by jmc, Tue Jul 13 16:48:48 2004 UTC revision 1.75 by stephd, Wed Sep 1 16:25:06 2004 UTC
# Line 81  C     == Global variables === Line 81  C     == Global variables ===
81  #ifdef ALLOW_PASSIVE_TRACER  #ifdef ALLOW_PASSIVE_TRACER
82  #include "TR1.h"  #include "TR1.h"
83  #endif  #endif
84    #ifdef ALLOW_OFFLINE
85    #include "OFFLINE.h"
86    #endif
87  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
88  #include "PTRACERS_SIZE.h"  #include "PTRACERS_SIZE.h"
89  #include "PTRACERS.h"  #include "PTRACERS.h"
# Line 105  C     == Global variables === Line 108  C     == Global variables ===
108  # endif  # endif
109  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
110    
111    
112  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
113  C     == Routine arguments ==  C     == Routine arguments ==
114  C     myTime - Current time in simulation  C     myTime - Current time in simulation
# Line 314  C to be able to exclude this scheme to a Line 318  C to be able to exclude this scheme to a
318  C recomputation. It *is* differentiable, if you need it.  C recomputation. It *is* differentiable, if you need it.
319  C Edit GAD_OPTIONS.h and #define DISABLE_MULTIDIM_ADVECTION to  C Edit GAD_OPTIONS.h and #define DISABLE_MULTIDIM_ADVECTION to
320  C disable this section of code.  C disable this section of code.
321    #ifndef ALLOW_OFFLINE
322          IF (tempMultiDimAdvec) THEN          IF (tempMultiDimAdvec) THEN
323  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
324            IF ( debugLevel .GE. debLevB )            IF ( debugLevel .GE. debLevB )
# Line 326  C disable this section of code. Line 331  C disable this section of code.
331       O             gT,       O             gT,
332       I             bi,bj,myTime,myIter,myThid)       I             bi,bj,myTime,myIter,myThid)
333          ENDIF          ENDIF
334    #endif
335    #ifndef ALLOW_OFFLINE
336          IF (saltMultiDimAdvec) THEN          IF (saltMultiDimAdvec) THEN
337  #ifdef ALLOW_DEBUG  #ifdef ALLOW_DEBUG
338            IF ( debugLevel .GE. debLevB )            IF ( debugLevel .GE. debLevB )
# Line 338  C disable this section of code. Line 345  C disable this section of code.
345       O             gS,       O             gS,
346       I             bi,bj,myTime,myIter,myThid)       I             bi,bj,myTime,myIter,myThid)
347          ENDIF          ENDIF
348    #endif
349  C Since passive tracers are configurable separately from T,S we  C Since passive tracers are configurable separately from T,S we
350  C call the multi-dimensional method for PTRACERS regardless  C call the multi-dimensional method for PTRACERS regardless
351  C of whether multiDimAdvection is set or not.  C of whether multiDimAdvection is set or not.
# Line 452  CADJ STORE KappaRS(:,:,k)    = comlev1_b Line 460  CADJ STORE KappaRS(:,:,k)    = comlev1_b
460    
461  C--      Calculate active tracer tendencies (gT,gS,...)  C--      Calculate active tracer tendencies (gT,gS,...)
462  C        and step forward storing result in gTnm1, gSnm1, etc.  C        and step forward storing result in gTnm1, gSnm1, etc.
463    #ifndef ALLOW_OFFLINE
464           IF ( tempStepping ) THEN           IF ( tempStepping ) THEN
465             CALL CALC_GT(             CALL CALC_GT(
466       I         bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown,       I         bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown,
# Line 464  C        and step forward storing result Line 473  C        and step forward storing result
473       I         theta, gT,       I         theta, gT,
474       I         myIter, myThid)       I         myIter, myThid)
475           ENDIF           ENDIF
476    #endif
477    
478    #ifndef ALLOW_OFFLINE
479           IF ( saltStepping ) THEN           IF ( saltStepping ) THEN
480             CALL CALC_GS(             CALL CALC_GS(
481       I         bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown,       I         bi,bj,iMin,iMax,jMin,jMax, k,km1,kup,kDown,
# Line 477  C        and step forward storing result Line 488  C        and step forward storing result
488       I         salt, gS,       I         salt, gS,
489       I         myIter, myThid)       I         myIter, myThid)
490           ENDIF           ENDIF
491    #endif
492  #ifdef ALLOW_PASSIVE_TRACER  #ifdef ALLOW_PASSIVE_TRACER
493  ceh3 needs an IF ( usePASSIVE_TRACER ) THEN  ceh3 needs an IF ( usePASSIVE_TRACER ) THEN
494           IF ( tr1Stepping ) THEN           IF ( tr1Stepping ) THEN
# Line 512  C--      Apply open boundary conditions Line 524  C--      Apply open boundary conditions
524  C--      Freeze water  C--      Freeze water
525  C  this bit of code is left here for backward compatibility.  C  this bit of code is left here for backward compatibility.
526  C  freezing at surface level has been moved to FORWARD_STEP  C  freezing at surface level has been moved to FORWARD_STEP
527    #ifndef ALLOW_OFFLINE
528           IF ( useOldFreezing .AND. .NOT. useSEAICE           IF ( useOldFreezing .AND. .NOT. useSEAICE
529       &       .AND. .NOT.(useThSIce.AND.k.EQ.1) ) THEN       &       .AND. .NOT.(useThSIce.AND.k.EQ.1) ) THEN
530  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
# Line 520  CADJ &   , key = kkey, byte = isbyte Line 533  CADJ &   , key = kkey, byte = isbyte
533  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
534              CALL FREEZE( bi, bj, iMin, iMax, jMin, jMax, k, myThid )              CALL FREEZE( bi, bj, iMin, iMax, jMin, jMax, k, myThid )
535           ENDIF           ENDIF
536    #endif
537    
538  C--     end of thermodynamic k loop (Nr:1)  C--     end of thermodynamic k loop (Nr:1)
539          ENDDO          ENDDO
540    
541    
542  C--     Implicit vertical advection & diffusion  C--     Implicit vertical advection & diffusion
543    #ifndef ALLOW_OFFLINE
544  #ifdef INCLUDE_IMPLVERTADV_CODE  #ifdef INCLUDE_IMPLVERTADV_CODE
545          IF ( tempImplVertAdv ) THEN          IF ( tempImplVertAdv ) THEN
546            CALL GAD_IMPLICIT_R(            CALL GAD_IMPLICIT_R(
# Line 547  CADJ STORE gT(:,:,:,bi,bj) = comlev1_bib Line 562  CADJ STORE gT(:,:,:,bi,bj) = comlev1_bib
562       U         gT,       U         gT,
563       I         myThid )       I         myThid )
564          ENDIF          ENDIF
565    #endif
566    
567    #ifndef ALLOW_OFFLINE
568  #ifdef INCLUDE_IMPLVERTADV_CODE  #ifdef INCLUDE_IMPLVERTADV_CODE
569          IF ( saltImplVertAdv ) THEN          IF ( saltImplVertAdv ) THEN
570            CALL GAD_IMPLICIT_R(            CALL GAD_IMPLICIT_R(
# Line 569  CADJ STORE gS(:,:,:,bi,bj) = comlev1_bib Line 586  CADJ STORE gS(:,:,:,bi,bj) = comlev1_bib
586       U         gS,       U         gS,
587       I         myThid )       I         myThid )
588          ENDIF          ENDIF
589    #endif
590    
591  #ifdef ALLOW_PASSIVE_TRACER  #ifdef ALLOW_PASSIVE_TRACER
592          IF ( tr1Stepping .AND. implicitDiffusion ) THEN          IF ( tr1Stepping .AND. implicitDiffusion ) THEN

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75

  ViewVC Help
Powered by ViewVC 1.1.22