source: trunk/LMDZ.TITAN.old/libf/phytitan/gwstress.F @ 3094

Last change on this file since 3094 was 1530, checked in by emillour, 9 years ago

Venus and Titan GCMs:
Updates in the physics to keep up with updates in LMDZ5 (up to
LMDZ5 trunk, rev 2350) concerning dynamics/physics separation:

  • Adapted makelmdz and makelmdz_fcm script to stop if trying to compile 1d model or newstart or start2archive in parallel.
  • got rid of references to "dimensions.h" in physics. Within physics packages, use nbp_lon (=iim), nbp_lat (=jjmp1) and nbp_lev (=llm) from module mod_grid_phy_lmdz (in phy_common) instead. Only partially done for Titan, because of many hard-coded commons; a necessary first step will be to clean these up (using modules).

EM

File size: 3.4 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 "YOMCST.h"
58#include "YOEGWD.h"
59
60c-----------------------------------------------------------------------
61c
62c*       0.1   arguments
63c              ---------
64c
65      integer nlon,nlev
66      integer kkcrit(nlon),kkcrith(nlon),kcrit(nlon),ksect(nlon),
67     *        kkhlim(nlon),ktest(nlon),kkenvh(nlon),kknu(nlon)
68c
69      real prho(nlon,nlev+1),pstab(nlon,nlev+1),ptau(nlon,nlev+1),
70     *     pvph(nlon,nlev+1),ptfr(nlon),
71     *     pgeom1(nlon,nlev),pstd(nlon)
72c
73      real pd1(nlon),pd2(nlon),pnu(nlon),psig(nlon),pgamma(nlon)
74      real pmea(nlon),ppic(nlon),pval(nlon)
75      real pdmod(nlon)
76c
77c-----------------------------------------------------------------------
78c
79c*       0.2   local arrays
80c              ------------
81c  zeff--real: effective height seen by the flow when there is blocking
82
83      integer jl
84      real zeff 
85c
86c-----------------------------------------------------------------------
87c
88c*       0.3   functions
89c              ---------
90c     ------------------------------------------------------------------
91c
92c*         1.    initialization
93c                --------------
94c
95c      PRINT *,' in gwstress'
96 100  continue
97c
98c*         3.1     gravity wave stress.
99c
100  300 continue
101c
102c
103      do 301 jl=kidia,kfdia
104      if(ktest(jl).eq.1) then
105     
106c  effective mountain height above the blocked flow
107 
108         zeff=ppic(jl)-pval(jl)
109         if(kkenvh(jl).lt.klev)then
110         zeff=amin1(GFRCRIT*pvph(jl,klev+1)/sqrt(pstab(jl,klev+1))
111     c              ,zeff)
112         endif
113
114     
115        ptau(jl,klev+1)=gkdrag*prho(jl,klev+1)
116     *     *psig(jl)*pdmod(jl)/4./pstd(jl)
117     *     *pvph(jl,klev+1)*sqrt(pstab(jl,klev+1))
118     *     *zeff**2
119
120
121c  too small value of stress or  low level flow include critical level
122c  or low level flow:  gravity wave stress nul.
123               
124c       lo=(ptau(jl,klev+1).lt.gtsec).or.(kcrit(jl).ge.kknu(jl))
125c    *      .or.(pvph(jl,klev+1).lt.gvcrit)
126c       if(lo) ptau(jl,klev+1)=0.0
127     
128c      print *,jl,ptau(jl,klev+1)
129
130      else
131     
132          ptau(jl,klev+1)=0.0
133         
134      endif
135
136  301 continue
137
138c      write(21)(ptau(jl,klev+1),jl=kidia,kfdia)
139 
140      return
141      end
142
143
Note: See TracBrowser for help on using the repository browser.