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