1 | MODULE drag_noro_mod |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | SUBROUTINE drag_noro (klon,klev,dtime,pplay,pplev, |
---|
8 | e pvar, psig, pgam, pthe, |
---|
9 | e kgwd,kgwdim,kdx,ktest, |
---|
10 | e t, u, v, |
---|
11 | s pulow, pvlow, pustr, pvstr, |
---|
12 | s d_t, d_u, d_v) |
---|
13 | C**** *DRAG_NORO* INTERFACE FOR SUB-GRID SCALE OROGRAPHIC SCHEME |
---|
14 | C |
---|
15 | C PURPOSE. |
---|
16 | C -------- |
---|
17 | C ZEROS TENDENCIES, COMPUTES GEOPOTENTIAL HEIGHT AND UPDATES THE |
---|
18 | C TENDENCIES AFTER THE SCHEME HAS BEEN CALLED. |
---|
19 | C |
---|
20 | C EXPLICIT ARGUMENTS : |
---|
21 | C -------------------- |
---|
22 | C |
---|
23 | C INPUT : |
---|
24 | C |
---|
25 | C NLON : NUMBER OF HORIZONTAL GRID POINTS |
---|
26 | C NLEV : NUMBER OF LEVELS |
---|
27 | C DTIME : LENGTH OF TIME STEP |
---|
28 | C PPLAY(NLON,NLEV+1) : PRESSURE AT MIDDLE LEVELS |
---|
29 | C PPLEV(NLON,NLEV) : PRESSURE ON MODEL LEVELS |
---|
30 | C PVAR(NLON) : SUB-GRID SCALE STANDARD DEVIATION |
---|
31 | C PSIG(NLON) : SUB-GRID SCALE SLOPE |
---|
32 | C PGAM(NLON) : SUB-GRID SCALE ANISOTROPY |
---|
33 | C PTHE(NLON) : SUB-GRID SCALE PRINCIPAL AXES ANGLE |
---|
34 | C KGWD : NUMBER OF POINTS AT WHICH THE SCHEME IS CALLED |
---|
35 | C KGWDIM : NUMBER OF POINTS AT WHICH THE SCHEME IS CALLED |
---|
36 | C KDX(NLON) : POINTS AT WHICH TO CALL THE SCHEME |
---|
37 | C KTEST(NLON) : MAP OF CALLING POINTS |
---|
38 | C T(NLON,NLEV) : TEMPERATURE |
---|
39 | C U(NLON,NLEV) : ZONAL WIND |
---|
40 | C V(NLON,NLEV) : MERIDIONAL WIND |
---|
41 | C |
---|
42 | C OUTPUT : |
---|
43 | C |
---|
44 | C PULOW(NLON) : LOW LEVEL ZONAL WIND |
---|
45 | C PVLOW(NLON) : LOW LEVEL MERIDIONAL WIND |
---|
46 | C PUSTR(NLON) : LOW LEVEL ZONAL STRESS |
---|
47 | C PVSTR(NLON) : LOW LEVEL MERIDIONAL STRESS |
---|
48 | C D_T(NLON,NLEV) : TEMPERATURE TENDENCY |
---|
49 | C D_U(NLON,NLEV) : ZONAL WIND TENDENCY |
---|
50 | C D_V(NLON,NLEV) : MERIDIONAL WIND TENDENCY |
---|
51 | C |
---|
52 | C IMPLICIT ARGUMENTS : |
---|
53 | C -------------------- |
---|
54 | C |
---|
55 | C comcstfi.h |
---|
56 | C |
---|
57 | c |
---|
58 | use dimradmars_mod, only: ndlo2 |
---|
59 | USE orodrag_mod, ONLY: orodrag |
---|
60 | USE comcstfi_h, ONLY: g, r |
---|
61 | IMPLICIT none |
---|
62 | c====================================================================== |
---|
63 | c Auteur(s): Z.X. Li F.Lott (LMD/CNRS) date: 19950201 |
---|
64 | c Objet: Frottement de la montagne Interface |
---|
65 | c====================================================================== |
---|
66 | c Arguments: |
---|
67 | c dtime---input-R- pas d'integration (s) |
---|
68 | c s-------input-R-la valeur "s" pour chaque couche |
---|
69 | c pplay--input-R- pression au milieu des couches en Pa |
---|
70 | c pplev--input-R-pression au bords des couches en Pa |
---|
71 | c t-------input-R-temperature (K) |
---|
72 | c u-------input-R-vitesse horizontale (m/s) |
---|
73 | c v-------input-R-vitesse horizontale (m/s) |
---|
74 | c |
---|
75 | c d_t-----output-R-increment de la temperature t |
---|
76 | c d_u-----output-R-increment de la vitesse u |
---|
77 | c d_v-----output-R-increment de la vitesse v |
---|
78 | c====================================================================== |
---|
79 | c |
---|
80 | c ARGUMENTS |
---|
81 | c |
---|
82 | REAL dtime |
---|
83 | INTEGER klon,klev |
---|
84 | real pplay(NDLO2,klev),pplev(NDLO2,klev+1) |
---|
85 | REAL pvar(NDLO2),psig(NDLO2),pgam(NDLO2),pthe(NDLO2) |
---|
86 | REAL pulow(NDLO2),pvlow(NDLO2),pustr(NDLO2),pvstr(NDLO2) |
---|
87 | REAL u(NDLO2,klev), v(NDLO2,klev),t(NDLO2,klev) |
---|
88 | REAL d_t(NDLO2,klev), d_u(NDLO2,klev), d_v(NDLO2,klev) |
---|
89 | c |
---|
90 | INTEGER i, k, kgwd, kgwdim, kdx(NDLO2), ktest(NDLO2) |
---|
91 | c |
---|
92 | c Variables locales: |
---|
93 | c |
---|
94 | REAL paprs(NDLO2,klev+1) |
---|
95 | REAL paprsf(NDLO2,klev) |
---|
96 | REAL zgeom(NDLO2,klev) |
---|
97 | REAL pdtdt(NDLO2,klev) |
---|
98 | REAL pdudt(NDLO2,klev), pdvdt(NDLO2,klev) |
---|
99 | REAL pt(NDLO2,klev), pu(NDLO2,klev) |
---|
100 | REAL pv(NDLO2,klev) |
---|
101 | c |
---|
102 | c initialiser les variables de sortie (pour securite) |
---|
103 | c |
---|
104 | DO i = 1,klon |
---|
105 | pulow(i) = 0.0 |
---|
106 | pvlow(i) = 0.0 |
---|
107 | pustr(i) = 0.0 |
---|
108 | pvstr(i) = 0.0 |
---|
109 | ENDDO |
---|
110 | DO k = 1, klev |
---|
111 | DO i = 1, klon |
---|
112 | d_t(i,k) = 0.0 |
---|
113 | d_u(i,k) = 0.0 |
---|
114 | d_v(i,k) = 0.0 |
---|
115 | pdudt(i,k)=0.0 |
---|
116 | pdvdt(i,k)=0.0 |
---|
117 | pdtdt(i,k)=0.0 |
---|
118 | ENDDO |
---|
119 | ENDDO |
---|
120 | c |
---|
121 | c preparer les variables d'entree (attention: l'ordre des niveaux |
---|
122 | c verticaux augmente du haut vers le bas) |
---|
123 | c |
---|
124 | DO k = 1, klev |
---|
125 | DO i = 1, klon |
---|
126 | pt(i,k) = t(i,klev-k+1) |
---|
127 | pu(i,k) = u(i,klev-k+1) |
---|
128 | pv(i,k) = v(i,klev-k+1) |
---|
129 | paprsf(i,k) = pplay(i,klev-k+1) |
---|
130 | paprs(i,k) = pplev(i,klev+1-k+1) |
---|
131 | ENDDO |
---|
132 | ENDDO |
---|
133 | DO i = 1, klon |
---|
134 | paprs(i,klev+1) = pplev(i,1) |
---|
135 | ENDDO |
---|
136 | DO i = 1, klon |
---|
137 | zgeom(i,klev) = r * pt(i,klev) |
---|
138 | . * LOG(paprs(i,klev+1)/paprsf(i,klev)) |
---|
139 | ENDDO |
---|
140 | DO k = klev-1, 1, -1 |
---|
141 | DO i = 1, klon |
---|
142 | zgeom(i,k) = zgeom(i,k+1) + r * (pt(i,k)+pt(i,k+1))/2.0 |
---|
143 | . * LOG(paprsf(i,k+1)/paprsf(i,k)) |
---|
144 | ENDDO |
---|
145 | ENDDO |
---|
146 | c |
---|
147 | c appeler la routine principale |
---|
148 | c |
---|
149 | |
---|
150 | CALL ORODRAG(klon,klev,kgwd,kgwdim,kdx,ktest, |
---|
151 | . dtime, |
---|
152 | . paprs, paprsf, zgeom, |
---|
153 | . pt, pu, pv, pvar, psig, pgam, pthe, |
---|
154 | . pulow,pvlow, |
---|
155 | . pdudt,pdvdt,pdtdt) |
---|
156 | C |
---|
157 | DO k = 1, klev |
---|
158 | DO i = 1, klon |
---|
159 | d_u(i,klev+1-k) = dtime*pdudt(i,k) |
---|
160 | d_v(i,klev+1-k) = dtime*pdvdt(i,k) |
---|
161 | d_t(i,klev+1-k) = dtime*pdtdt(i,k) |
---|
162 | pustr(i) = pustr(i) |
---|
163 | . +g*pdudt(i,k)*(paprs(i,k+1)-paprs(i,k)) |
---|
164 | pvstr(i) = pvstr(i) |
---|
165 | . +g*pdvdt(i,k)*(paprs(i,k+1)-paprs(i,k)) |
---|
166 | ENDDO |
---|
167 | ENDDO |
---|
168 | c |
---|
169 | |
---|
170 | END SUBROUTINE drag_noro |
---|
171 | |
---|
172 | END MODULE drag_noro_mod |
---|