/[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.171 by jmc, Thu Aug 7 17:32:03 2014 UTC revision 1.174 by jmc, Fri Aug 15 20:41:50 2014 UTC
# Line 25  C     | SUBROUTINE DYNAMICS Line 25  C     | SUBROUTINE DYNAMICS
25  C     | o Controlling routine for the explicit part of the model  C     | o Controlling routine for the explicit part of the model
26  C     |   dynamics.  C     |   dynamics.
27  C     *==========================================================*  C     *==========================================================*
 C     | This routine evaluates the "dynamics" terms for each  
 C     | block of ocean in turn. Because the blocks of ocean have  
 C     | overlap regions they are independent of one another.  
 C     | If terms involving lateral integrals are needed in this  
 C     | routine care will be needed. Similarly finite-difference  
 C     | operations with stencils wider than the overlap region  
 C     | require special consideration.  
 C     | The algorithm...  
 C     |  
 C     | "Correction Step"  
 C     | =================  
 C     | Here we update the horizontal velocities with the surface  
 C     | pressure such that the resulting flow is either consistent  
 C     | with the free-surface evolution or the rigid-lid:  
 C     |   U[n] = U* + dt x d/dx P  
 C     |   V[n] = V* + dt x d/dy P  
 C     |   W[n] = W* + dt x d/dz P  (NH mode)  
 C     |  
 C     | "Calculation of Gs"  
 C     | ===================  
 C     | This is where all the accelerations and tendencies (ie.  
 C     | physics, parameterizations etc...) are calculated  
 C     |   rho = rho ( theta[n], salt[n] )  
 C     |   b   = b(rho, theta)  
 C     |   K31 = K31 ( rho )  
 C     |   Gu[n] = Gu( u[n], v[n], wVel, b, ... )  
 C     |   Gv[n] = Gv( u[n], v[n], wVel, b, ... )  
 C     |   Gt[n] = Gt( theta[n], u[n], v[n], wVel, K31, ... )  
 C     |   Gs[n] = Gs( salt[n], u[n], v[n], wVel, K31, ... )  
 C     |  
 C     | "Time-stepping" or "Prediction"  
 C     | ================================  
 C     | The models variables are stepped forward with the appropriate  
 C     | time-stepping scheme (currently we use Adams-Bashforth II)  
 C     | - For momentum, the result is always *only* a "prediction"  
 C     | in that the flow may be divergent and will be "corrected"  
 C     | later with a surface pressure gradient.  
 C     | - Normally for tracers the result is the new field at time  
 C     | level [n+1} *BUT* in the case of implicit diffusion the result  
 C     | is also *only* a prediction.  
 C     | - We denote "predictors" with an asterisk (*).  
 C     |   U* = U[n] + dt x ( 3/2 Gu[n] - 1/2 Gu[n-1] )  
 C     |   V* = V[n] + dt x ( 3/2 Gv[n] - 1/2 Gv[n-1] )  
 C     |   theta[n+1] = theta[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )  
 C     |   salt[n+1] = salt[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )  
 C     | With implicit diffusion:  
 C     |   theta* = theta[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )  
 C     |   salt* = salt[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )  
 C     |   (1 + dt * K * d_zz) theta[n] = theta*  
 C     |   (1 + dt * K * d_zz) salt[n] = salt*  
 C     |  
 C     *==========================================================*  
28  C     \ev  C     \ev
29  C     !USES:  C     !USES:
30        IMPLICIT NONE        IMPLICIT NONE
# Line 491  CADJ STORE theta (:,:,k,bi,bj) Line 439  CADJ STORE theta (:,:,k,bi,bj)
439  CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte  CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
440  CADJ STORE salt  (:,:,k,bi,bj)  CADJ STORE salt  (:,:,k,bi,bj)
441  CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte  CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
 CADJ STORE gT(:,:,k,bi,bj)  
 CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte  
 CADJ STORE gS(:,:,k,bi,bj)  
 CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte  
442  # ifdef NONLIN_FRSURF  # ifdef NONLIN_FRSURF
443  cph-test  cph-test
444  CADJ STORE  phiHydC (:,:)  CADJ STORE  phiHydC (:,:)
# Line 649  CADJ STORE gU(:,:,:,bi,bj) = comlev1_bib Line 593  CADJ STORE gU(:,:,:,bi,bj) = comlev1_bib
593            CALL IMPLDIFF(            CALL IMPLDIFF(
594       I         bi, bj, iMin, iMax, jMin, jMax,       I         bi, bj, iMin, iMax, jMin, jMax,
595       I         -1, KappaRU, recip_hFacW(1-OLx,1-OLy,1,bi,bj),       I         -1, KappaRU, recip_hFacW(1-OLx,1-OLy,1,bi,bj),
596       U         gU,       U         gU(1-OLx,1-OLy,1,bi,bj),
597       I         myThid )       I         myThid )
598  #ifdef    ALLOW_AUTODIFF_TAMC  #ifdef    ALLOW_AUTODIFF_TAMC
599  CADJ STORE gV(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte  CADJ STORE gV(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte
# Line 657  CADJ STORE gV(:,:,:,bi,bj) = comlev1_bib Line 601  CADJ STORE gV(:,:,:,bi,bj) = comlev1_bib
601            CALL IMPLDIFF(            CALL IMPLDIFF(
602       I         bi, bj, iMin, iMax, jMin, jMax,       I         bi, bj, iMin, iMax, jMin, jMax,
603       I         -2, KappaRV, recip_hFacS(1-OLx,1-OLy,1,bi,bj),       I         -2, KappaRV, recip_hFacS(1-OLx,1-OLy,1,bi,bj),
604       U         gV,       U         gV(1-OLx,1-OLy,1,bi,bj),
605       I         myThid )       I         myThid )
606          ENDIF          ENDIF
607    
# Line 681  CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_ Line 625  CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_
625            CALL IMPLDIFF(            CALL IMPLDIFF(
626       I         bi, bj, iMin, iMax, jMin, jMax,       I         bi, bj, iMin, iMax, jMin, jMax,
627       I         0, KappaRU, recip_hFacW(1-OLx,1-OLy,1,bi,bj),       I         0, KappaRU, recip_hFacW(1-OLx,1-OLy,1,bi,bj),
628       U         vVelD,       U         vVelD(1-OLx,1-OLy,1,bi,bj),
629       I         myThid )       I         myThid )
630  #ifdef    ALLOW_AUTODIFF_TAMC  #ifdef    ALLOW_AUTODIFF_TAMC
631  CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte  CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte
# Line 689  CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_ Line 633  CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_
633            CALL IMPLDIFF(            CALL IMPLDIFF(
634       I         bi, bj, iMin, iMax, jMin, jMax,       I         bi, bj, iMin, iMax, jMin, jMax,
635       I         0, KappaRV, recip_hFacS(1-OLx,1-OLy,1,bi,bj),       I         0, KappaRV, recip_hFacS(1-OLx,1-OLy,1,bi,bj),
636       U         uVelD,       U         uVelD(1-OLx,1-OLy,1,bi,bj),
637       I         myThid )       I         myThid )
638          ENDIF          ENDIF
639  #endif    /* ALLOW_CD_CODE */  #endif    /* ALLOW_CD_CODE */
# Line 762  Cml) Line 706  Cml)
706         CALL DEBUG_STATS_RL(Nr,salt,'Salt (DYNAMICS)',myThid)         CALL DEBUG_STATS_RL(Nr,salt,'Salt (DYNAMICS)',myThid)
707         CALL DEBUG_STATS_RL(Nr,gU,'Gu (DYNAMICS)',myThid)         CALL DEBUG_STATS_RL(Nr,gU,'Gu (DYNAMICS)',myThid)
708         CALL DEBUG_STATS_RL(Nr,gV,'Gv (DYNAMICS)',myThid)         CALL DEBUG_STATS_RL(Nr,gV,'Gv (DYNAMICS)',myThid)
        CALL DEBUG_STATS_RL(Nr,gT,'Gt (DYNAMICS)',myThid)  
        CALL DEBUG_STATS_RL(Nr,gS,'Gs (DYNAMICS)',myThid)  
709  #ifndef ALLOW_ADAMSBASHFORTH_3  #ifndef ALLOW_ADAMSBASHFORTH_3
710         CALL DEBUG_STATS_RL(Nr,guNm1,'GuNm1 (DYNAMICS)',myThid)         CALL DEBUG_STATS_RL(Nr,guNm1,'GuNm1 (DYNAMICS)',myThid)
711         CALL DEBUG_STATS_RL(Nr,gvNm1,'GvNm1 (DYNAMICS)',myThid)         CALL DEBUG_STATS_RL(Nr,gvNm1,'GvNm1 (DYNAMICS)',myThid)

Legend:
Removed from v.1.171  
changed lines
  Added in v.1.174

  ViewVC Help
Powered by ViewVC 1.1.22