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

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

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

revision 1.6 by jmc, Mon May 2 17:59:14 2016 UTC revision 1.7 by jmc, Wed May 4 22:10:37 2016 UTC
# Line 51  C     == Local variables == Line 51  C     == Local variables ==
51        INTEGER ks        INTEGER ks
52        CHARACTER*10 sufx        CHARACTER*10 sufx
53  c     CHARACTER*(MAX_LEN_MBUF) msgBuf  c     CHARACTER*(MAX_LEN_MBUF) msgBuf
54        _RL     tmpSurf        _RL     locGamma
55  CEOP  CEOP
56    
57  C--   Separate the Hydrostatic Surface Pressure adjusment (=> put it in dPhiNH)  C--   Separate the Hydrostatic Surface Pressure adjusment (=> put it in dPhiNH)
# Line 59  C     from the Non-hydrostatic pressure Line 59  C     from the Non-hydrostatic pressure
59        IF ( nonHydrostatic .AND. exactConserv ) THEN        IF ( nonHydrostatic .AND. exactConserv ) THEN
60         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
61          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
62           IF ( select_rStar.EQ.0 .AND. uniformFreeSurfLev ) THEN  
63             IF ( selectNHfreeSurf.GE.1 ) THEN
64              DO j=1,sNy
65               DO i=1,sNx
66                locGamma = drC(1)*recip_Bo(i,j,bi,bj)
67         &               /( deltaTMom*deltaTFreeSurf
68         &                 *implicitNHPress*implicDiv2DFlow )
69                ks = 1
70    c           ks = kSurfC(i,j,bi,bj)
71    c           IF ( ks.LE.Nr ) THEN
72                 dPhiNH(i,j,bi,bj) = ( phi_nh(i,j,ks,bi,bj)
73         &           + locGamma*Bo_surf(i,j,bi,bj)
74         &                     *implicDiv2DFlow*deltaTFreeSurf
75    c    &                     *( wVel(i,j,ks,bi,bj) - wSurfP2d(i,j) )
76         &                     *( wVel(i,j,ks,bi,bj) - dPhiNH(i,j,bi,bj) )
77         &                           )/(1. _d 0 + locGamma )
78    c           ENDIF
79               ENDDO
80              ENDDO
81             ELSEIF ( uniformFreeSurfLev ) THEN
82  C-       Z coordinate: assume surface @ level k=1  C-       Z coordinate: assume surface @ level k=1
83            DO j=1-OLy,sNy+OLy            DO j=1-OLy,sNy+OLy
84             DO i=1-OLx,sNx+OLx             DO i=1-OLx,sNx+OLx
85               dPhiNH(i,j,bi,bj) = phi_nh(i,j,1,bi,bj)               dPhiNH(i,j,bi,bj) = phi_nh(i,j,1,bi,bj)
86             ENDDO             ENDDO
87            ENDDO            ENDDO
88           ELSEIF ( select_rStar.EQ.0 ) THEN           ELSE
89  C-       Other than Z coordinate: no assumption on surface level index  C-       Other than Z coordinate: no assumption on surface level index
90            DO j=1-OLy,sNy+OLy            DO j=1-OLy,sNy+OLy
91             DO i=1-OLx,sNx+OLx             DO i=1-OLx,sNx+OLx
# Line 78  C-       Other than Z coordinate: no ass Line 97  C-       Other than Z coordinate: no ass
97              ENDIF              ENDIF
98             ENDDO             ENDDO
99            ENDDO            ENDDO
 #ifdef NONLIN_FRSURF  
          ELSE  
 C        rStar : take vertical average of P_NH as Hyd.Surf.Press adjustment  
           DO j=1-OLy,sNy+OLy  
            DO i=1-OLx,sNx+OLx  
              dPhiNH(i,j,bi,bj) = 0.  
            ENDDO  
           ENDDO  
           DO k=1,Nr  
            DO j=1-OLy,sNy+OLy  
             DO i=1-OLx,sNx+OLx  
              dPhiNH(i,j,bi,bj) = dPhiNH(i,j,bi,bj)  
      &         + phi_nh(i,j,k,bi,bj)*drF(k)*h0FacC(i,j,k,bi,bj)  
             ENDDO  
            ENDDO  
           ENDDO  
           DO j=1-OLy,sNy+OLy  
            DO i=1-OLx,sNx+OLx  
              dPhiNH(i,j,bi,bj) = dPhiNH(i,j,bi,bj)*recip_Rcol(i,j,bi,bj)  
            ENDDO  
           ENDDO  
 #endif /* NONLIN_FRSURF */  
          ENDIF  
          IF ( selectNHfreeSurf.GE.1 ) THEN  
           DO j=1,sNy  
            DO i=1,sNx  
              tmpSurf = deltaTMom*deltaTFreeSurf  
      &                *Bo_surf(i,j,bi,bj)*recip_drC(1)  
      &                *implicitNHPress*implicDiv2DFlow  
              dPhiNH(i,j,bi,bj) = ( tmpSurf*dPhiNH(i,j,bi,bj)  
      &           + Bo_surf(i,j,bi,bj)*  
      &                  ( etaH(i,j,bi,bj)-etaN(i,j,bi,bj)  
      &                   +implicDiv2DFlow*deltaTFreeSurf  
 c    &                                   *(wVel(i,j,1,bi,bj)+PmE)  
      &                                   *wVel(i,j,1,bi,bj)  
      &                  )        )/(1. _d 0 + tmpSurf )  
            ENDDO  
           ENDDO  
100           ENDIF           ENDIF
101    
102          ENDDO          ENDDO
103         ENDDO         ENDDO
104         IF ( selectNHfreeSurf.GE.1 .AND.         IF ( selectNHfreeSurf.GE.1 .AND.

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22