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

Contents 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.4 - (show annotations) (download)
Tue Dec 9 00:29:50 2003 UTC (20 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint53f_post, checkpoint54a_pre, checkpoint55c_post, checkpoint53b_pre, checkpoint52l_pre, checkpoint52e_pre, checkpoint52j_post, checkpoint54b_post, checkpoint52e_post, checkpoint57b_post, checkpoint53c_post, checkpoint53d_post, checkpoint55d_pre, checkpoint57a_post, checkpoint55j_post, checkpoint56b_post, checkpoint52j_pre, checkpoint54a_post, checkpoint55h_post, checkpoint52n_post, checkpoint54d_post, checkpoint56c_post, checkpoint54e_post, checkpoint55b_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint55a_post, checkpoint57c_pre, checkpoint53b_post, checkpoint55g_post, checkpoint57d_post, checkpoint55f_post, checkpoint52l_post, checkpoint52k_post, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52d_post, checkpoint53g_post, checkpoint52f_post, checkpoint54f_post, checkpoint57c_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint52i_post, checkpoint55i_post, checkpoint52i_pre, checkpoint52h_pre, checkpoint52f_pre, checkpoint56a_post, checkpoint55d_post
Branch point for: netcdf-sm0
Changes since 1.3: +2 -3 lines
#include "SHAP_FILT_OPTIONS.h" instead of PACKAGES_CONFIG.h & CPP_OPTIONS.h

1 C $Header: /u/gcmpack/MITgcm/verification/aim.5l_cs/code/shap_filt_relvort3.F,v 1.3 2003/10/31 20:35:32 edhill Exp $
2 C $Name: $
3
4 #include "SHAP_FILT_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 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 _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 c vort3(I,J)=
72 c & +recip_rAz(I,J,bi,bj)*(
73 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 c vort3(I,J)=
83 c & +recip_rAz(I,J,bi,bj)*(
84 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 c vort3(I,J)=
94 c & +recip_rAz(I,J,bi,bj)*(
95 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 c vort3(I,J)=
105 c & +recip_rAz(I,J,bi,bj)*(
106 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