/[MITgcm]/MITgcm/verification/aim.5l_cs/code/shap_filt_relvort3.F
ViewVC logotype

Annotation of /MITgcm/verification/aim.5l_cs/code/shap_filt_relvort3.F

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


Revision 1.2 - (hide annotations) (download)
Sun Aug 3 03:43:10 2003 UTC (20 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51l_post, checkpoint51j_post, checkpoint51n_pre, checkpoint51f_pre, branchpoint-genmake2, checkpoint51o_pre, checkpoint51i_post, checkpoint51e_post, checkpoint51l_pre, checkpoint51o_post, checkpoint51q_post, checkpoint51h_pre, checkpoint51g_post, checkpoint51f_post, checkpoint51m_post, checkpoint51p_post, checkpoint51n_post, checkpoint51i_pre
Branch point for: branch-genmake2, tg2-branch, checkpoint51n_branch
Changes since 1.1: +14 -9 lines
update comments

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/verification/aim.5l_cs/code/shap_filt_relvort3.F,v 1.1 2002/01/09 00:28:56 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "CPP_OPTIONS.h"
5    
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 jmc 1.2 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 jmc 1.1
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     _RL AZcorner
36    
37     DO J=2-Oly,sNy+Oly
38     DO I=2-Olx,sNx+Olx
39    
40     C Horizontal curl of flow field - ignoring lopping factors
41     vort3(I,J)=
42     & recip_rAz(I,J,bi,bj)*(
43     & vFld(I,J)*dyc(I,J,bi,bj)
44     & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
45     & -uFld(I,J)*dxc(I,J,bi,bj)
46     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
47     & )
48    
49     C Horizontal curl of flow field - including lopping factors
50     c IF (hFacZ(i,j).NE.0.) THEN
51     c vort3(I,J)=
52     c & recip_rAz(I,J,bi,bj)*(
53     c & vFld(I,J)*dyc(I,J,bi,bj)*_hFacW(i,j,k,bi,bj)
54     c & -vFld(I-1,J)*dyc(I-1,J,bi,bj)*_hFacW(i-1,j,k,bi,bj)
55     c & -uFld(I,J)*dxc(I,J,bi,bj)*_hFacS(i,j,k,bi,bj)
56     c & +uFld(I,J-1)*dxc(I,J-1,bi,bj)*_hFacS(i,j-1,k,bi,bj)
57     c & )
58     c & /hFacZ(i,j)
59     c ELSE
60     c vort3(I,J)=0.
61     c ENDIF
62    
63     ENDDO
64     ENDDO
65    
66     C Special stuff for Cubed Sphere
67     IF (useCubedSphereExchange) THEN
68     AZcorner = 0.75 _d 0
69     I=1
70     J=1
71 jmc 1.2 c vort3(I,J)=
72     c & +recip_rAz(I,J,bi,bj)*(
73 jmc 1.1 vort3(I,J)=
74     & +recip_rA(I,J,bi,bj)/AZcorner*(
75     & vFld(I,J)*dyc(I,J,bi,bj)
76     & -uFld(I,J)*dxc(I,J,bi,bj)
77     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
78     & )
79     cph & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
80     I=sNx+1
81     J=1
82 jmc 1.2 c vort3(I,J)=
83     c & +recip_rAz(I,J,bi,bj)*(
84 jmc 1.1 vort3(I,J)=
85     & +recip_rA(I-1,J,bi,bj)/AZcorner*(
86     & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
87     & -uFld(I,J)*dxc(I,J,bi,bj)
88     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
89     & )
90     cph & vFld(I,J)*dyc(I,J,bi,bj)
91     I=1
92     J=sNy+1
93 jmc 1.2 c vort3(I,J)=
94     c & +recip_rAz(I,J,bi,bj)*(
95 jmc 1.1 vort3(I,J)=
96     & +recip_rA(I,J-1,bi,bj)/AZcorner*(
97     & vFld(I,J)*dyc(I,J,bi,bj)
98     & -uFld(I,J)*dxc(I,J,bi,bj)
99     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
100     & )
101     cph & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
102     I=sNx+1
103     J=sNy+1
104 jmc 1.2 c vort3(I,J)=
105     c & +recip_rAz(I,J,bi,bj)*(
106 jmc 1.1 vort3(I,J)=
107     & +recip_rA(I-1,J-1,bi,bj)/AZcorner*(
108     & -vFld(I-1,J)*dyc(I-1,J,bi,bj)
109     & -uFld(I,J)*dxc(I,J,bi,bj)
110     & +uFld(I,J-1)*dxc(I,J-1,bi,bj)
111     & )
112     cph & vFld(I,J)*dyc(I,J,bi,bj)
113     ENDIF
114    
115     #endif /* ALLOW_SHAP_FILT */
116    
117     RETURN
118     END

  ViewVC Help
Powered by ViewVC 1.1.22