1 |
jmc |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_tendency_apply.F,v 1.12 2006/01/18 19:00:38 molod Exp $ |
2 |
edhill |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "FIZHI_OPTIONS.h" |
5 |
jmc |
1.2 |
subroutine fizhi_tendency_apply_u( |
6 |
|
|
U gU_arr, |
7 |
|
|
I iMin,iMax,jMin,jMax, kLev, bi, bj, |
8 |
|
|
I myTime, myIter, myThid ) |
9 |
edhill |
1.1 |
C======================================================================= |
10 |
|
|
C Routine: fizhi_tendency_apply_u |
11 |
|
|
C Interpolate tendencies from physics grid to dynamics grid and |
12 |
|
|
C add fizhi tendency terms to U tendency. |
13 |
jmc |
1.2 |
C |
14 |
|
|
C INPUT: |
15 |
edhill |
1.1 |
C iMin - Working range of tile for applying forcing. |
16 |
|
|
C iMax |
17 |
|
|
C jMin |
18 |
|
|
C jMax |
19 |
|
|
C kLev |
20 |
|
|
C |
21 |
|
|
C Notes: Routine works for one level at a time |
22 |
|
|
C Assumes that U and V tendencies are already on C-Grid |
23 |
|
|
C======================================================================= |
24 |
|
|
implicit none |
25 |
|
|
|
26 |
|
|
#include "SIZE.h" |
27 |
|
|
#include "GRID.h" |
28 |
|
|
#include "EEPARAMS.h" |
29 |
|
|
#include "DYNVARS.h" |
30 |
|
|
#include "fizhi_SIZE.h" |
31 |
|
|
#include "fizhi_land_SIZE.h" |
32 |
|
|
#include "fizhi_coms.h" |
33 |
|
|
|
34 |
jmc |
1.2 |
_RL gU_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
35 |
|
|
INTEGER iMin, iMax, jMin, jMax |
36 |
|
|
INTEGER kLev, bi, bj |
37 |
|
|
_RL myTime |
38 |
|
|
INTEGER myIter |
39 |
|
|
INTEGER myThid |
40 |
edhill |
1.1 |
|
41 |
|
|
integer i, j |
42 |
|
|
|
43 |
|
|
do j=jMin,jMax |
44 |
|
|
do i=iMin,iMax |
45 |
jmc |
1.2 |
gU_arr(i,j) = gU_arr(i,j) + |
46 |
edhill |
1.1 |
. maskW(i,j,kLev,bi,bj) * guphy(i,j,kLev,bi,bj) |
47 |
|
|
enddo |
48 |
|
|
enddo |
49 |
|
|
|
50 |
|
|
return |
51 |
|
|
end |
52 |
jmc |
1.2 |
subroutine fizhi_tendency_apply_v( |
53 |
|
|
U gV_arr, |
54 |
|
|
I iMin,iMax,jMin,jMax, kLev, bi, bj, |
55 |
|
|
I myTime, myIter, myThid ) |
56 |
edhill |
1.1 |
C======================================================================= |
57 |
|
|
C Routine: fizhi_tendency_apply_v |
58 |
|
|
C Interpolate tendencies from physics grid to dynamics grid and |
59 |
|
|
C add fizhi tendency terms to V tendency. |
60 |
jmc |
1.2 |
C |
61 |
|
|
C INPUT: |
62 |
edhill |
1.1 |
C iMin - Working range of tile for applying forcing. |
63 |
|
|
C iMax |
64 |
|
|
C jMin |
65 |
|
|
C jMax |
66 |
|
|
C kLev |
67 |
|
|
C |
68 |
|
|
C Notes: Routine works for one level at a time |
69 |
|
|
C Assumes that U and V tendencies are already on C-Grid |
70 |
|
|
C======================================================================= |
71 |
|
|
implicit none |
72 |
|
|
|
73 |
|
|
#include "SIZE.h" |
74 |
|
|
#include "GRID.h" |
75 |
|
|
#include "EEPARAMS.h" |
76 |
|
|
#include "DYNVARS.h" |
77 |
|
|
#include "fizhi_SIZE.h" |
78 |
|
|
#include "fizhi_land_SIZE.h" |
79 |
|
|
#include "fizhi_coms.h" |
80 |
|
|
|
81 |
jmc |
1.2 |
_RL gV_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
82 |
|
|
INTEGER iMin, iMax, jMin, jMax |
83 |
|
|
INTEGER kLev, bi, bj |
84 |
|
|
_RL myTime |
85 |
|
|
INTEGER myIter |
86 |
|
|
INTEGER myThid |
87 |
edhill |
1.1 |
|
88 |
|
|
integer i, j |
89 |
|
|
|
90 |
|
|
do j=jMin,jMax |
91 |
|
|
do i=iMin,iMax |
92 |
jmc |
1.2 |
gV_arr(i,j) = gV_arr(i,j) + |
93 |
edhill |
1.1 |
. maskS(i,j,kLev,bi,bj) * gvphy(i,j,kLev,bi,bj) |
94 |
|
|
enddo |
95 |
|
|
enddo |
96 |
|
|
|
97 |
|
|
return |
98 |
|
|
end |
99 |
jmc |
1.2 |
subroutine fizhi_tendency_apply_t( |
100 |
|
|
U gT_arr, |
101 |
|
|
I iMin,iMax,jMin,jMax, kLev, bi, bj, |
102 |
|
|
I myTime, myIter, myThid ) |
103 |
edhill |
1.1 |
C======================================================================= |
104 |
|
|
C Routine: fizhi_tendency_apply_t |
105 |
|
|
C Interpolate tendencies from physics grid to dynamics grid and |
106 |
|
|
C add fizhi tendency terms to T (theta) tendency. |
107 |
jmc |
1.2 |
C |
108 |
|
|
C INPUT: |
109 |
edhill |
1.1 |
C iMin - Working range of tile for applying forcing. |
110 |
|
|
C iMax |
111 |
|
|
C jMin |
112 |
|
|
C jMax |
113 |
|
|
C kLev |
114 |
|
|
C |
115 |
|
|
C Notes: Routine works for one level at a time |
116 |
|
|
C======================================================================= |
117 |
|
|
implicit none |
118 |
|
|
|
119 |
|
|
#include "SIZE.h" |
120 |
|
|
#include "GRID.h" |
121 |
|
|
#include "EEPARAMS.h" |
122 |
|
|
#include "DYNVARS.h" |
123 |
|
|
#include "fizhi_SIZE.h" |
124 |
|
|
#include "fizhi_land_SIZE.h" |
125 |
|
|
#include "fizhi_coms.h" |
126 |
|
|
|
127 |
jmc |
1.2 |
_RL gT_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
128 |
|
|
INTEGER iMin, iMax, jMin, jMax |
129 |
|
|
INTEGER kLev, bi, bj |
130 |
|
|
_RL myTime |
131 |
|
|
INTEGER myIter |
132 |
|
|
INTEGER myThid |
133 |
edhill |
1.1 |
|
134 |
|
|
integer i, j |
135 |
|
|
|
136 |
|
|
do j=jMin,jMax |
137 |
|
|
do i=iMin,iMax |
138 |
jmc |
1.2 |
gT_arr(i,j) = maskC(i,j,kLev,bi,bj) |
139 |
|
|
. *( gT_arr(i,j) + gthphy(i,j,kLev,bi,bj) ) |
140 |
edhill |
1.1 |
enddo |
141 |
|
|
enddo |
142 |
|
|
|
143 |
|
|
return |
144 |
|
|
end |
145 |
jmc |
1.2 |
subroutine fizhi_tendency_apply_s( |
146 |
|
|
U gS_arr, |
147 |
|
|
I iMin,iMax,jMin,jMax, kLev, bi, bj, |
148 |
|
|
I myTime, myIter, myThid ) |
149 |
edhill |
1.1 |
C======================================================================= |
150 |
|
|
C Routine: fizhi_tendency_apply_s |
151 |
|
|
C Interpolate tendencies from physics grid to dynamics grid and |
152 |
|
|
C add fizhi tendency terms to S tendency. |
153 |
jmc |
1.2 |
C |
154 |
|
|
C INPUT: |
155 |
edhill |
1.1 |
C iMin - Working range of tile for applying forcing. |
156 |
|
|
C iMax |
157 |
|
|
C jMin |
158 |
|
|
C jMax |
159 |
|
|
C kLev |
160 |
|
|
C |
161 |
|
|
C Notes: Routine works for one level at a time |
162 |
|
|
C======================================================================= |
163 |
|
|
implicit none |
164 |
|
|
|
165 |
|
|
#include "SIZE.h" |
166 |
|
|
#include "GRID.h" |
167 |
|
|
#include "EEPARAMS.h" |
168 |
|
|
#include "DYNVARS.h" |
169 |
|
|
#include "fizhi_SIZE.h" |
170 |
|
|
#include "fizhi_land_SIZE.h" |
171 |
|
|
#include "fizhi_coms.h" |
172 |
|
|
|
173 |
jmc |
1.2 |
_RL gS_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
174 |
|
|
INTEGER iMin, iMax, jMin, jMax |
175 |
|
|
INTEGER kLev, bi, bj |
176 |
|
|
_RL myTime |
177 |
|
|
INTEGER myIter |
178 |
|
|
INTEGER myThid |
179 |
edhill |
1.1 |
|
180 |
|
|
integer i, j |
181 |
|
|
|
182 |
|
|
do j=jMin,jMax |
183 |
|
|
do i=iMin,iMax |
184 |
jmc |
1.2 |
gS_arr(i,j) = maskC(i,j,kLev,bi,bj) |
185 |
|
|
. *( gS_arr(i,j) + gsphy(i,j,kLev,bi,bj) ) |
186 |
edhill |
1.1 |
enddo |
187 |
|
|
enddo |
188 |
|
|
|
189 |
|
|
return |
190 |
|
|
end |