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

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

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

revision 1.1 by jmc, Sat Sep 11 21:27:13 2010 UTC revision 1.2 by jmc, Fri Apr 4 20:56:32 2014 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "PACKAGES_CONFIG.h"  #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    c#ifdef ALLOW_AUTODIFF
7    c# include "AUTODIFF_OPTIONS.h"
8    c#endif
9    
10  CBOP  CBOP
11  C     !ROUTINE: UPDATE_SIGMA  C     !ROUTINE: UPDATE_SIGMA
# Line 25  C     == Global variables Line 28  C     == Global variables
28  c #include "DYNVARS.h"  c #include "DYNVARS.h"
29  #include "GRID.h"  #include "GRID.h"
30  #include "SURFACE.h"  #include "SURFACE.h"
31  #ifdef ALLOW_AUTODIFF_TAMC  c#ifdef ALLOW_AUTODIFF_TAMC
32  # include "tamc.h"  c# include "tamc.h"
33  # include "tamc_keys.h"  c# include "tamc_keys.h"
34  #endif  c#endif
35    
36  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
37  C     == Routine arguments ==  C     == Routine arguments ==
# Line 98  c       ENDIF Line 101  c       ENDIF
101  c#endif /* ALLOW_OBCS */  c#endif /* ALLOW_OBCS */
102    
103  C-- Update the fractional thickness hFacC (& "recip_hFac") :  C-- Update the fractional thickness hFacC (& "recip_hFac") :
104          DO j=1-Oly,sNy+Oly          DO j=1-OLy,sNy+OLy
105           DO i=1-Olx,sNx+Olx           DO i=1-OLx,sNx+OLx
106            IF ( kSurfC(i,j,bi,bj).LE.Nr ) THEN            IF ( kSurfC(i,j,bi,bj).LE.Nr ) THEN
107             tmpFld(i,j) = etaHc(i,j,bi,bj)             tmpFld(i,j) = etaHc(i,j,bi,bj)
108       &                 + ( Ro_surf(i,j,bi,bj)-R_low(i,j,bi,bj) )       &                 + ( Ro_surf(i,j,bi,bj)-R_low(i,j,bi,bj) )
# Line 109  C-- Update the fractional thickness hFac Line 112  C-- Update the fractional thickness hFac
112           ENDDO           ENDDO
113          ENDDO          ENDDO
114          DO k=1,Nr          DO k=1,Nr
115           DO j=1-Oly,sNy+Oly           DO j=1-OLy,sNy+OLy
116            DO i=1-Olx,sNx+Olx            DO i=1-OLx,sNx+OLx
117              hFacC(i,j,k,bi,bj) = maskC(i,j,k,bi,bj)              hFacC(i,j,k,bi,bj) = maskC(i,j,k,bi,bj)
118       &                         *( dAHybSigF(k)*rFullDepth       &                         *( dAHybSigF(k)*rFullDepth
119       &                           +dBHybSigF(k)*tmpFld(i,j)       &                           +dBHybSigF(k)*tmpFld(i,j)
# Line 124  C-- Update the fractional thickness hFac Line 127  C-- Update the fractional thickness hFac
127          ENDDO          ENDDO
128    
129  C-- Update the fractional thickness hFacW (& "recip_hFac") :  C-- Update the fractional thickness hFacW (& "recip_hFac") :
130          DO j=1-Oly,sNy+Oly          DO j=1-OLy,sNy+OLy
131           DO i=1-Olx,sNx+Olx           DO i=1-OLx,sNx+OLx
132            IF ( kSurfW(i,j,bi,bj).LE.Nr ) THEN            IF ( kSurfW(i,j,bi,bj).LE.Nr ) THEN
133             tmpFld(i,j) = etaHw(i,j,bi,bj)             tmpFld(i,j) = etaHw(i,j,bi,bj)
134       &                 + ( rSurfW(i,j,bi,bj)-rLowW(i,j,bi,bj) )       &                 + ( rSurfW(i,j,bi,bj)-rLowW(i,j,bi,bj) )
# Line 135  C-- Update the fractional thickness hFac Line 138  C-- Update the fractional thickness hFac
138           ENDDO           ENDDO
139          ENDDO          ENDDO
140          DO k=1,Nr          DO k=1,Nr
141           DO j=1-Oly,sNy+Oly           DO j=1-OLy,sNy+OLy
142            DO i=1-Olx,sNx+Olx            DO i=1-OLx,sNx+OLx
143              hFacW(i,j,k,bi,bj) = maskW(i,j,k,bi,bj)              hFacW(i,j,k,bi,bj) = maskW(i,j,k,bi,bj)
144       &                         *( dAHybSigF(k)*rFullDepth       &                         *( dAHybSigF(k)*rFullDepth
145       &                           +dBHybSigF(k)*tmpFld(i,j)       &                           +dBHybSigF(k)*tmpFld(i,j)
# Line 150  C-- Update the fractional thickness hFac Line 153  C-- Update the fractional thickness hFac
153          ENDDO          ENDDO
154    
155  C-- Update the fractional thickness hFacS (& "recip_hFac") :  C-- Update the fractional thickness hFacS (& "recip_hFac") :
156          DO j=1-Oly,sNy+Oly          DO j=1-OLy,sNy+OLy
157           DO i=1-Olx,sNx+Olx           DO i=1-OLx,sNx+OLx
158            IF ( kSurfS(i,j,bi,bj).LE.Nr ) THEN            IF ( kSurfS(i,j,bi,bj).LE.Nr ) THEN
159             tmpFld(i,j) = etaHs(i,j,bi,bj)             tmpFld(i,j) = etaHs(i,j,bi,bj)
160       &                 + ( rSurfS(i,j,bi,bj)-rLowS(i,j,bi,bj) )       &                 + ( rSurfS(i,j,bi,bj)-rLowS(i,j,bi,bj) )
# Line 161  C-- Update the fractional thickness hFac Line 164  C-- Update the fractional thickness hFac
164           ENDDO           ENDDO
165          ENDDO          ENDDO
166          DO k=1,Nr          DO k=1,Nr
167           DO j=1-Oly,sNy+Oly           DO j=1-OLy,sNy+OLy
168            DO i=1-Olx,sNx+Olx            DO i=1-OLx,sNx+OLx
169              hFacS(i,j,k,bi,bj) = maskS(i,j,k,bi,bj)              hFacS(i,j,k,bi,bj) = maskS(i,j,k,bi,bj)
170       &                         *( dAHybSigF(k)*rFullDepth       &                         *( dAHybSigF(k)*rFullDepth
171       &                           +dBHybSigF(k)*tmpFld(i,j)       &                           +dBHybSigF(k)*tmpFld(i,j)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22