source: trunk/LMDZ.VENUS/libf/phyvenus/gwstress.F @ 1453

Last change on this file since 1453 was 101, checked in by slebonnois, 14 years ago

SL: modifications pour arriver a compiler le gcm VENUS !
Ca marche !
A noter: modifs de makelmdz

File size: 3.5 KB
Line 
1      SUBROUTINE gwstress
2     *         (  nlon  , nlev
3     *         , kkcrit, ksect, kkhlim, ktest, kkcrith, kcrit, kkenvh
4     *         , kknu
5     *         , prho  , pstab , pvph  , pstd, psig
6     *         , pmea , ppic , pval  , ptfr  , ptau 
7     *         , pgeom1 , pgamma , pd1  , pd2   , pdmod , pnu )
8c
9c**** *gwstress*
10c
11c     purpose.
12c     --------
13c  Compute the surface stress due to Gravity Waves, according
14c  to the Phillips (1979) theory of 3-D flow above
15c  anisotropic elliptic ridges.
16
17C  The stress is reduced two account for cut-off flow over
18C  hill.  The flow only see that part of the ridge located
19c  above the blocked layer (see zeff).
20c
21c**   interface.
22c     ----------
23c     call *gwstress*  from *gwdrag*
24c
25c        explicit arguments :
26c        --------------------
27c     ==== inputs ===
28c     ==== outputs ===
29c
30c        implicit arguments :   none
31c        --------------------
32c
33c     method.
34c     -------
35c
36c
37c     externals.
38c     ----------
39c
40c
41c     reference.
42c     ----------
43c
44c   LOTT and MILLER (1997)  &  LOTT (1999)
45c
46c     author.
47c     -------
48c
49c     modifications.
50c     --------------
51c     f. lott put the new gwd on ifs      22/11/93
52c
53c-----------------------------------------------------------------------
54      use dimphy
55      implicit none
56
57#include "dimensions.h"
58#include "paramet.h"
59
60#include "YOMCST.h"
61#include "YOEGWD.h"
62
63c-----------------------------------------------------------------------
64c
65c*       0.1   arguments
66c              ---------
67c
68      integer nlon,nlev
69      integer kkcrit(nlon),kkcrith(nlon),kcrit(nlon),ksect(nlon),
70     *        kkhlim(nlon),ktest(nlon),kkenvh(nlon),kknu(nlon)
71c
72      real prho(nlon,nlev+1),pstab(nlon,nlev+1),ptau(nlon,nlev+1),
73     *     pvph(nlon,nlev+1),ptfr(nlon),
74     *     pgeom1(nlon,nlev),pstd(nlon)
75c
76      real pd1(nlon),pd2(nlon),pnu(nlon),psig(nlon),pgamma(nlon)
77      real pmea(nlon),ppic(nlon),pval(nlon)
78      real pdmod(nlon)
79c
80c-----------------------------------------------------------------------
81c
82c*       0.2   local arrays
83c              ------------
84c  zeff--real: effective height seen by the flow when there is blocking
85
86      integer jl
87      real zeff 
88c
89c-----------------------------------------------------------------------
90c
91c*       0.3   functions
92c              ---------
93c     ------------------------------------------------------------------
94c
95c*         1.    initialization
96c                --------------
97c
98c      PRINT *,' in gwstress'
99 100  continue
100c
101c*         3.1     gravity wave stress.
102c
103  300 continue
104c
105c
106      do 301 jl=kidia,kfdia
107      if(ktest(jl).eq.1) then
108     
109c  effective mountain height above the blocked flow
110 
111         zeff=ppic(jl)-pval(jl)
112         if(kkenvh(jl).lt.klev)then
113         zeff=amin1(GFRCRIT*pvph(jl,klev+1)/sqrt(pstab(jl,klev+1))
114     c              ,zeff)
115         endif
116
117     
118        ptau(jl,klev+1)=gkdrag*prho(jl,klev+1)
119     *     *psig(jl)*pdmod(jl)/4./pstd(jl)
120     *     *pvph(jl,klev+1)*sqrt(pstab(jl,klev+1))
121     *     *zeff**2
122
123
124c  too small value of stress or  low level flow include critical level
125c  or low level flow:  gravity wave stress nul.
126               
127c       lo=(ptau(jl,klev+1).lt.gtsec).or.(kcrit(jl).ge.kknu(jl))
128c    *      .or.(pvph(jl,klev+1).lt.gvcrit)
129c       if(lo) ptau(jl,klev+1)=0.0
130     
131c      print *,jl,ptau(jl,klev+1)
132
133      else
134     
135          ptau(jl,klev+1)=0.0
136         
137      endif
138
139  301 continue
140
141c      write(21)(ptau(jl,klev+1),jl=kidia,kfdia)
142 
143      return
144      end
145
146
Note: See TracBrowser for help on using the repository browser.