/[MITgcm]/MITgcm/pkg/shap_filt/shap_filt_tracer_s2.F
ViewVC logotype

Diff of /MITgcm/pkg/shap_filt/shap_filt_tracer_s2.F

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

revision 1.7 by jmc, Tue Feb 15 00:21:12 2005 UTC revision 1.8 by jmc, Tue Sep 27 22:11:06 2005 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4  #include "SHAP_FILT_OPTIONS.h"  #include "SHAP_FILT_OPTIONS.h"
5    
6  CBOP  CBOP
7  C     !ROUTINE: SHAP_FILT_TRACER_S2  C     !ROUTINE: SHAP_FILT_TRACER_S2
8  C     !INTERFACE:  C     !INTERFACE:
# Line 18  C     | o Options for computational filt Line 18  C     | o Options for computational filt
18  C     |   or physical space filter (with grid spacing) or both.  C     |   or physical space filter (with grid spacing) or both.
19  C     *==========================================================*  C     *==========================================================*
20  C     \ev  C     \ev
21    
22  C     !USES:  C     !USES:
23        IMPLICIT NONE        IMPLICIT NONE
24    
25  C     == Global variables ===  C     == Global variables ===
26  #include "SIZE.h"  #include "SIZE.h"
27  #include "EEPARAMS.h"  #include "EEPARAMS.h"
# Line 42  C     myThid :: Thread number for this i Line 42  C     myThid :: Thread number for this i
42        _RL tmpFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,kSize,nSx,nSy)        _RL tmpFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,kSize,nSx,nSy)
43        _RL     myTime        _RL     myTime
44        INTEGER myThid        INTEGER myThid
45    
46  #ifdef ALLOW_SHAP_FILT  #ifdef ALLOW_SHAP_FILT
47    
48  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
49  C     == Local variables ==  C     == Local variables ==
50        INTEGER nShapComput        INTEGER nShapComput, nShapPhysic
51        INTEGER bi,bj,K,I,J,N        INTEGER bi,bj,K,I,J,N
52        _RL tmpGrd(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL tmpGrd(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53  CEOP  CEOP
54    
55        IF (nShapTr.gt.0) THEN        IF (nShapTr.GT.0) THEN
56  C-------  C-------
57  C  Apply computational filter ^(nShap-nShapPhys) without grid factor  C  Apply computational filter ^(nShap-nShapPhys) without grid factor
58  C  then apply Physical filter ^nShapPhys  with grid factors  C  then apply Physical filter ^nShapPhys  with grid factors
59  C-------  C-------
60          nShapComput = nShapTr - nShapTrPhys          nShapComput = MAX( 0, nShapTr - nShapTrPhys )
61            nShapPhysic = nShapTr - nShapComput
62    
63          DO bj=myByLo(myThid),myByHi(myThid)          DO bj=myByLo(myThid),myByHi(myThid)
64           DO bi=myBxLo(myThid),myBxHi(myThid)           DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 82  C-- Computational Filter Line 83  C-- Computational Filter
83          ELSE          ELSE
84            _EXCH_XY_R8( tmpFld, myThid )            _EXCH_XY_R8( tmpFld, myThid )
85          ENDIF          ENDIF
86    
87          DO bj=myByLo(myThid),myByHi(myThid)          DO bj=myByLo(myThid),myByHi(myThid)
88           DO bi=myBxLo(myThid),myBxHi(myThid)           DO bi=myBxLo(myThid),myBxHi(myThid)
89            DO K=1,kSize            DO K=1,kSize
90    
91             DO J=1,sNy             DO J=1,sNy
92              DO I=1,sNx              DO I=1,sNx
93               tmpGrd(i,j) =               tmpGrd(i,j) =
# Line 113  C-- Computational Filter Line 114  C-- Computational Filter
114  C      end loop N=1,nShapComput  C      end loop N=1,nShapComput
115         ENDDO         ENDDO
116    
117         DO N=1,nShapTrPhys         DO N=1,nShapPhysic
118  C-- Physical space Filter  C-- Physical space Filter
119    
120          IF (kSize.EQ.Nr) THEN          IF (kSize.EQ.Nr) THEN
# Line 148  C-- Physical space Filter Line 149  C-- Physical space Filter
149              ENDDO              ENDDO
150             ENDDO             ENDDO
151    
152             IF (Shap_TrLength.EQ.0.) THEN             IF (Shap_TrLength.LE.0.) THEN
153              DO J=1,sNy              DO J=1,sNy
154               DO I=1,sNx               DO I=1,sNx
155                tmpFld(i,j,k,bi,bj) = -0.125*tmpGrd(i,j)                tmpFld(i,j,k,bi,bj) = -0.125*tmpGrd(i,j)

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

  ViewVC Help
Powered by ViewVC 1.1.22