source: trunk/LMDZ.TITAN/libf/phytitan/drag_noro.F @ 1056

Last change on this file since 1056 was 1056, checked in by slebonnois, 11 years ago

SL: Titan runs ! see DOC/chantiers/commit_importants.log

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