/[MITgcm]/MITgcm/pkg/fizhi/fizhi_tendency_apply.F
ViewVC logotype

Contents of /MITgcm/pkg/fizhi/fizhi_tendency_apply.F

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


Revision 1.9 - (show annotations) (download)
Fri Feb 18 19:43:04 2005 UTC (19 years, 4 months ago) by molod
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57g_post, checkpoint57i_post, checkpoint57e_post, checkpoint57g_pre, checkpoint57f_pre, checkpoint57r_post, eckpoint57e_pre, checkpoint57h_done, checkpoint57n_post, checkpoint57p_post, checkpoint57f_post, checkpoint57q_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57l_post, checkpoint57h_post
Changes since 1.8: +8 -4 lines
Fix heating term

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_tendency_apply.F,v 1.8 2005/02/14 22:56:58 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 _RL rayleighdrag
35
36 integer i, j
37
38 if(klev.eq.Nr .or. rC(klev).lt.7000.)then
39 rayleighdrag = 1./(31.*86400.*2.)
40 else
41 rayleighdrag = 0.
42 endif
43
44 do j=jMin,jMax
45 do i=iMin,iMax
46 gU(i,j,kLev,bi,bj) = gU(i,j,kLev,bi,bj) +
47 . maskW(i,j,kLev,bi,bj) * guphy(i,j,kLev,bi,bj)
48 . - rayleighdrag * maskW(i,j,kLev,bi,bj)*uVel(i,j,kLev,bi,bj)
49 enddo
50 enddo
51
52 return
53 end
54 subroutine fizhi_tendency_apply_v(iMin, iMax, jMin, jMax,
55 . bi,bj,kLev,myTime,myThid)
56 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 C
61 C INPUT:
62 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 integer iMin, iMax, jMin, jMax, kLev, bi, bj, myThid
82 _RL myTime
83 _RL rayleighdrag
84
85 integer i, j
86
87 if(klev.eq.Nr .or. rC(klev).lt.7000.)then
88 rayleighdrag = 1./(31.*86400.*2.)
89 else
90 rayleighdrag = 0.
91 endif
92
93 do j=jMin,jMax
94 do i=iMin,iMax
95 gV(i,j,kLev,bi,bj) = gV(i,j,kLev,bi,bj) +
96 . maskS(i,j,kLev,bi,bj) * gvphy(i,j,kLev,bi,bj)
97 . - rayleighdrag * maskS(i,j,kLev,bi,bj)*vVel(i,j,kLev,bi,bj)
98 enddo
99 enddo
100
101 return
102 end
103 subroutine fizhi_tendency_apply_t(iMin, iMax, jMin, jMax,
104 . bi,bj,kLev,myTime,myThid)
105 C=======================================================================
106 C Routine: fizhi_tendency_apply_t
107 C Interpolate tendencies from physics grid to dynamics grid and
108 C add fizhi tendency terms to T (theta) tendency.
109 C
110 C INPUT:
111 C iMin - Working range of tile for applying forcing.
112 C iMax
113 C jMin
114 C jMax
115 C kLev
116 C
117 C Notes: Routine works for one level at a time
118 C=======================================================================
119 implicit none
120
121 #include "SIZE.h"
122 #include "GRID.h"
123 #include "EEPARAMS.h"
124 #include "DYNVARS.h"
125 #include "fizhi_SIZE.h"
126 #include "fizhi_land_SIZE.h"
127 #include "fizhi_coms.h"
128
129 integer iMin, iMax, jMin, jMax, kLev, bi, bj, myThid
130 _RL myTime
131 _RL rayleighdrag,getcon,cp,kappa,pNrkappa
132
133 integer i, j
134
135 if(klev.eq.Nr .or. rC(klev).lt.7000.)then
136 cp = getcon('CP')
137 kappa = getcon('KAPPA')
138 pNrkappa = (rC(klev)/100000.)**kappa
139 rayleighdrag = 1./((31.*86400.*2.)*(pNrkappa*cp))
140 else
141 rayleighdrag = 0.
142 endif
143
144 do j=jMin,jMax
145 do i=iMin,iMax
146 gT(i,j,kLev,bi,bj) = maskC(i,j,kLev,bi,bj)
147 . *( gT(i,j,kLev,bi,bj) + gthphy(i,j,kLev,bi,bj) )
148 . + rayleighdrag * 0.5 *
149 . (maskW(i,j,kLev,bi,bj)*uVel(i,j,kLev,bi,bj)*uVel(i,j,kLev,bi,bj)+
150 . maskW(i+1,j,kLev,bi,bj)*
151 . uVel(i+1,j,kLev,bi,bj)*uVel(i+1,j,kLev,bi,bj)+
152 . maskS(i,j,kLev,bi,bj)*vVel(i,j,kLev,bi,bj)*vVel(i,j,kLev,bi,bj)+
153 . maskS(i,j+1,kLev,bi,bj)*
154 . vVel(i,j+1,kLev,bi,bj)*vVel(i,j+1,kLev,bi,bj))
155 enddo
156 enddo
157
158 return
159 end
160 subroutine fizhi_tendency_apply_s(iMin, iMax, jMin, jMax,
161 . bi,bj,kLev,myTime,myThid)
162 C=======================================================================
163 C Routine: fizhi_tendency_apply_s
164 C Interpolate tendencies from physics grid to dynamics grid and
165 C add fizhi tendency terms to S tendency.
166 C
167 C INPUT:
168 C iMin - Working range of tile for applying forcing.
169 C iMax
170 C jMin
171 C jMax
172 C kLev
173 C
174 C Notes: Routine works for one level at a time
175 C=======================================================================
176 implicit none
177
178 #include "SIZE.h"
179 #include "GRID.h"
180 #include "EEPARAMS.h"
181 #include "DYNVARS.h"
182 #include "fizhi_SIZE.h"
183 #include "fizhi_land_SIZE.h"
184 #include "fizhi_coms.h"
185
186 integer iMin, iMax, jMin, jMax, kLev, bi, bj, myThid
187 _RL myTime
188
189 integer i, j
190
191 do j=jMin,jMax
192 do i=iMin,iMax
193 gS(i,j,kLev,bi,bj) = maskC(i,j,kLev,bi,bj)
194 . *( gS(i,j,kLev,bi,bj) + gsphy(i,j,kLev,bi,bj) )
195 enddo
196 enddo
197
198 return
199 end

  ViewVC Help
Powered by ViewVC 1.1.22