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

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

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

revision 1.4 by jmc, Tue Jun 29 22:21:43 2004 UTC revision 1.5 by jmc, Tue Jul 6 01:05:53 2004 UTC
# Line 51  CEOP Line 51  CEOP
51    
52  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
53    
54  C--   Update etaH at the beginning of the time step :  C--   before updating etaH, save current etaH field in etaHnm1
55  C     Incorporate the Explicit part of -Divergence(Barotropic_Flow)           DO j=1-Oly,sNy+Oly
56               DO i=1-Olx,sNx+Olx
57         IF ( useRealFreshWaterFlux .AND. myTime.EQ.startTime ) THEN               etaHnm1(i,j,bi,bj) = etaH(i,j,bi,bj)
58  C     needs previous time-step value of E-P-R, that has not been loaded             ENDDO
 C     and was not in pickup-file ; try to use etaN & etaH instead.  
         DO j=1-Oly,sNy+Oly  
          DO i=1-Olx,sNx+Olx  
            etaH(i,j,bi,bj) = etaN(i,j,bi,bj)  
      &        + (etaN(i,j,bi,bj)-etaH(i,j,bi,bj))  
      &             *(1. - implicDiv2Dflow)/implicDiv2Dflow  
59           ENDDO           ENDDO
         ENDDO  
60    
61         ELSEIF (implicDiv2Dflow.EQ. 1. _d 0) THEN  C--   Update etaH at the end of the time step :
62          DO j=1-Oly,sNy+Oly  C     Incorporate the Explicit part of -Divergence(Barotropic_Flow)
63           DO i=1-Olx,sNx+Olx  
64             etaH(i,j,bi,bj) = etaN(i,j,bi,bj)          IF (implicDiv2Dflow.EQ. 1. _d 0) THEN
65             DO j=1-Oly,sNy+Oly
66              DO i=1-Olx,sNx+Olx
67                etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
68              ENDDO
69           ENDDO           ENDDO
         ENDDO  
70    
71         ELSE          ELSE
72          DO j=1,sNy           DO j=1,sNy
73           DO i=1,sNx            DO i=1,sNx
74             etaH(i,j,bi,bj) = etaN(i,j,bi,bj)              etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
75       &      + (1. - implicDiv2Dflow)*dEtaHdt(i,j,bi,bj)       &       + (1. - implicDiv2Dflow)*dEtaHdt(i,j,bi,bj)
76       &                              *deltaTfreesurf       &                               *deltaTfreesurf
77              ENDDO
78           ENDDO           ENDDO
79          ENDDO          ENDIF
        ENDIF  
80    
81  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
82  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
# Line 103  C- end bi,bj loop. Line 99  C- end bi,bj loop.
99        ENDDO        ENDDO
100    
101        IF (implicDiv2Dflow .NE. 1. _d 0 .OR. useOBCS )        IF (implicDiv2Dflow .NE. 1. _d 0 .OR. useOBCS )
102       &    _EXCH_XY_RL(etaH, myThid )       &    _EXCH_XY_RL( etaH, myThid )
103    
104          IF (useRealFreshWaterFlux .AND. myTime.EQ.startTime)
105         &    _EXCH_XY_R4( PmEpR, myThid )
106    
       IF ( buoyancyRelation.EQ.'OCEANICP'  
      &     .AND. useRealFreshWaterFlux  
      &     .AND. myTime.EQ.startTime ) THEN  
           _EXCH_XY_RS(PmEpR, myThid )  
       ENDIF  
107  #endif /* EXACT_CONSERV */  #endif /* EXACT_CONSERV */
108    
109        RETURN        RETURN

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22