/[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.42 by heimbach, Fri Jun 27 01:51:10 2003 UTC revision 1.43 by heimbach, Tue Jul 8 15:00:26 2003 UTC
# Line 172  C     This is currently used by IVDC and Line 172  C     This is currently used by IVDC and
172  CEOP  CEOP
173    
174  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
175           IF (debugMode) CALL DEBUG_ENTER('FORWARD_STEP',myThid)           IF ( debugLevel .GE. debLevB )
176         &    CALL DEBUG_ENTER('FORWARD_STEP',myThid)
177  #endif  #endif
178    
179  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
# Line 302  CADJ STORE vvel (:,:,:,bi,bj) = comlev1_ Line 303  CADJ STORE vvel (:,:,:,bi,bj) = comlev1_
303  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
304    
305  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
306          IF (debugMode) CALL DEBUG_MSG('ENTERING UPWARD K LOOP',myThid)          IF ( debugLevel .GE. debLevB )
307         &    CALL DEBUG_MSG('ENTERING UPWARD K LOOP',myThid)
308  #endif  #endif
309    
310  C--     Start of diagnostic loop  C--     Start of diagnostic loop
# Line 340  C         slope terms (e.g. GM/Redi tens Line 342  C         slope terms (e.g. GM/Redi tens
342  c         IF ( k.GT.1 .AND. (useGMRedi.OR.ivdc_kappa.NE.0.) ) THEN  c         IF ( k.GT.1 .AND. (useGMRedi.OR.ivdc_kappa.NE.0.) ) THEN
343            IF ( useGMRedi .OR. (k.GT.1 .AND. ivdc_kappa.NE.0.) ) THEN            IF ( useGMRedi .OR. (k.GT.1 .AND. ivdc_kappa.NE.0.) ) THEN
344  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
345              IF (debugMode) CALL DEBUG_CALL('FIND_RHO',myThid)              IF ( debugLevel .GE. debLevB )
346         &       CALL DEBUG_CALL('FIND_RHO',myThid)
347  #endif  #endif
348  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
349  CADJ STORE theta(:,:,k,bi,bj) = comlev1_bibj_k, key=kkey, byte=isbyte  CADJ STORE theta(:,:,k,bi,bj) = comlev1_bibj_k, key=kkey, byte=isbyte
# Line 364  CADJ STORE salt (:,:,k-1,bi,bj) = comlev Line 367  CADJ STORE salt (:,:,k-1,bi,bj) = comlev
367       I        myThid )       I        myThid )
368              ENDIF              ENDIF
369  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
370              IF (debugMode) CALL DEBUG_CALL('GRAD_SIGMA',myThid)              IF ( debugLevel .GE. debLevB )
371         &       CALL DEBUG_CALL('GRAD_SIGMA',myThid)
372  #endif  #endif
373              CALL GRAD_SIGMA(              CALL GRAD_SIGMA(
374       I             bi, bj, iMin, iMax, jMin, jMax, k,       I             bi, bj, iMin, iMax, jMin, jMax, k,
# Line 381  C--       Implicit Vertical Diffusion fo Line 385  C--       Implicit Vertical Diffusion fo
385  c ==> should use sigmaR !!!  c ==> should use sigmaR !!!
386            IF (k.GT.1 .AND. ivdc_kappa.NE.0.) THEN            IF (k.GT.1 .AND. ivdc_kappa.NE.0.) THEN
387  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
388              IF (debugMode) CALL DEBUG_CALL('CALC_IVDC',myThid)              IF ( debugLevel .GE. debLevB )
389         &       CALL DEBUG_CALL('CALC_IVDC',myThid)
390  #endif  #endif
391              CALL CALC_IVDC(              CALL CALC_IVDC(
392       I        bi, bj, iMin, iMax, jMin, jMax, k,       I        bi, bj, iMin, iMax, jMin, jMax, k,
# Line 404  CADJ STORE wvel (:,:,:,bi,bj) = comlev1_ Line 409  CADJ STORE wvel (:,:,:,bi,bj) = comlev1_
409  C--     Calculate future values on open boundaries  C--     Calculate future values on open boundaries
410          IF (useOBCS) THEN          IF (useOBCS) THEN
411  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
412            IF (debugMode) CALL DEBUG_CALL('OBCS_CALC',myThid)            IF ( debugLevel .GE. debLevB )
413         &     CALL DEBUG_CALL('OBCS_CALC',myThid)
414  #endif  #endif
415            CALL OBCS_CALC( bi, bj, myTime+deltaT, myIter+1,            CALL OBCS_CALC( bi, bj, myTime+deltaT, myIter+1,
416       I            uVel, vVel, wVel, theta, salt,       I            uVel, vVel, wVel, theta, salt,
# Line 417  c*************************************** Line 423  c***************************************
423  cswdice --- add ---  cswdice --- add ---
424  #ifdef ALLOW_THERM_SEAICE  #ifdef ALLOW_THERM_SEAICE
425  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
426          IF (debugMode) CALL DEBUG_CALL('ICE_FORCING',myThid)          IF ( debugLevel .GE. debLevB )
427         &    CALL DEBUG_CALL('ICE_FORCING',myThid)
428  #endif  #endif
429  C--     Determines forcing terms based on external fields  C--     Determines forcing terms based on external fields
430  c--     including effects from ice  c--     including effects from ice
# Line 431  cswdice --- end add --- Line 438  cswdice --- end add ---
438  C--     Determines forcing terms based on external fields  C--     Determines forcing terms based on external fields
439  C       relaxation terms, etc.  C       relaxation terms, etc.
440  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
441          IF (debugMode) CALL DEBUG_CALL('EXTERNAL_FORCING_SURF',myThid)          IF ( debugLevel .GE. debLevB )
442         &    CALL DEBUG_CALL('EXTERNAL_FORCING_SURF',myThid)
443  #endif  #endif
444          CALL EXTERNAL_FORCING_SURF(          CALL EXTERNAL_FORCING_SURF(
445       I             bi, bj, iMin, iMax, jMin, jMax,       I             bi, bj, iMin, iMax, jMin, jMax,
# Line 474  CADJ STORE sigmaR(:,:,:)        = comlev Line 482  CADJ STORE sigmaR(:,:,:)        = comlev
482  C--     Calculate iso-neutral slopes for the GM/Redi parameterisation  C--     Calculate iso-neutral slopes for the GM/Redi parameterisation
483          IF (useGMRedi) THEN          IF (useGMRedi) THEN
484  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
485            IF (debugMode) CALL DEBUG_CALL('GMREDI_CALC_TENSOR',myThid)            IF ( debugLevel .GE. debLevB )
486         &     CALL DEBUG_CALL('GMREDI_CALC_TENSOR',myThid)
487  #endif  #endif
488            CALL GMREDI_CALC_TENSOR(            CALL GMREDI_CALC_TENSOR(
489       I             bi, bj, iMin, iMax, jMin, jMax,       I             bi, bj, iMin, iMax, jMin, jMax,
# Line 501  CADJ STORE Kwz(:,:,:,bi,bj)   = comlev1_ Line 510  CADJ STORE Kwz(:,:,:,bi,bj)   = comlev1_
510  C--     Compute KPP mixing coefficients  C--     Compute KPP mixing coefficients
511          IF (useKPP) THEN          IF (useKPP) THEN
512  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
513            IF (debugMode) CALL DEBUG_CALL('KPP_CALC',myThid)            IF ( debugLevel .GE. debLevB )
514         &     CALL DEBUG_CALL('KPP_CALC',myThid)
515  #endif  #endif
516            CALL KPP_CALC(            CALL KPP_CALC(
517       I                  bi, bj, myTime, myThid )       I                  bi, bj, myTime, myThid )
# Line 543  cphCADJ &                              k Line 553  cphCADJ &                              k
553  C       AIM - atmospheric intermediate model, physics package code.  C       AIM - atmospheric intermediate model, physics package code.
554          IF ( useAIM ) THEN          IF ( useAIM ) THEN
555  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
556            IF (debugMode) CALL DEBUG_CALL('AIM_DO_PHYSICS',myThid)            IF ( debugLevel .GE. debLevB )
557         &     CALL DEBUG_CALL('AIM_DO_PHYSICS',myThid)
558  #endif  #endif
559           CALL TIMER_START('AIM_DO_PHYSICS   [THERMODYNAMICS]', myThid)           CALL TIMER_START('AIM_DO_PHYSICS   [THERMODYNAMICS]', myThid)
560           CALL AIM_DO_PHYSICS( bi, bj, myTime, myIter, myThid )           CALL AIM_DO_PHYSICS( bi, bj, myTime, myIter, myThid )
# Line 564  C Edit GAD_OPTIONS.h and #define DISABLE Line 575  C Edit GAD_OPTIONS.h and #define DISABLE
575  C disable this section of code.  C disable this section of code.
576          IF (tempMultiDimAdvec) THEN          IF (tempMultiDimAdvec) THEN
577  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
578            IF (debugMode) CALL DEBUG_CALL('GAD_ADVECTION',myThid)            IF ( debugLevel .GE. debLevB )
579         &     CALL DEBUG_CALL('GAD_ADVECTION',myThid)
580  #endif  #endif
581            CALL GAD_ADVECTION(bi,bj,tempAdvScheme,GAD_TEMPERATURE,            CALL GAD_ADVECTION(bi,bj,tempAdvScheme,GAD_TEMPERATURE,
582       U                      theta,gT,       U                      theta,gT,
# Line 572  C disable this section of code. Line 584  C disable this section of code.
584          ENDIF          ENDIF
585          IF (saltMultiDimAdvec) THEN          IF (saltMultiDimAdvec) THEN
586  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
587            IF (debugMode) CALL DEBUG_CALL('GAD_ADVECTION',myThid)            IF ( debugLevel .GE. debLevB )
588         &     CALL DEBUG_CALL('GAD_ADVECTION',myThid)
589  #endif  #endif
590            CALL GAD_ADVECTION(bi,bj,saltAdvScheme,GAD_SALINITY,            CALL GAD_ADVECTION(bi,bj,saltAdvScheme,GAD_SALINITY,
591       U                      salt,gS,       U                      salt,gS,
# Line 584  C of whether multiDimAdvection is set or Line 597  C of whether multiDimAdvection is set or
597  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
598          IF ( usePTRACERS ) THEN          IF ( usePTRACERS ) THEN
599  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
600            IF (debugMode) CALL DEBUG_CALL('PTRACERS_ADVECTION',myThid)            IF ( debugLevel .GE. debLevB )
601         &     CALL DEBUG_CALL('PTRACERS_ADVECTION',myThid)
602  #endif  #endif
603           CALL PTRACERS_ADVECTION( bi,bj,myIter,myTime,myThid )           CALL PTRACERS_ADVECTION( bi,bj,myIter,myTime,myThid )
604          ENDIF          ENDIF
# Line 592  C of whether multiDimAdvection is set or Line 606  C of whether multiDimAdvection is set or
606  #endif /* DISABLE_MULTIDIM_ADVECTION */  #endif /* DISABLE_MULTIDIM_ADVECTION */
607    
608  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
609         IF (debugMode) CALL DEBUG_MSG('ENTERING DOWNWARD K LOOP',myThid)         IF ( debugLevel .GE. debLevB )
610         &    CALL DEBUG_MSG('ENTERING DOWNWARD K LOOP',myThid)
611  #endif  #endif
612    
613  C--     Start of thermodynamics loop  C--     Start of thermodynamics loop
# Line 848  C--   end bi,bj loops. Line 863  C--   end bi,bj loops.
863  #endif  #endif
864    
865  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
866           IF (debugMode) CALL DEBUG_LEAVE('FORWARD_STEP',myThid)           IF ( debugLevel .GE. debLevB )
867         &    CALL DEBUG_LEAVE('FORWARD_STEP',myThid)
868  #endif  #endif
869    
870        RETURN        RETURN

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.22