/[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.8 - (show annotations) (download)
Mon Feb 14 22:56:58 2005 UTC (19 years, 4 months ago) by molod
Branch: MAIN
Changes since 1.7: +4 -4 lines
Get rayleigh drag to be active above 70 mb independant of number of levels up there

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_tendency_apply.F,v 1.7 2004/12/02 19:06:17 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(Nr)/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 *
149 . (maskW(i,j,kLev,bi,bj)*uVel(i,j,kLev,bi,bj)*uVel(i,j,kLev,bi,bj)+
150 . maskS(i,j,kLev,bi,bj)*vVel(i,j,kLev,bi,bj)*vVel(i,j,kLev,bi,bj))
151 enddo
152 enddo
153
154 return
155 end
156 subroutine fizhi_tendency_apply_s(iMin, iMax, jMin, jMax,
157 . bi,bj,kLev,myTime,myThid)
158 C=======================================================================
159 C Routine: fizhi_tendency_apply_s
160 C Interpolate tendencies from physics grid to dynamics grid and
161 C add fizhi tendency terms to S tendency.
162 C
163 C INPUT:
164 C iMin - Working range of tile for applying forcing.
165 C iMax
166 C jMin
167 C jMax
168 C kLev
169 C
170 C Notes: Routine works for one level at a time
171 C=======================================================================
172 implicit none
173
174 #include "SIZE.h"
175 #include "GRID.h"
176 #include "EEPARAMS.h"
177 #include "DYNVARS.h"
178 #include "fizhi_SIZE.h"
179 #include "fizhi_land_SIZE.h"
180 #include "fizhi_coms.h"
181
182 integer iMin, iMax, jMin, jMax, kLev, bi, bj, myThid
183 _RL myTime
184
185 integer i, j
186
187 do j=jMin,jMax
188 do i=iMin,iMax
189 gS(i,j,kLev,bi,bj) = maskC(i,j,kLev,bi,bj)
190 . *( gS(i,j,kLev,bi,bj) + gsphy(i,j,kLev,bi,bj) )
191 enddo
192 enddo
193
194 return
195 end

  ViewVC Help
Powered by ViewVC 1.1.22