1 | SUBROUTINE cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, compress, & |
---|
2 | iflag, kbas, ktop, & |
---|
3 | precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & |
---|
4 | ft, fq, fu, fv, ftra, & |
---|
5 | sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & |
---|
6 | qcondc, wd, cape, cin, & |
---|
7 | tvp, & |
---|
8 | ftd, fqd, & |
---|
9 | plim1, plim2, asupmax, supmax0, & |
---|
10 | asupmaxmin, & |
---|
11 | da, phi, mp, phi2, d1a, dam, sigij, & ! RomP+AC+jyg |
---|
12 | clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP |
---|
13 | wdtrainA, wdtrainM, & ! RomP |
---|
14 | qtc, sigt, & |
---|
15 | epmax_diag, & ! epmax_cape |
---|
16 | iflag1, kbas1, ktop1, & |
---|
17 | precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & |
---|
18 | ft1, fq1, fu1, fv1, ftra1, & |
---|
19 | sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & |
---|
20 | qcondc1, wd1, cape1, cin1, & |
---|
21 | tvp1, & |
---|
22 | ftd1, fqd1, & |
---|
23 | plim11, plim21, asupmax1, supmax01, & |
---|
24 | asupmaxmin1, & |
---|
25 | da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP+AC+jyg |
---|
26 | clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP |
---|
27 | wdtrainA1, wdtrainM1, & ! RomP |
---|
28 | qtc1, sigt1, & |
---|
29 | epmax_diag1) ! epmax_cape |
---|
30 | |
---|
31 | ! ************************************************************** |
---|
32 | ! * |
---|
33 | ! CV3A_UNCOMPRESS * |
---|
34 | ! * |
---|
35 | ! * |
---|
36 | ! written by : Sandrine Bony-Lena , 17/05/2003, 11.22.15 * |
---|
37 | ! modified by : Jean-Yves Grandpeix, 23/06/2003, 10.36.17 * |
---|
38 | ! ************************************************************** |
---|
39 | |
---|
40 | IMPLICIT NONE |
---|
41 | |
---|
42 | include "cv3param.h" |
---|
43 | |
---|
44 | ! inputs: |
---|
45 | INTEGER, INTENT (IN) :: nloc, len, ncum, nd, ntra |
---|
46 | INTEGER, DIMENSION (nloc), INTENT (IN) :: idcum(nloc) |
---|
47 | !jyg< |
---|
48 | LOGICAL, INTENT (IN) :: compress |
---|
49 | !>jyg |
---|
50 | INTEGER, DIMENSION (nloc), INTENT (IN) ::iflag, kbas, ktop |
---|
51 | REAL, DIMENSION (nloc), INTENT (IN) :: precip, cbmf, plcl, plfc |
---|
52 | REAL, DIMENSION (nloc), INTENT (IN) :: wbeff |
---|
53 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: sig, w0 |
---|
54 | REAL, DIMENSION (nloc), INTENT (IN) :: ptop2 |
---|
55 | REAL, DIMENSION (nloc), INTENT (IN) :: epmax_diag |
---|
56 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: ft, fq, fu, fv |
---|
57 | REAL, DIMENSION (nloc, nd, ntra), INTENT (IN) :: ftra |
---|
58 | REAL, DIMENSION (nloc), INTENT (IN) :: sigd |
---|
59 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: ma, mip |
---|
60 | REAL, DIMENSION (nloc, nd+1), INTENT (IN) :: vprecip |
---|
61 | REAL, DIMENSION (nloc, nd+1), INTENT (IN) :: vprecipi |
---|
62 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: upwd, dnwd, dnwd0 |
---|
63 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: qcondc |
---|
64 | REAL, DIMENSION (nloc), INTENT (IN) :: wd, cape, cin |
---|
65 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: tvp |
---|
66 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: ftd, fqd |
---|
67 | REAL, DIMENSION (nloc), INTENT (IN) :: plim1, plim2 |
---|
68 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: asupmax |
---|
69 | REAL, DIMENSION (nloc), INTENT (IN) :: supmax0, asupmaxmin |
---|
70 | |
---|
71 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: da |
---|
72 | REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: phi !AC! |
---|
73 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: mp !RomP |
---|
74 | REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: phi2 !RomP |
---|
75 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: d1a, dam !RomP |
---|
76 | REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: sigij !RomP |
---|
77 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: clw !RomP |
---|
78 | REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: elij !RomP |
---|
79 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: evap, ep !RomP |
---|
80 | REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: epmlmMm !RomP+jyg |
---|
81 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: eplamM !RomP+jyg |
---|
82 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: qtc, sigt !RomP |
---|
83 | REAL, DIMENSION (nloc, nd), INTENT (IN) :: wdtrainA, wdtrainM !RomP |
---|
84 | |
---|
85 | ! outputs: |
---|
86 | INTEGER, DIMENSION (len), INTENT (OUT) :: iflag1, kbas1, ktop1 |
---|
87 | REAL, DIMENSION (len), INTENT (OUT) :: precip1, cbmf1, plcl1, plfc1 |
---|
88 | REAL, DIMENSION (len), INTENT (OUT) :: wbeff1 |
---|
89 | REAL, DIMENSION (len, nd), INTENT (OUT) :: sig1, w01 |
---|
90 | REAL, DIMENSION (len), INTENT (OUT) :: epmax_diag1 ! epmax_cape |
---|
91 | REAL, DIMENSION (len), INTENT (OUT) :: ptop21 |
---|
92 | REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1, fq1, fu1, fv1 |
---|
93 | REAL, DIMENSION (len, nd, ntra), INTENT (OUT) :: ftra1 |
---|
94 | REAL, DIMENSION (len), INTENT (OUT) :: sigd1 |
---|
95 | REAL, DIMENSION (len, nd), INTENT (OUT) :: ma1, mip1 |
---|
96 | REAL, DIMENSION (len, nd+1), INTENT (OUT) :: vprecip1 |
---|
97 | REAL, DIMENSION (len, nd+1), INTENT (OUT) :: vprecipi1 |
---|
98 | REAL, DIMENSION (len, nd), INTENT (OUT) :: upwd1, dnwd1, dnwd01 |
---|
99 | REAL, DIMENSION (len, nd), INTENT (OUT) :: qcondc1 |
---|
100 | REAL, DIMENSION (len), INTENT (OUT) :: wd1, cape1, cin1 |
---|
101 | REAL, DIMENSION (len, nd), INTENT (OUT) :: tvp1 |
---|
102 | REAL, DIMENSION (len, nd), INTENT (OUT) :: ftd1, fqd1 |
---|
103 | REAL, DIMENSION (len), INTENT (OUT) :: plim11, plim21 |
---|
104 | REAL, DIMENSION (len, nd), INTENT (OUT) :: asupmax1 |
---|
105 | REAL, DIMENSION (len), INTENT (OUT) :: supmax01, asupmaxmin1 |
---|
106 | |
---|
107 | REAL, DIMENSION (len, nd), INTENT (OUT) :: da1 |
---|
108 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi1 !AC! |
---|
109 | REAL, DIMENSION (len, nd), INTENT (OUT) :: mp1 !RomP |
---|
110 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi21 !RomP |
---|
111 | REAL, DIMENSION (len, nd), INTENT (OUT) :: d1a1, dam1 !RomP !RomP |
---|
112 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: sigij1 !RomP |
---|
113 | REAL, DIMENSION (len, nd), INTENT (OUT) :: clw1 !RomP |
---|
114 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: elij1 !RomP |
---|
115 | REAL, DIMENSION (len, nd), INTENT (OUT) :: evap1, ep1 !RomP |
---|
116 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: epmlmMm1 !RomP+jyg |
---|
117 | REAL, DIMENSION (len, nd), INTENT (OUT) :: eplamM1 !RomP+jyg |
---|
118 | REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1, sigt1 !RomP |
---|
119 | REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainM1 !RomP |
---|
120 | |
---|
121 | |
---|
122 | ! local variables: |
---|
123 | INTEGER i, k, j |
---|
124 | INTEGER jdcum |
---|
125 | ! c integer k1,k2 |
---|
126 | |
---|
127 | !jyg< |
---|
128 | IF (compress) THEN |
---|
129 | !>jyg |
---|
130 | DO i = 1, ncum |
---|
131 | sig1(idcum(i), nd) = sig(i, nd) |
---|
132 | ptop21(idcum(i)) = ptop2(i) |
---|
133 | sigd1(idcum(i)) = sigd(i) |
---|
134 | precip1(idcum(i)) = precip(i) |
---|
135 | cbmf1(idcum(i)) = cbmf(i) |
---|
136 | plcl1(idcum(i)) = plcl(i) |
---|
137 | plfc1(idcum(i)) = plfc(i) |
---|
138 | wbeff1(idcum(i)) = wbeff(i) |
---|
139 | iflag1(idcum(i)) = iflag(i) |
---|
140 | kbas1(idcum(i)) = kbas(i) |
---|
141 | ktop1(idcum(i)) = ktop(i) |
---|
142 | wd1(idcum(i)) = wd(i) |
---|
143 | cape1(idcum(i)) = cape(i) |
---|
144 | cin1(idcum(i)) = cin(i) |
---|
145 | plim11(idcum(i)) = plim1(i) |
---|
146 | plim21(idcum(i)) = plim2(i) |
---|
147 | supmax01(idcum(i)) = supmax0(i) |
---|
148 | asupmaxmin1(idcum(i)) = asupmaxmin(i) |
---|
149 | epmax_diag1(idcum(i)) = epmax_diag(i) |
---|
150 | END DO |
---|
151 | |
---|
152 | DO k = 1, nl |
---|
153 | DO i = 1, ncum |
---|
154 | sig1(idcum(i), k) = sig(i, k) |
---|
155 | w01(idcum(i), k) = w0(i, k) |
---|
156 | ft1(idcum(i), k) = ft(i, k) |
---|
157 | fq1(idcum(i), k) = fq(i, k) |
---|
158 | fu1(idcum(i), k) = fu(i, k) |
---|
159 | fv1(idcum(i), k) = fv(i, k) |
---|
160 | ma1(idcum(i), k) = ma(i, k) |
---|
161 | mip1(idcum(i), k) = mip(i, k) |
---|
162 | vprecip1(idcum(i), k) = vprecip(i, k) |
---|
163 | vprecipi1(idcum(i), k) = vprecipi(i, k) |
---|
164 | upwd1(idcum(i), k) = upwd(i, k) |
---|
165 | dnwd1(idcum(i), k) = dnwd(i, k) |
---|
166 | dnwd01(idcum(i), k) = dnwd0(i, k) |
---|
167 | qcondc1(idcum(i), k) = qcondc(i, k) |
---|
168 | tvp1(idcum(i), k) = tvp(i, k) |
---|
169 | ftd1(idcum(i), k) = ftd(i, k) |
---|
170 | fqd1(idcum(i), k) = fqd(i, k) |
---|
171 | asupmax1(idcum(i), k) = asupmax(i, k) |
---|
172 | |
---|
173 | da1(idcum(i), k) = da(i, k) !AC! |
---|
174 | mp1(idcum(i), k) = mp(i, k) !RomP |
---|
175 | d1a1(idcum(i), k) = d1a(i, k) !RomP |
---|
176 | dam1(idcum(i), k) = dam(i, k) !RomP |
---|
177 | clw1(idcum(i), k) = clw(i, k) !RomP |
---|
178 | evap1(idcum(i), k) = evap(i, k) !RomP |
---|
179 | ep1(idcum(i), k) = ep(i, k) !RomP |
---|
180 | eplamM1(idcum(i), k) = eplamM(i, k) !RomP+jyg |
---|
181 | wdtrainA1(idcum(i), k) = wdtrainA(i, k) !RomP |
---|
182 | wdtrainM1(idcum(i), k) = wdtrainM(i, k) !RomP |
---|
183 | qtc1(idcum(i), k) = qtc(i, k) |
---|
184 | sigt1(idcum(i), k) = sigt(i, k) |
---|
185 | |
---|
186 | END DO |
---|
187 | END DO |
---|
188 | |
---|
189 | ! Fluxes are defined on a staggered grid and extend up to nl+1 |
---|
190 | DO i = 1, ncum |
---|
191 | ma1(idcum(i), nlp) = 0. |
---|
192 | vprecip1(idcum(i), nlp) = 0. |
---|
193 | vprecipi1(idcum(i), nlp) = 0. |
---|
194 | upwd1(idcum(i), nlp) = 0. |
---|
195 | dnwd1(idcum(i), nlp) = 0. |
---|
196 | dnwd01(idcum(i), nlp) = 0. |
---|
197 | END DO |
---|
198 | |
---|
199 | ! AC! do 2100 j=1,ntra |
---|
200 | ! AC!c oct3 do 2110 k=1,nl |
---|
201 | ! AC! do 2110 k=1,nd ! oct3 |
---|
202 | ! AC! do 2120 i=1,ncum |
---|
203 | ! AC! ftra1(idcum(i),k,j)=ftra(i,k,j) |
---|
204 | ! AC! 2120 continue |
---|
205 | ! AC! 2110 continue |
---|
206 | ! AC! 2100 continue |
---|
207 | |
---|
208 | ! AC! |
---|
209 | !jyg< |
---|
210 | ! Essais pour gagner du temps en diminuant l'adressage indirect |
---|
211 | !! DO j = 1, nd |
---|
212 | !! DO k = 1, nd |
---|
213 | !! DO i = 1, ncum |
---|
214 | !! phi1(idcum(i), k, j) = phi(i, k, j) !AC! |
---|
215 | !! phi21(idcum(i), k, j) = phi2(i, k, j) !RomP |
---|
216 | !! sigij1(idcum(i), k, j) = sigij(i, k, j) !RomP |
---|
217 | !! elij1(idcum(i), k, j) = elij(i, k, j) !RomP |
---|
218 | !! epmlmMm(idcum(i), k, j) = epmlmMm(i, k, j) !RomP+jyg |
---|
219 | !! END DO |
---|
220 | !! END DO |
---|
221 | !! END DO |
---|
222 | |
---|
223 | !! DO i = 1, ncum |
---|
224 | !! jdcum=idcum(i) |
---|
225 | !! phi1 (jdcum, 1:nl+1, 1:nl+1) = phi (i, 1:nl+1, 1:nl+1) !AC! |
---|
226 | !! phi21 (jdcum, 1:nl+1, 1:nl+1) = phi2 (i, 1:nl+1, 1:nl+1) !RomP |
---|
227 | !! sigij1 (jdcum, 1:nl+1, 1:nl+1) = sigij (i, 1:nl+1, 1:nl+1) !RomP |
---|
228 | !! elij1 (jdcum, 1:nl+1, 1:nl+1) = elij (i, 1:nl+1, 1:nl+1) !RomP |
---|
229 | !! epmlmMm1(jdcum, 1:nl+1, 1:nl+1) = epmlmMm(i, 1:nl+1, 1:nl+1) !RomP+jyg |
---|
230 | !! END DO |
---|
231 | ! These tracer associated arrays are defined up to nl, not nl+1 |
---|
232 | DO i = 1, ncum |
---|
233 | jdcum=idcum(i) |
---|
234 | DO k = 1,nl |
---|
235 | DO j = 1,nl |
---|
236 | phi1 (jdcum, j, k) = phi (i, j, k) !AC! |
---|
237 | phi21 (jdcum, j, k) = phi2 (i, j, k) !RomP |
---|
238 | sigij1 (jdcum, j, k) = sigij (i, j, k) !RomP |
---|
239 | elij1 (jdcum, j, k) = elij (i, j, k) !RomP |
---|
240 | epmlmMm1(jdcum, j, k) = epmlmMm(i, j, k) !RomP+jyg |
---|
241 | END DO |
---|
242 | ENDDO |
---|
243 | ENDDO |
---|
244 | !>jyg |
---|
245 | ! AC! |
---|
246 | |
---|
247 | |
---|
248 | ! do 2220 k2=1,nd |
---|
249 | ! do 2210 k1=1,nd |
---|
250 | ! do 2200 i=1,ncum |
---|
251 | ! ment1(idcum(i),k1,k2) = ment(i,k1,k2) |
---|
252 | ! sigij1(idcum(i),k1,k2) = sigij(i,k1,k2) |
---|
253 | ! 2200 enddo |
---|
254 | ! 2210 enddo |
---|
255 | ! 2220 enddo |
---|
256 | ! |
---|
257 | !jyg< |
---|
258 | ELSE !(compress) |
---|
259 | ! |
---|
260 | sig1(:,nd) = sig(:,nd) |
---|
261 | ptop21(:) = ptop2(:) |
---|
262 | sigd1(:) = sigd(:) |
---|
263 | precip1(:) = precip(:) |
---|
264 | cbmf1(:) = cbmf(:) |
---|
265 | plcl1(:) = plcl(:) |
---|
266 | plfc1(:) = plfc(:) |
---|
267 | wbeff1(:) = wbeff(:) |
---|
268 | iflag1(:) = iflag(:) |
---|
269 | kbas1(:) = kbas(:) |
---|
270 | ktop1(:) = ktop(:) |
---|
271 | wd1(:) = wd(:) |
---|
272 | cape1(:) = cape(:) |
---|
273 | cin1(:) = cin(:) |
---|
274 | plim11(:) = plim1(:) |
---|
275 | plim21(:) = plim2(:) |
---|
276 | supmax01(:) = supmax0(:) |
---|
277 | asupmaxmin1(:) = asupmaxmin(:) |
---|
278 | ! |
---|
279 | sig1(:, 1:nl) = sig(:, 1:nl) |
---|
280 | w01(:, 1:nl) = w0(:, 1:nl) |
---|
281 | ft1(:, 1:nl) = ft(:, 1:nl) |
---|
282 | fq1(:, 1:nl) = fq(:, 1:nl) |
---|
283 | fu1(:, 1:nl) = fu(:, 1:nl) |
---|
284 | fv1(:, 1:nl) = fv(:, 1:nl) |
---|
285 | ma1(:, 1:nl) = ma(:, 1:nl) |
---|
286 | mip1(:, 1:nl) = mip(:, 1:nl) |
---|
287 | vprecip1(:, 1:nl) = vprecip(:, 1:nl) |
---|
288 | vprecipi1(:, 1:nl) = vprecipi(:, 1:nl) |
---|
289 | upwd1(:, 1:nl) = upwd(:, 1:nl) |
---|
290 | dnwd1(:, 1:nl) = dnwd(:, 1:nl) |
---|
291 | dnwd01(:, 1:nl) = dnwd0(:, 1:nl) |
---|
292 | qcondc1(:, 1:nl) = qcondc(:, 1:nl) |
---|
293 | tvp1(:, 1:nl) = tvp(:, 1:nl) |
---|
294 | ftd1(:, 1:nl) = ftd(:, 1:nl) |
---|
295 | fqd1(:, 1:nl) = fqd(:, 1:nl) |
---|
296 | asupmax1(:, 1:nl) = asupmax(:, 1:nl) |
---|
297 | |
---|
298 | da1(:, 1:nl) = da(:, 1:nl) !AC! |
---|
299 | mp1(:, 1:nl) = mp(:, 1:nl) !RomP |
---|
300 | d1a1(:, 1:nl) = d1a(:, 1:nl) !RomP |
---|
301 | dam1(:, 1:nl) = dam(:, 1:nl) !RomP |
---|
302 | clw1(:, 1:nl) = clw(:, 1:nl) !RomP |
---|
303 | evap1(:, 1:nl) = evap(:, 1:nl) !RomP |
---|
304 | ep1(:, 1:nl) = ep(:, 1:nl) !RomP |
---|
305 | eplamM1(:, 1:nl) = eplamM(:, 1:nl) !RomP+jyg |
---|
306 | wdtrainA1(:, 1:nl) = wdtrainA(:, 1:nl) !RomP |
---|
307 | wdtrainM1(:, 1:nl) = wdtrainM(:, 1:nl) !RomP |
---|
308 | qtc1(:, 1:nl) = qtc(:, 1:nl) |
---|
309 | sigt1(:, 1:nl) = sigt(:, 1:nl) |
---|
310 | ! |
---|
311 | ma1(:, nlp) = 0. |
---|
312 | vprecip1(:, nlp) = 0. |
---|
313 | vprecipi1(:, nlp) = 0. |
---|
314 | upwd1(:, nlp) = 0. |
---|
315 | dnwd1(:, nlp) = 0. |
---|
316 | dnwd01(:, nlp) = 0. |
---|
317 | |
---|
318 | ! |
---|
319 | phi1 (:, 1:nl, 1:nl) = phi (:, 1:nl, 1:nl) !AC! |
---|
320 | phi21 (:, 1:nl, 1:nl) = phi2 (:, 1:nl, 1:nl) !RomP |
---|
321 | sigij1 (:, 1:nl, 1:nl) = sigij (:, 1:nl, 1:nl) !RomP |
---|
322 | elij1 (:, 1:nl, 1:nl) = elij (:, 1:nl, 1:nl) !RomP |
---|
323 | epmlmMm1(:, 1:nl, 1:nl) = epmlmMm(:, 1:nl, 1:nl) !RomP+jyg |
---|
324 | ENDIF !(compress) |
---|
325 | !>jyg |
---|
326 | |
---|
327 | RETURN |
---|
328 | END SUBROUTINE cv3a_uncompress |
---|
329 | |
---|