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