source: trunk/LMDZ.VENUS/libf/phyvenus/drag_noro.F @ 2187

Last change on this file since 2187 was 2047, checked in by slebonnois, 6 years ago

SL: VENUS, ajout des modifs apportees par Thomas Navarro pour la parametrisation des ondes de gravite orographiques

File size: 5.8 KB
Line 
1
2C  SUBROUTINE DE PARAMETRISATION DES MONTAGNES D ECHELLE SOUS MAILLE
3
4      SUBROUTINE drag_noro (nlon,nlev,dtime,paprs,pplay,pgeop,pn2,
5     e                   pmea,pstd, psig, pgam, pthe,ppic,pval,
6     e                   kgwd,kdx,ktest,
7     e                   t, u, v,
8     s                   pulow, pvlow, pustr, pvstr,
9     s                   d_t, d_u, d_v,
10     s                   blustr,blvstr,pnlow,zeff,zbl,
11     s                   ptau,tau0,knu2,kbreak)
12c
13      use dimphy
14      IMPLICIT none
15
16c======================================================================
17c Auteur(s): F.Lott (LMD/CNRS) date: 19950201
18c Object: Mountain drag interface. Made necessary because:
19C 1. in the LMD-GCM Layers are from bottom to top,
20C    contrary to most European GCM.
21c 2. the altitude above ground of each model layers
22c    needs to be known (variable zgeom)
23c======================================================================
24c Explicit Arguments:
25c ==================
26c nlon----input-I-Total number of horizontal points that get into physics
27c nlev----input-I-Number of vertical levels
28c dtime---input-R-Time-step (s)
29c paprs---input-R-Pressure in semi layers    (Pa)
30c pplay---input-R-Pressure model-layers      (Pa)
31c pgeop---input-R-Geopotential model layers (reference to ground)
32c pn2-----input-R-Brunt-Vaisala freq.^2 at 1/2 layers
33c t-------input-R-temperature (K)
34c u-------input-R-Horizontal wind (m/s)
35c v-------input-R-Meridional wind (m/s)
36c pmea----input-R-Mean Orography (m)
37C pstd----input-R-SSO standard deviation (m)
38c psig----input-R-SSO slope
39c pgam----input-R-SSO Anisotropy
40c pthe----input-R-SSO Angle
41c ppic----input-R-SSO Peacks elevation (m)
42c pval----input-R-SSO Valleys elevation (m)
43c
44c kgwd- -input-I: Total nb of points where the orography schemes are active
45c ktest--input-I: Flags to indicate active points
46c kdx----input-I: Locate the physical location of an active point.
47
48c pulow, pvlow -output-R: Low-level wind
49c pustr, pvstr -output-R: Surface stress due to SSO drag      (Pa)
50c
51c d_t-----output-R: T increment           
52c d_u-----output-R: U increment             
53c d_v-----output-R: V increment             
54c
55c Implicit Arguments:
56c ===================
57c
58c iim--common-I: Number of longitude intervals
59c jjm--common-I: Number of latitude intervals
60c klon-common-I: Number of points seen by the physics
61c                (iim+1)*(jjm+1) for instance
62c klev-common-I: Number of vertical layers
63c======================================================================
64c Local Variables:
65c ================
66c
67c zgeom-----R: Altitude (m) of layer above ground (from top to bottom)
68c pt, pu, pv --R: t u v from top to bottom
69c pdtdt, pdudt, pdvdt --R: t u v tendencies (from top to bottom)
70c papmf: pressure at model layer (from top to bottom)
71c papmh: pressure at model 1/2 layer (from top to bottom)
72c
73c======================================================================
74
75#include "YOMCST.h"
76#include "YOEGWD.h"
77
78c  ARGUMENTS
79c
80      INTEGER nlon,nlev
81      REAL dtime
82      REAL paprs(nlon,nlev+1)
83      REAL pplay(nlon,nlev)
84      REAL pgeop(nlon,nlev),pn2(nlon,nlev)
85      REAL pmea(nlon),pstd(nlon),psig(nlon),pgam(nlon),pthe(nlon)
86      REAL ppic(nlon),pval(nlon)
87      REAL pulow(nlon),pvlow(nlon),pustr(nlon),pvstr(nlon)
88      REAL t(nlon,nlev), u(nlon,nlev), v(nlon,nlev)
89      REAL d_t(nlon,nlev), d_u(nlon,nlev), d_v(nlon,nlev)
90      REAL blustr(nlon),blvstr(nlon),pnlow(nlon),zeff(nlon),zbl(nlon)
91      REAL knu2(nlon),kbreak(nlon)
92      REAL ztau(klon,klev+1), ptau(klon,klev), tau0(klon)
93c
94      INTEGER i, k, kgwd,  kdx(nlon), ktest(nlon)
95      INTEGER ikenvh(nlon)
96      INTEGER iknu2(nlon)
97      INTEGER ikbreak(nlon)
98c
99c LOCAL VARIABLES:
100c
101      REAL zgeom(klon,klev),zn2(klon,klev)
102      REAL pdtdt(klon,klev), pdudt(klon,klev), pdvdt(klon,klev)
103      REAL pt(klon,klev), pu(klon,klev), pv(klon,klev)
104      REAL papmf(klon,klev),papmh(klon,klev+1)
105c
106c INITIALIZE OUTPUT VARIABLES
107c
108      DO i = 1,klon
109         pulow(i) = 0.0
110         pvlow(i) = 0.0
111         pustr(i) = 0.0
112         pvstr(i) = 0.0
113      ENDDO
114      DO k = 1, klev
115      DO i = 1, klon
116         d_t(i,k) = 0.0
117         d_u(i,k) = 0.0
118         d_v(i,k) = 0.0
119         pdudt(i,k)=0.0
120         pdvdt(i,k)=0.0
121         pdtdt(i,k)=0.0
122      ENDDO
123      ENDDO
124c
125c PREPARE INPUT VARIABLES FOR ORODRAG (i.e., ORDERED FROM TOP TO BOTTOM)
126C CALCULATE LAYERS HEIGHT ABOVE GROUND)
127c
128      DO k = 1, klev
129      DO i = 1, klon
130         pt(i,k) = t(i,klev-k+1)
131         pu(i,k) = u(i,klev-k+1)
132         pv(i,k) = v(i,klev-k+1)
133         papmf(i,k) = pplay(i,klev-k+1)
134      ENDDO
135      ENDDO
136      DO k = 1, klev+1
137      DO i = 1, klon
138         papmh(i,k) = paprs(i,klev-k+2)
139      ENDDO
140      ENDDO
141
142      DO k = klev, 1, -1
143      DO i = 1, klon
144         zgeom(i,k) = pgeop(i,klev-k+1)/RG
145         zn2(i,k)   = pn2(i,klev-k+1)
146      ENDDO
147      ENDDO
148
149c CALL SSO DRAG ROUTINES       
150c
151      CALL orodrag(klon,klev,kgwd,kdx,ktest,
152     .            dtime,
153     .            papmh, papmf, zgeom, zn2,
154     .            pt, pu, pv,
155     .            pmea, pstd, psig, pgam, pthe, ppic,pval,
156     .            pulow,pvlow,
157     .            pdudt,pdvdt,pdtdt,
158     .            blustr,blvstr,pnlow,zeff,ikenvh,
159     .            ztau,iknu2,ikbreak)
160
161      zbl(:) = real(klev-ikenvh(:))
162      knu2(:) = real(klev-iknu2(:))
163      kbreak(:) = real(klev-ikbreak(:))
164      tau0 = ztau(:,klev+1)
165
166C
167C COMPUTE INCREMENTS AND STRESS FROM TENDENCIES
168
169      DO k = 1, klev
170      DO i = 1, klon
171         ptau(i,klev+1-k) = ztau(i,k)
172         d_u(i,klev+1-k) = dtime*pdudt(i,k)
173         d_v(i,klev+1-k) = dtime*pdvdt(i,k)
174         d_t(i,klev+1-k) = dtime*pdtdt(i,k)
175         pustr(i)        = pustr(i)
176     .                    +pdudt(i,k)*(papmh(i,k+1)-papmh(i,k))/rg
177         pvstr(i)        = pvstr(i)
178     .                    +pdvdt(i,k)*(papmh(i,k+1)-papmh(i,k))/rg
179      ENDDO
180      ENDDO
181c
182      RETURN
183      END
184
Note: See TracBrowser for help on using the repository browser.