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

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

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

revision 1.41 by adcroft, Mon May 3 21:45:57 1999 UTC revision 1.42 by adcroft, Tue May 18 18:01:12 1999 UTC
# Line 28  C     == Global variables === Line 28  C     == Global variables ===
28  #include "CG2D.h"  #include "CG2D.h"
29  #include "PARAMS.h"  #include "PARAMS.h"
30  #include "DYNVARS.h"  #include "DYNVARS.h"
31    #include "GRID.h"
32    #ifdef ALLOW_KPP
33    #include "KPPMIX.h"
34    #endif
35    
36  C     == Routine arguments ==  C     == Routine arguments ==
37  C     myTime - Current time in simulation  C     myTime - Current time in simulation
# Line 118  C                      index into fVerTe Line 122  C                      index into fVerTe
122        _RL KapGM   (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL KapGM   (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
123        _RL KappaRT (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)        _RL KappaRT (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
124        _RL KappaRS (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)        _RL KappaRS (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
125          _RL KappaRU (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
126          _RL KappaRV (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
127    
128        INTEGER iMin, iMax        INTEGER iMin, iMax
129        INTEGER jMin, jMax        INTEGER jMin, jMax
# Line 269  C--     Density of 1st level (below W(1) Line 275  C--     Density of 1st level (below W(1)
275       I     myThid )       I     myThid )
276  #endif  #endif
277    
278          IF ( .NOT. BOTTOM_LAYER ) THEN          IF (       (.NOT. BOTTOM_LAYER)
279    #ifdef ALLOW_KPP
280         &       .AND. (.NOT.usingKPPmixing) ! CONVECT not needed with KPP mixing
281    #endif
282         &     ) THEN
283  C--      Check static stability with layer below  C--      Check static stability with layer below
284  C--      and mix as needed.  C--      and mix as needed.
285  #ifdef  INCLUDE_FIND_RHO_CALL  #ifdef  INCLUDE_FIND_RHO_CALL
# Line 321  C--      Density of K level (below W(K)) Line 331  C--      Density of K level (below W(K))
331       O      rhoK,       O      rhoK,
332       I      myThid )       I      myThid )
333  #endif  #endif
334           IF ( .NOT. BOTTOM_LAYER ) THEN           IF (       (.NOT. BOTTOM_LAYER)
335    #ifdef ALLOW_KPP
336         &       .AND. (.NOT.usingKPPmixing) ! CONVECT not needed with KPP mixing
337    #endif
338         &      ) THEN
339  C--       Check static stability with layer below and mix as needed.  C--       Check static stability with layer below and mix as needed.
340  C--       Density of K+1 level (below W(K+1)) reference to K level.  C--       Density of K+1 level (below W(K+1)) reference to K level.
341  #ifdef  INCLUDE_FIND_RHO_CALL  #ifdef  INCLUDE_FIND_RHO_CALL
# Line 378  C--      Calculate iso-neutral slopes fo Line 392  C--      Calculate iso-neutral slopes fo
392           ENDDO           ENDDO
393          ENDDO ! K          ENDDO ! K
394    
395    #ifdef ALLOW_KPP
396    C--     Compute KPP mixing coefficients
397            IF (usingKPPmixing) THEN
398             CALL TIMER_START('KVMIX (FIND KPP COEFFICIENTS) [DYNAMICS]'
399         I          , myThid)
400             CALL KVMIX(
401         I               bi, bj, myTime, myThid )
402             CALL TIMER_STOP ('KVMIX (FIND KPP COEFFICIENTS) [DYNAMICS]'
403         I        , myThid)
404            ENDIF
405    #endif
406    
407          DO K = Nr, 1, -1          DO K = Nr, 1, -1
408    
409           kM1  =max(1,k-1)   ! Points to level above k (=k-1)           kM1  =max(1,k-1)   ! Points to level above k (=k-1)
# Line 398  C--      Calculate the total vertical di Line 424  C--      Calculate the total vertical di
424           CALL CALC_DIFFUSIVITY(           CALL CALC_DIFFUSIVITY(
425       I        bi,bj,iMin,iMax,jMin,jMax,K,       I        bi,bj,iMin,iMax,jMin,jMax,K,
426       I        maskC,maskUp,KapGM,K33,       I        maskC,maskUp,KapGM,K33,
427       O        KappaRT,KappaRS,       O        KappaRT,KappaRS,KappaRU,KappaRV,
428       I        myThid)       I        myThid)
429  #endif  #endif
430  C--      Calculate accelerations in the momentum equations  C--      Calculate accelerations in the momentum equations
# Line 406  C--      Calculate accelerations in the Line 432  C--      Calculate accelerations in the
432            CALL CALC_MOM_RHS(            CALL CALC_MOM_RHS(
433       I         bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,       I         bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
434       I         xA,yA,uTrans,vTrans,rTrans,rVel,maskC,       I         xA,yA,uTrans,vTrans,rTrans,rVel,maskC,
435       I         phiHyd,       I         phiHyd,KappaRU,KappaRV,
436       U         aTerm,xTerm,cTerm,mTerm,pTerm,       U         aTerm,xTerm,cTerm,mTerm,pTerm,
437       U         fZon, fMer, fVerU, fVerV,       U         fZon, fMer, fVerU, fVerV,
438       I         myTime, myThid)       I         myTime, myThid)
# Line 457  C--      Cumulative diagnostic calculati Line 483  C--      Cumulative diagnostic calculati
483    
484  C--     Implicit diffusion  C--     Implicit diffusion
485          IF (implicitDiffusion) THEN          IF (implicitDiffusion) THEN
486           CALL IMPLDIFF( bi, bj, iMin, iMax, jMin, jMax,           IF (tempStepping) CALL IMPLDIFF(
487       I                  KappaRT,KappaRS,       I         bi, bj, iMin, iMax, jMin, jMax,
488       I                  myThid )       I         deltaTtracer, KappaRT,recip_HFacC,
489          ENDIF       U         gTNm1,
490         I         myThid )
491             IF (saltStepping) CALL IMPLDIFF(
492         I         bi, bj, iMin, iMax, jMin, jMax,
493         I         deltaTtracer, KappaRS,recip_HFacC,
494         U         gSNm1,
495         I         myThid )
496             IF (momStepping) THEN
497              CALL IMPLDIFF(
498         I         bi, bj, iMin, iMax, jMin, jMax,
499         I         deltaTmom, KappaRU,recip_HFacW,
500         U         gUNm1,
501         I         myThid )
502              CALL IMPLDIFF(
503         I         bi, bj, iMin, iMax, jMin, jMax,
504         I         deltaTmom, KappaRV,recip_HFacS,
505         U         gVNm1,
506         I         myThid )
507    #ifdef INCLUDE_CD_CODE
508              CALL IMPLDIFF(
509         I         bi, bj, iMin, iMax, jMin, jMax,
510         I         deltaTmom, KappaRU,recip_HFacW,
511         U         vVelD,
512         I         myThid )
513              CALL IMPLDIFF(
514         I         bi, bj, iMin, iMax, jMin, jMax,
515         I         deltaTmom, KappaRV,recip_HFacS,
516         U         uVelD,
517         I         myThid )
518    #endif
519             ENDIF ! momStepping
520            ENDIF ! implicitDiffusion
521    
522         ENDDO         ENDDO
523        ENDDO        ENDDO

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

  ViewVC Help
Powered by ViewVC 1.1.22