/[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.86 by heimbach, Sun Mar 24 02:36:39 2002 UTC revision 1.90 by mlosch, Wed Sep 18 16:38:01 2002 UTC
# Line 97  C      |-- CALC_VISCOSITY Line 97  C      |-- CALC_VISCOSITY
97  C      |  C      |
98  C      |-- CALC_PHI_HYD    C      |-- CALC_PHI_HYD  
99  C      |  C      |
100    C      |-- STORE_PRESSURE
101    C      |
102  C      |-- MOM_FLUXFORM    C      |-- MOM_FLUXFORM  
103  C      |  C      |
104  C      |-- MOM_VECINV      C      |-- MOM_VECINV    
# Line 158  C                      index into fVerTe Line 160  C                      index into fVerTe
160        INTEGER k, km1, kp1, kup, kDown        INTEGER k, km1, kp1, kup, kDown
161    
162  Cjmc : add for phiHyd output <- but not working if multi tile per CPU  Cjmc : add for phiHyd output <- but not working if multi tile per CPU
163  c     CHARACTER*(MAX_LEN_MBUF) suff  c      CHARACTER*(MAX_LEN_MBUF) suff
164  c     LOGICAL  DIFFERENT_MULTIPLE  c      LOGICAL  DIFFERENT_MULTIPLE
165  c     EXTERNAL DIFFERENT_MULTIPLE  c      EXTERNAL DIFFERENT_MULTIPLE
166  Cjmc(end)  Cjmc(end)
167    
168  C---    The algorithm...  C---    The algorithm...
# Line 215  C     point numbers. This prevents spuri Line 217  C     point numbers. This prevents spuri
217  C     uninitialised but inert locations.  C     uninitialised but inert locations.
218        DO j=1-OLy,sNy+OLy        DO j=1-OLy,sNy+OLy
219         DO i=1-OLx,sNx+OLx         DO i=1-OLx,sNx+OLx
         DO k=1,Nr  
          phiHyd(i,j,k)  = 0. _d 0  
          KappaRU(i,j,k) = 0. _d 0  
          KappaRV(i,j,k) = 0. _d 0  
         ENDDO  
220          rhoKM1 (i,j) = 0. _d 0          rhoKM1 (i,j) = 0. _d 0
221          rhok   (i,j) = 0. _d 0          rhok   (i,j) = 0. _d 0
222          phiSurfX(i,j) = 0. _d 0          phiSurfX(i,j) = 0. _d 0
# Line 227  C     uninitialised but inert locations. Line 224  C     uninitialised but inert locations.
224         ENDDO         ENDDO
225        ENDDO        ENDDO
226    
227    C-- Call to routine for calculation of
228    C   Eliassen-Palm-flux-forced U-tendency,
229    C   if desired:
230    #ifdef INCLUDE_EP_FORCING_CODE
231          CALL CALC_EP_FORCING(myThid)
232    #endif
233    
234  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
235  C--   HPF directive to help TAMC  C--   HPF directive to help TAMC
236  CHPF$ INDEPENDENT  CHPF$ INDEPENDENT
# Line 260  CHPF$&                  ) Line 264  CHPF$&                  )
264  C--     Set up work arrays that need valid initial values  C--     Set up work arrays that need valid initial values
265          DO j=1-OLy,sNy+OLy          DO j=1-OLy,sNy+OLy
266           DO i=1-OLx,sNx+OLx           DO i=1-OLx,sNx+OLx
267              DO k=1,Nr
268               phiHyd(i,j,k)  = 0. _d 0
269               KappaRU(i,j,k) = 0. _d 0
270               KappaRV(i,j,k) = 0. _d 0
271              ENDDO
272            fVerU  (i,j,1) = 0. _d 0            fVerU  (i,j,1) = 0. _d 0
273            fVerU  (i,j,2) = 0. _d 0            fVerU  (i,j,2) = 0. _d 0
274            fVerV  (i,j,1) = 0. _d 0            fVerV  (i,j,1) = 0. _d 0
# Line 339  C        distinguishe between Stagger an Line 348  C        distinguishe between Stagger an
348       I        myThid )       I        myThid )
349           ENDIF           ENDIF
350    
351    C        calculate pressure from phiHyd and store it on common block
352    C        variable pressure
353             CALL STORE_PRESSURE( bi, bj, k, phiHyd, myThid )
354    
355    
356  C--      Calculate accelerations in the momentum equations (gU, gV, ...)  C--      Calculate accelerations in the momentum equations (gU, gV, ...)
357  C        and step forward storing the result in gUnm1, gVnm1, etc...  C        and step forward storing the result in gUnm1, gVnm1, etc...
358           IF ( momStepping ) THEN           IF ( momStepping ) THEN
# Line 385  C--      Apply open boundary conditions Line 399  C--      Apply open boundary conditions
399  C--     end of dynamics k loop (1:Nr)  C--     end of dynamics k loop (1:Nr)
400          ENDDO          ENDDO
401    
   
   
402  C--     Implicit viscosity  C--     Implicit viscosity
403          IF (implicitViscosity.AND.momStepping) THEN          IF (implicitViscosity.AND.momStepping) THEN
404  #ifdef    ALLOW_AUTODIFF_TAMC  #ifdef    ALLOW_AUTODIFF_TAMC
           idkey = iikey + 3  
405  CADJ STORE gUNm1(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte  CADJ STORE gUNm1(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte
406  #endif    /* ALLOW_AUTODIFF_TAMC */  #endif    /* ALLOW_AUTODIFF_TAMC */
407            CALL IMPLDIFF(            CALL IMPLDIFF(
# Line 399  CADJ STORE gUNm1(:,:,:,bi,bj) = comlev1_ Line 410  CADJ STORE gUNm1(:,:,:,bi,bj) = comlev1_
410       U         gUNm1,       U         gUNm1,
411       I         myThid )       I         myThid )
412  #ifdef    ALLOW_AUTODIFF_TAMC  #ifdef    ALLOW_AUTODIFF_TAMC
           idkey = iikey + 4  
413  CADJ STORE gVNm1(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte  CADJ STORE gVNm1(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte
414  #endif    /* ALLOW_AUTODIFF_TAMC */  #endif    /* ALLOW_AUTODIFF_TAMC */
415            CALL IMPLDIFF(            CALL IMPLDIFF(
# Line 419  C--      Apply open boundary conditions Line 429  C--      Apply open boundary conditions
429    
430  #ifdef    INCLUDE_CD_CODE  #ifdef    INCLUDE_CD_CODE
431  #ifdef    ALLOW_AUTODIFF_TAMC  #ifdef    ALLOW_AUTODIFF_TAMC
           idkey = iikey + 5  
432  CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte  CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte
433  #endif    /* ALLOW_AUTODIFF_TAMC */  #endif    /* ALLOW_AUTODIFF_TAMC */
434            CALL IMPLDIFF(            CALL IMPLDIFF(
# Line 428  CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_ Line 437  CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_
437       U         vVelD,       U         vVelD,
438       I         myThid )       I         myThid )
439  #ifdef    ALLOW_AUTODIFF_TAMC  #ifdef    ALLOW_AUTODIFF_TAMC
           idkey = iikey + 6  
440  CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte  CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_bibj , key=ikey, byte=isbyte
441  #endif    /* ALLOW_AUTODIFF_TAMC */  #endif    /* ALLOW_AUTODIFF_TAMC */
442            CALL IMPLDIFF(            CALL IMPLDIFF(
# Line 441  C--     End If implicitViscosity.AND.mom Line 449  C--     End If implicitViscosity.AND.mom
449          ENDIF          ENDIF
450    
451  Cjmc : add for phiHyd output <- but not working if multi tile per CPU  Cjmc : add for phiHyd output <- but not working if multi tile per CPU
452  c       IF ( DIFFERENT_MULTIPLE(dumpFreq,myTime+deltaTClock,myTime)  c        IF ( DIFFERENT_MULTIPLE(dumpFreq,myTime+deltaTClock,myTime)
453  c    &  .AND. buoyancyRelation .eq. 'ATMOSPHERIC' ) THEN  c     &       .AND. buoyancyRelation .ne. 'OCEANIC' ) THEN
454  c         WRITE(suff,'(I10.10)') myIter+1  c           WRITE(suff,'(I10.10)') myIter+1
455  c         CALL WRITE_FLD_XYZ_RL('PH.',suff,phiHyd,myIter+1,myThid)  c           CALL WRITE_FLD_XYZ_RL('PH.',suff,phiHyd,myIter+1,myThid)
456  c       ENDIF  c        ENDIF
457  Cjmc(end)  Cjmc(end)
458    
459  #ifdef ALLOW_TIMEAVE  #ifdef ALLOW_TIMEAVE
# Line 458  Cjmc(end) Line 466  Cjmc(end)
466         ENDDO         ENDDO
467        ENDDO        ENDDO
468    
469    Cml(
470    C     In order to compare the variance of phiHydLow of a p/z-coordinate
471    C     run with etaH of a z/p-coordinate run the drift of phiHydLow
472    C     has to be removed by something like the following subroutine:
473    C      CALL REMOVE_MEAN_RL( 1, phiHydLow, maskH, maskH, rA, drF,
474    C     &                'phiHydLow', myThid )
475    Cml)
476    
477  #ifndef DISABLE_DEBUGMODE  #ifndef DISABLE_DEBUGMODE
478        If (debugMode) THEN        If (debugMode) THEN
479         CALL DEBUG_STATS_RL(1,EtaN,'EtaN (DYNAMICS)',myThid)         CALL DEBUG_STATS_RL(1,EtaN,'EtaN (DYNAMICS)',myThid)

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.90

  ViewVC Help
Powered by ViewVC 1.1.22