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

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