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

Annotation of /MITgcm/pkg/shap_filt/shap_filt_relvort3.F

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


Revision 1.1.2.1 - (hide annotations) (download)
Thu Oct 2 18:18:34 2003 UTC (20 years, 7 months ago) by adcroft
Branch: branch-genmake2
Changes since 1.1: +2 -2 lines
Converted to new pacakge configuration system.
 o made all packages consistent by referring to CPP_OPTIONS via PKG_OPTIONS.h
 o added CPP barriers (#ifndef PKG_OPTIONS_H) to instigate new policy
 o added plenty of missing or broken CVS $Header stuff

1 adcroft 1.1.2.1 C $Header: /u/gcmpack/MITgcm/pkg/shap_filt/shap_filt_relvort3.F,v 1.1 2003/08/03 03:05:19 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4 adcroft 1.1.2.1 #include "SHAP_FILT_OPTIONS.h"
5 jmc 1.1
6     SUBROUTINE SHAP_FILT_RELVORT3(
7     I bi,bj,k,
8     I uFld, vFld, hFacZ,
9     O vort3,
10     I myThid)
11     IMPLICIT NONE
12     C *==========================================================*
13     C | S/R SHAP_FILT_RELVORT3
14     C *==========================================================*
15     C | copy of S/R MOM_VI_CALC_RELVORT3 (keep pkgs independent)
16     C *==========================================================*
17    
18     C == Global variables ==
19     #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "GRID.h"
23     C == Routine arguments ==
24     C myThid - Instance number for this innvocation of CALC_MOM_RHS
25     INTEGER bi,bj,k
26     _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
27     _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
28     _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
29     _RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
30     INTEGER myThid
31    
32     #ifdef ALLOW_SHAP_FILT
33     C == Local variables ==
34     INTEGER i,j
35    
36     DO J=2-Oly,sNy+Oly
37     DO I=2-Olx,sNx+Olx
38    
39     C Horizontal curl of flow field - ignoring lopping factors
40     vort3(I,J)=
41     & recip_rAz(I,J,bi,bj)*(
42     & vFld(I,J)*dyc(I,J,bi,bj)
43     & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
44     & -uFld(I,J)*dxc(I,J,bi,bj)
45     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
46     & )
47    
48     C Horizontal curl of flow field - including lopping factors
49     IF (hFacZ(i,j).NE.0.) THEN
50     c vort3(I,J)=
51     c & recip_rAz(I,J,bi,bj)*(
52     c & vFld(I,J)*dyc(I,J,bi,bj)*_hFacW(i,j,k,bi,bj)
53     c & -vFld(I-1,J)*dyc(I-1,J,bi,bj)*_hFacW(i-1,j,k,bi,bj)
54     c & -uFld(I,J)*dxc(I,J,bi,bj)*_hFacS(i,j,k,bi,bj)
55     c & +uFld(I,J-1)*dxc(I,J-1,bi,bj)*_hFacS(i,j-1,k,bi,bj)
56     c & )
57     c & /hFacZ(i,j)
58     ELSE
59     vort3(I,J)=0.
60     ENDIF
61    
62     ENDDO
63     ENDDO
64    
65     C Special stuff for Cubed Sphere
66     IF (useCubedSphereExchange) THEN
67     I=1
68     J=1
69     vort3(I,J)=
70     & +recip_rAz(I,J,bi,bj)*(
71     & vFld(I,J)*dyc(I,J,bi,bj)
72     & -uFld(I,J)*dxc(I,J,bi,bj)
73     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
74     & )
75     cph & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
76     I=sNx+1
77     J=1
78     vort3(I,J)=
79     & +recip_rAz(I,J,bi,bj)*(
80     & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
81     & -uFld(I,J)*dxc(I,J,bi,bj)
82     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
83     & )
84     cph & vFld(I,J)*dyc(I,J,bi,bj)
85     I=1
86     J=sNy+1
87     vort3(I,J)=
88     & +recip_rAz(I,J,bi,bj)*(
89     & vFld(I,J)*dyc(I,J,bi,bj)
90     & -uFld(I,J)*dxc(I,J,bi,bj)
91     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
92     & )
93     cph & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
94     I=sNx+1
95     J=sNy+1
96     vort3(I,J)=
97     & +recip_rAz(I,J,bi,bj)*(
98     & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
99     & -uFld(I,J)*dxc(I,J,bi,bj)
100     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
101     & )
102     cph & vFld(I,J)*dyc(I,J,bi,bj)
103     ENDIF
104    
105     #endif /* ALLOW_SHAP_FILT */
106    
107     RETURN
108     END

  ViewVC Help
Powered by ViewVC 1.1.22