/[lmdze]/trunk/phylmd/aaam_bud.f
ViewVC logotype

Diff of /trunk/phylmd/aaam_bud.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/phylmd/aaam_bud.f90 revision 76 by guez, Fri Nov 15 18:45:49 2013 UTC trunk/Sources/phylmd/aaam_bud.f revision 178 by guez, Fri Mar 11 18:47:26 2016 UTC
# Line 4  module aaam_bud_m Line 4  module aaam_bud_m
4    
5  contains  contains
6    
7    subroutine aaam_bud(rea, rg, ome, plat, plon, phis, dragu, liftu, phyu, &    subroutine aaam_bud(rg, ome, plat, plon, phis, dragu, liftu, phyu, dragv, &
8         dragv, liftv, phyv, p, u, v, aam, torsfc)         liftv, phyv, p, u, v, aam, torsfc)
9    
10      ! Author: F. Lott (LMD/CNRS). Date: 2003/10/20. Object: Compute      ! Author: F. Lott (LMD/CNRS). Date: 2003/10/20. Object: Compute
11      ! different terms of the axial AAAM budget and mountain torque.      ! different terms of the axial AAAM budget and mountain torque.
# Line 14  contains Line 14  contains
14    
15      USE dimens_m, ONLY : iim, jjm      USE dimens_m, ONLY : iim, jjm
16      use nr_util, only: assert_eq, assert, pi      use nr_util, only: assert_eq, assert, pi
17        USE suphec_m, ONLY: ra
18    
     real, intent(in):: rea ! Earth radius  
19      real, intent(in):: rg ! gravity constant      real, intent(in):: rg ! gravity constant
20      real, intent(in):: ome ! Earth rotation rate      real, intent(in):: ome ! Earth rotation rate
21    
# Line 41  contains Line 41  contains
41    
42      INTEGER nlev ! number of vertical levels      INTEGER nlev ! number of vertical levels
43      INTEGER i, j, k, l      INTEGER i, j, k, l
     REAL hadley, hadday  
44      REAL dlat, dlon ! latitude and longitude increments (radians)      REAL dlat, dlon ! latitude and longitude increments (radians)
45    
46      REAL raam(3) ! wind AAM (components 1 & 2: equatorial; component 3: axial)      REAL raam(3) ! wind AAM (components 1 & 2: equatorial; component 3: axial)
# Line 49  contains Line 48  contains
48      REAL tmou(3) ! resolved mountain torque (3 components)      REAL tmou(3) ! resolved mountain torque (3 components)
49      REAL tsso(3) ! parameterised moutain drag torque (3 components)      REAL tsso(3) ! parameterised moutain drag torque (3 components)
50      REAL tbls(3) ! parameterised boundary layer torque (3 components)      REAL tbls(3) ! parameterised boundary layer torque (3 components)
     integer iax  
51    
52      REAL ZS(801, 401) ! topographic height      REAL ZS(801, 401) ! topographic height
53      REAL PS(801, 401) ! surface pressure      REAL PS(801, 401) ! surface pressure
# Line 70  contains Line 68  contains
68         stop 1         stop 1
69      endif      endif
70    
     hadley = 1e18  
     hadday = 1e18 * 24. * 3600.  
71      dlat = pi / jjm      dlat = pi / jjm
72      dlon = 2 * pi / real(iim)      dlon = 2 * pi / real(iim)
73    
# Line 172  contains Line 168  contains
168    
169      DO j = 1, jjm      DO j = 1, jjm
170         DO i = 1, iim         DO i = 1, iim
171            raam(1) = raam(1) - rea**3 * dlon * dlat * 0.5 * (cos(zlon(i )) &            raam(1) = raam(1) - ra**3 * dlon * dlat * 0.5 * (cos(zlon(i )) &
172                 * sin(zlat(j )) * cos(zlat(j )) * ub(i , j ) + cos(zlon(i )) &                 * sin(zlat(j )) * cos(zlat(j )) * ub(i , j ) + cos(zlon(i )) &
173                 * sin(zlat(j + 1)) * cos(zlat(j + 1)) * ub(i , j + 1)) &                 * sin(zlat(j + 1)) * cos(zlat(j + 1)) * ub(i , j + 1)) &
174                 + rea**3 * dlon * dlat * 0.5 * (sin(zlon(i )) * cos(zlat(j )) &                 + ra**3 * dlon * dlat * 0.5 * (sin(zlon(i )) * cos(zlat(j )) &
175                 * vb(i , j ) + sin(zlon(i )) * cos(zlat(j + 1)) * vb(i , j + 1))                 * vb(i , j ) + sin(zlon(i )) * cos(zlat(j + 1)) * vb(i , j + 1))
176    
177            oaam(1) = oaam(1) - ome * rea**4 * dlon * dlat / rg * 0.5 &            oaam(1) = oaam(1) - ome * ra**4 * dlon * dlat / rg * 0.5 &
178                 * (cos(zlon(i )) * cos(zlat(j ))**2 * sin(zlat(j )) &                 * (cos(zlon(i )) * cos(zlat(j ))**2 * sin(zlat(j )) &
179                 * ps(i , j ) + cos(zlon(i )) * cos(zlat(j + 1))**2 &                 * ps(i , j ) + cos(zlon(i )) * cos(zlat(j + 1))**2 &
180                 * sin(zlat(j + 1)) * ps(i , j + 1))                 * sin(zlat(j + 1)) * ps(i , j + 1))
181    
182            raam(2) = raam(2) - rea**3 * dlon * dlat * 0.5 * (sin(zlon(i )) &            raam(2) = raam(2) - ra**3 * dlon * dlat * 0.5 * (sin(zlon(i )) &
183                 * sin(zlat(j )) * cos(zlat(j )) * ub(i , j ) + sin(zlon(i )) &                 * sin(zlat(j )) * cos(zlat(j )) * ub(i , j ) + sin(zlon(i )) &
184                 * sin(zlat(j + 1)) * cos(zlat(j + 1)) * ub(i , j + 1)) &                 * sin(zlat(j + 1)) * cos(zlat(j + 1)) * ub(i , j + 1)) &
185                 - rea**3 * dlon * dlat * 0.5 * (cos(zlon(i )) * cos(zlat(j )) &                 - ra**3 * dlon * dlat * 0.5 * (cos(zlon(i )) * cos(zlat(j )) &
186                 * vb(i , j ) + cos(zlon(i )) * cos(zlat(j + 1)) * vb(i , j + 1))                 * vb(i , j ) + cos(zlon(i )) * cos(zlat(j + 1)) * vb(i , j + 1))
187    
188            oaam(2) = oaam(2) - ome * rea**4 * dlon * dlat / rg * 0.5 &            oaam(2) = oaam(2) - ome * ra**4 * dlon * dlat / rg * 0.5 &
189                 * (sin(zlon(i )) * cos(zlat(j ))**2 * sin(zlat(j )) &                 * (sin(zlon(i )) * cos(zlat(j ))**2 * sin(zlat(j )) &
190                 * ps(i , j ) + sin(zlon(i )) * cos(zlat(j + 1))**2 &                 * ps(i , j ) + sin(zlon(i )) * cos(zlat(j + 1))**2 &
191                 * sin(zlat(j + 1)) * ps(i , j + 1))                 * sin(zlat(j + 1)) * ps(i , j + 1))
192    
193            raam(3) = raam(3) + rea**3 * dlon * dlat * 0.5 * (cos(zlat(j))**2 &            raam(3) = raam(3) + ra**3 * dlon * dlat * 0.5 * (cos(zlat(j))**2 &
194                 * ub(i, j) + cos(zlat(j + 1))**2 * ub(i, j + 1))                 * ub(i, j) + cos(zlat(j + 1))**2 * ub(i, j + 1))
195    
196            oaam(3) = oaam(3) + ome * rea**4 * dlon * dlat / rg * 0.5 &            oaam(3) = oaam(3) + ome * ra**4 * dlon * dlat / rg * 0.5 &
197                 * (cos(zlat(j))**3 * ps(i, j) + cos(zlat(j + 1))**3 &                 * (cos(zlat(j))**3 * ps(i, j) + cos(zlat(j + 1))**3 &
198                 * ps(i, j + 1))                 * ps(i, j + 1))
199         ENDDO         ENDDO
# Line 207  contains Line 203  contains
203    
204      DO j = 1, jjm      DO j = 1, jjm
205         DO i = 1, iim         DO i = 1, iim
206            tmou(1) = tmou(1) - rea**2 * dlon * 0.5 * sin(zlon(i)) &            tmou(1) = tmou(1) - ra**2 * dlon * 0.5 * sin(zlon(i)) &
207                 * (zs(i, j) - zs(i, j + 1)) &                 * (zs(i, j) - zs(i, j + 1)) &
208                 * (cos(zlat(j + 1)) * ps(i, j + 1) + cos(zlat(j)) * ps(i, j))                 * (cos(zlat(j + 1)) * ps(i, j + 1) + cos(zlat(j)) * ps(i, j))
209            tmou(2) = tmou(2) + rea**2 * dlon * 0.5 * cos(zlon(i)) &            tmou(2) = tmou(2) + ra**2 * dlon * 0.5 * cos(zlon(i)) &
210                 * (zs(i, j) - zs(i, j + 1)) &                 * (zs(i, j) - zs(i, j + 1)) &
211                 * (cos(zlat(j + 1)) * ps(i, j + 1) + cos(zlat(j)) * ps(i, j))                 * (cos(zlat(j + 1)) * ps(i, j + 1) + cos(zlat(j)) * ps(i, j))
212         ENDDO         ENDDO
# Line 218  contains Line 214  contains
214    
215      DO j = 2, jjm      DO j = 2, jjm
216         DO i = 1, iim         DO i = 1, iim
217            tmou(1) = tmou(1) + rea**2 * dlat * 0.5 * sin(zlat(j)) &            tmou(1) = tmou(1) + ra**2 * dlat * 0.5 * sin(zlat(j)) &
218                 * (zs(i + 1, j) - zs(i, j)) &                 * (zs(i + 1, j) - zs(i, j)) &
219                 * (cos(zlon(i + 1)) * ps(i + 1, j) + cos(zlon(i)) * ps(i, j))                 * (cos(zlon(i + 1)) * ps(i + 1, j) + cos(zlon(i)) * ps(i, j))
220            tmou(2) = tmou(2) + rea**2 * dlat * 0.5 * sin(zlat(j)) &            tmou(2) = tmou(2) + ra**2 * dlat * 0.5 * sin(zlat(j)) &
221                 * (zs(i + 1, j) - zs(i, j)) &                 * (zs(i + 1, j) - zs(i, j)) &
222                 * (sin(zlon(i + 1)) * ps(i + 1, j) + sin(zlon(i)) * ps(i, j))                 * (sin(zlon(i + 1)) * ps(i + 1, j) + sin(zlon(i)) * ps(i, j))
223            tmou(3) = tmou(3) - rea**2 * dlat * 0.5* cos(zlat(j)) &            tmou(3) = tmou(3) - ra**2 * dlat * 0.5* cos(zlat(j)) &
224                 * (zs(i + 1, j) - zs(i, j)) * (ps(i + 1, j) + ps(i, j))                 * (zs(i + 1, j) - zs(i, j)) * (ps(i + 1, j) + ps(i, j))
225         ENDDO         ENDDO
226      ENDDO      ENDDO
# Line 233  contains Line 229  contains
229    
230      DO j = 2, jjm      DO j = 2, jjm
231         DO i = 1, iim         DO i = 1, iim
232            tsso(1) = tsso(1) - rea**3 * cos(zlat(j)) * dlon * dlat* &            tsso(1) = tsso(1) - ra**3 * cos(zlat(j)) * dlon * dlat* &
233                 ssou(i, j) * sin(zlat(j)) * cos(zlon(i)) &                 ssou(i, j) * sin(zlat(j)) * cos(zlon(i)) &
234                 + rea**3 * cos(zlat(j)) * dlon * dlat* &                 + ra**3 * cos(zlat(j)) * dlon * dlat* &
235                 ssov(i, j) * sin(zlon(i))                 ssov(i, j) * sin(zlon(i))
236    
237            tsso(2) = tsso(2) - rea**3 * cos(zlat(j)) * dlon * dlat* &            tsso(2) = tsso(2) - ra**3 * cos(zlat(j)) * dlon * dlat* &
238                 ssou(i, j) * sin(zlat(j)) * sin(zlon(i)) &                 ssou(i, j) * sin(zlat(j)) * sin(zlon(i)) &
239                 - rea**3 * cos(zlat(j)) * dlon * dlat* &                 - ra**3 * cos(zlat(j)) * dlon * dlat* &
240                 ssov(i, j) * cos(zlon(i))                 ssov(i, j) * cos(zlon(i))
241    
242            tsso(3) = tsso(3) + rea**3 * cos(zlat(j)) * dlon * dlat* &            tsso(3) = tsso(3) + ra**3 * cos(zlat(j)) * dlon * dlat* &
243                 ssou(i, j) * cos(zlat(j))                 ssou(i, j) * cos(zlat(j))
244    
245            tbls(1) = tbls(1) - rea**3 * cos(zlat(j)) * dlon * dlat* &            tbls(1) = tbls(1) - ra**3 * cos(zlat(j)) * dlon * dlat* &
246                 blsu(i, j) * sin(zlat(j)) * cos(zlon(i)) &                 blsu(i, j) * sin(zlat(j)) * cos(zlon(i)) &
247                 + rea**3 * cos(zlat(j)) * dlon * dlat* &                 + ra**3 * cos(zlat(j)) * dlon * dlat* &
248                 blsv(i, j) * sin(zlon(i))                 blsv(i, j) * sin(zlon(i))
249    
250            tbls(2) = tbls(2) - rea**3 * cos(zlat(j)) * dlon * dlat* &            tbls(2) = tbls(2) - ra**3 * cos(zlat(j)) * dlon * dlat* &
251                 blsu(i, j) * sin(zlat(j)) * sin(zlon(i)) &                 blsu(i, j) * sin(zlat(j)) * sin(zlon(i)) &
252                 - rea**3 * cos(zlat(j)) * dlon * dlat* &                 - ra**3 * cos(zlat(j)) * dlon * dlat* &
253                 blsv(i, j) * cos(zlon(i))                 blsv(i, j) * cos(zlon(i))
254    
255            tbls(3) = tbls(3) + rea**3 * cos(zlat(j)) * dlon * dlat* &            tbls(3) = tbls(3) + ra**3 * cos(zlat(j)) * dlon * dlat* &
256                 blsu(i, j) * cos(zlat(j))                 blsu(i, j) * cos(zlat(j))
257         ENDDO         ENDDO
258      ENDDO      ENDDO

Legend:
Removed from v.76  
changed lines
  Added in v.178

  ViewVC Help
Powered by ViewVC 1.1.21