Changeset 495 for LMDZ.3.3/branches/rel-LF/libf/filtrez
- Timestamp:
- Mar 4, 2004, 4:11:16 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/filtrez/filtreg.F
r231 r495 49 49 INTEGER i,j,l,k 50 50 INTEGER iim2,immjm 51 INTEGER jdfil1,jdfil2,jffil1,jffil2,jdfil ,jffil51 INTEGER jdfil1,jdfil2,jffil1,jffil2,jdfil(2),jffil(2) 52 52 53 53 REAL champ( iip1,nlat,nbniv) … … 56 56 , , matricevn(iim,iim,nfilvn),matricevs(iim,iim,nfilvs) 57 57 , , matrinvn(iim,iim,nfilun),matrinvs (iim,iim,nfilus) 58 REAL eignq(iim), sdd1(iim),sdd2(iim) 58 cIM REAL eignq(iim), sdd1(iim),sdd2(iim) 59 REAL eignq(iim,nlat,nbniv), sdd1(iim),sdd2(iim) 59 60 LOGICAL griscal 60 61 INTEGER hemisph, iaire … … 127 128 END IF 128 129 c 130 jdfil(1) = jdfil1 131 jffil(1) = jffil1 132 jdfil(2) = jdfil2 133 jffil(2) = jffil2 129 134 c 130 135 DO 100 hemisph = 1, 2 131 136 c 132 133 134 135 136 137 138 137 c IF ( hemisph.EQ.1 ) THEN 138 c jdfil = jdfil1 139 c jffil = jffil1 140 c ELSE 141 c jdfil = jdfil2 142 c jffil = jffil2 143 c END IF 139 144 140 145 141 146 DO 50 l = 1, nbniv 142 DO 30 j = jdfil ,jffil147 DO 30 j = jdfil(hemisph),jffil(hemisph) 143 148 144 149 … … 147 152 5 CONTINUE 148 153 c 154 30 CONTINUE 155 50 CONTINUE 149 156 150 157 IF( hemisph. EQ. 1 ) THEN … … 152 159 IF( ifiltre. EQ. -2 ) THEN 153 160 #ifdef CRAY 161 DO l = 1, nbniv 162 DO j = jdfil(hemisph),jffil(hemisph) 154 163 CALL MXVA( matrinvn(1,1,j), 1, iim, champ(1,j,l), 1, eignq , 155 164 * 1, iim, iim ) 156 #else 157 #ifdef BLAS 165 ENDDO 166 ENDDO 167 #else 168 #ifdef BLAS 169 DO l = 1, nbniv 170 DO j = jdfil(hemisph),jffil(hemisph) 158 171 CALL SGEMV("N", iim,iim, 1.0, matrinvn(1,1,j),iim, 159 172 . champ(1,j,l), 1, 0.0, eignq, 1) 160 #else 161 DO k = 1, iim 162 eignq(k) = 0.0 163 ENDDO 164 DO k = 1, iim 165 DO i = 1, iim 166 eignq(k) = eignq(k) + matrinvn(k,i,j)*champ(i,j,l) 167 ENDDO 168 ENDDO 173 ENDDO 174 ENDDO 175 #else 176 DO l = 1, nbniv 177 DO j = jdfil(hemisph),jffil(hemisph) 178 DO k = 1, iim 179 c eignq(k) = 0.0 180 eignq(k,j,l) = 0.0 181 ENDDO 182 DO k = 1, iim 183 DO i = 1, iim 184 c eignq(k) = eignq(k) + matrinvn(k,i,j)*champ(i,j,l) 185 eignq(k,j,l) = eignq(k,j,l) + matrinvn(k,i,j)*champ(i,j,l) 186 ENDDO 187 ENDDO 188 ENDDO 189 ENDDO 169 190 #endif 170 191 #endif 171 192 ELSE IF ( griscal ) THEN 172 193 #ifdef CRAY 194 DO l = 1, nbniv 195 DO j = jdfil(hemisph),jffil(hemisph) 173 196 CALL MXVA( matriceun(1,1,j), 1, iim, champ(1,j,l), 1, eignq , 174 197 * 1, iim, iim ) 175 #else 176 #ifdef BLAS 198 ENDDO 199 ENDDO 200 #else 201 #ifdef BLAS 202 DO l = 1, nbniv 203 DO j = jdfil(hemisph),jffil(hemisph) 177 204 CALL SGEMV("N", iim,iim, 1.0, matriceun(1,1,j),iim, 178 205 . champ(1,j,l), 1, 0.0, eignq, 1) 179 #else 180 DO k = 1, iim 181 eignq(k) = 0.0 182 ENDDO 183 DO i = 1, iim 184 DO k = 1, iim 185 eignq(k) = eignq(k) + matriceun(k,i,j)*champ(i,j,l) 186 ENDDO 187 ENDDO 206 ENDDO 207 ENDDO 208 #else 209 DO l = 1, nbniv 210 DO j = jdfil(hemisph),jffil(hemisph) 211 DO k = 1, iim 212 c eignq(k) = 0.0 213 eignq(k,j,l) = 0.0 214 ENDDO 215 DO i = 1, iim 216 DO k = 1, iim 217 c eignq(k) = eignq(k) + matriceun(k,i,j)*champ(i,j,l) 218 eignq(k,j,l) = eignq(k,j,l) + matriceun(k,i,j)*champ(i,j,l) 219 ENDDO 220 ENDDO 221 ENDDO 222 ENDDO 188 223 #endif 189 224 #endif 190 225 ELSE 191 226 #ifdef CRAY 227 DO l = 1, nbniv 228 DO j = jdfil(hemisph),jffil(hemisph) 192 229 CALL MXVA( matricevn(1,1,j), 1, iim, champ(1,j,l), 1, eignq , 193 230 * 1, iim, iim ) 194 #else 195 #ifdef BLAS 231 ENDDO 232 ENDDO 233 #else 234 #ifdef BLAS 235 DO l = 1, nbniv 236 DO j = jdfil(hemisph),jffil(hemisph) 196 237 CALL SGEMV("N", iim,iim, 1.0, matricevn(1,1,j),iim, 197 238 . champ(1,j,l), 1, 0.0, eignq, 1) 198 #else 199 DO k = 1, iim 200 eignq(k) = 0.0 201 ENDDO 202 DO i = 1, iim 203 DO k = 1, iim 204 eignq(k) = eignq(k) + matricevn(k,i,j)*champ(i,j,l) 205 ENDDO 206 ENDDO 239 ENDDO 240 ENDDO 241 #else 242 DO l = 1, nbniv 243 DO j = jdfil(hemisph),jffil(hemisph) 244 DO k = 1, iim 245 c eignq(k) = 0.0 246 eignq(k,j,l) = 0.0 247 ENDDO 248 DO i = 1, iim 249 DO k = 1, iim 250 c eignq(k) = eignq(k) + matricevn(k,i,j)*champ(i,j,l) 251 eignq(k,j,l) = eignq(k,j,l) + matricevn(k,i,j)*champ(i,j,l) 252 ENDDO 253 ENDDO 254 ENDDO 255 ENDDO 207 256 #endif 208 257 #endif … … 213 262 IF( ifiltre. EQ. -2 ) THEN 214 263 #ifdef CRAY 264 DO l = 1, nbniv 265 DO j = jdfil(hemisph),jffil(hemisph) 215 266 CALL MXVA( matrinvs(1,1,j-jfiltsu+1), 1, iim, champ(1,j,l),1 , 216 267 * eignq, 1, iim, iim ) 217 #else 218 #ifdef BLAS 268 ENDDO 269 ENDDO 270 #else 271 #ifdef BLAS 272 DO l = 1, nbniv 273 DO j = jdfil(hemisph),jffil(hemisph) 219 274 CALL SGEMV("N", iim,iim, 1.0, matrinvs(1,1,j-jfiltsu+1),iim, 220 275 . champ(1,j,l), 1, 0.0, eignq, 1) 221 #else 222 DO k = 1, iim 223 eignq(k) = 0.0 224 ENDDO 225 DO i = 1, iim 226 DO k = 1, iim 227 eignq(k) = eignq(k) + matrinvs(k,i,j-jfiltsu+1)*champ(i,j,l) 228 ENDDO 229 ENDDO 276 ENDDO 277 ENDDO 278 #else 279 DO l = 1, nbniv 280 DO j = jdfil(hemisph),jffil(hemisph) 281 DO k = 1, iim 282 c eignq(k) = 0.0 283 eignq(k,j,l) = 0.0 284 ENDDO 285 DO i = 1, iim 286 DO k = 1, iim 287 c eignq(k) = eignq(k) + matrinvs(k,i,j-jfiltsu+1)*champ(i,j,l) 288 eignq(k,j,l) = eignq(k,j,l) + 289 .matrinvs(k,i,j-jfiltsu+1)*champ(i,j,l) 290 ENDDO 291 ENDDO 292 ENDDO 293 ENDDO 230 294 #endif 231 295 #endif 232 296 ELSE IF ( griscal ) THEN 233 297 #ifdef CRAY 298 DO l = 1, nbniv 299 DO j = jdfil(hemisph),jffil(hemisph) 234 300 CALL MXVA( matriceus(1,1,j-jfiltsu+1), 1, iim, champ(1,j,l),1 , 235 301 * eignq, 1, iim, iim ) 236 #else 237 #ifdef BLAS 302 ENDDO 303 ENDDO 304 #else 305 #ifdef BLAS 306 DO l = 1, nbniv 307 DO j = jdfil(hemisph),jffil(hemisph) 238 308 CALL SGEMV("N", iim,iim, 1.0, matriceus(1,1,j-jfiltsu+1),iim, 239 309 . champ(1,j,l), 1, 0.0, eignq, 1) 240 #else 241 DO k = 1, iim 242 eignq(k) = 0.0 243 ENDDO 244 DO i = 1, iim 245 DO k = 1, iim 246 eignq(k) = eignq(k) + matriceus(k,i,j-jfiltsu+1)*champ(i,j,l) 247 ENDDO 248 ENDDO 310 ENDDO 311 ENDDO 312 #else 313 DO l = 1, nbniv 314 DO j = jdfil(hemisph),jffil(hemisph) 315 DO k = 1, iim 316 c eignq(k) = 0.0 317 eignq(k,j,l) = 0.0 318 ENDDO 319 DO i = 1, iim 320 DO k = 1, iim 321 c eignq(k) = eignq(k) + matriceus(k,i,j-jfiltsu+1)*champ(i,j,l) 322 eignq(k,j,l) = eignq(k,j,l) + 323 .matriceus(k,i,j-jfiltsu+1)*champ(i,j,l) 324 ENDDO 325 ENDDO 326 ENDDO 327 ENDDO 249 328 #endif 250 329 #endif 251 330 ELSE 252 331 #ifdef CRAY 332 DO l = 1, nbniv 333 DO j = jdfil(hemisph),jffil(hemisph) 253 334 CALL MXVA( matricevs(1,1,j-jfiltsv+1), 1, iim, champ(1,j,l),1 , 254 335 * eignq, 1, iim, iim ) 255 #else 256 #ifdef BLAS 336 ENDDO 337 ENDDO 338 #else 339 #ifdef BLAS 340 DO l = 1, nbniv 341 DO j = jdfil(hemisph),jffil(hemisph) 257 342 CALL SGEMV("N", iim,iim, 1.0, matricevs(1,1,j-jfiltsv+1),iim, 258 343 . champ(1,j,l), 1, 0.0, eignq, 1) 259 #else 260 DO k = 1, iim 261 eignq(k) = 0.0 262 ENDDO 263 DO i = 1, iim 264 DO k = 1, iim 265 eignq(k) = eignq(k) + matricevs(k,i,j-jfiltsv+1)*champ(i,j,l) 266 ENDDO 267 ENDDO 344 ENDDO 345 ENDDO 346 #else 347 DO l = 1, nbniv 348 DO j = jdfil(hemisph),jffil(hemisph) 349 DO k = 1, iim 350 c eignq(k) = 0.0 351 eignq(k,j,l) = 0.0 352 ENDDO 353 DO i = 1, iim 354 DO k = 1, iim 355 c eignq(k) = eignq(k) + matricevs(k,i,j-jfiltsv+1)*champ(i,j,l) 356 eignq(k,j,l) = eignq(k,j,l) + 357 .matricevs(k,i,j-jfiltsv+1)*champ(i,j,l) 358 ENDDO 359 ENDDO 360 ENDDO 361 ENDDO 268 362 #endif 269 363 #endif … … 273 367 c 274 368 IF( ifiltre.EQ. 2 ) THEN 369 DO l = 1, nbniv 370 DO j = jdfil(hemisph),jffil(hemisph) 275 371 DO 15 i = 1, iim 276 champ( i,j,l ) = ( champ(i,j,l) + eignq(i) ) * sdd2(i) 372 c champ( i,j,l ) = ( champ(i,j,l) + eignq(i) ) * sdd2(i) 373 champ( i,j,l ) = ( champ(i,j,l) + eignq(i,j,l) ) * sdd2(i) 277 374 15 CONTINUE 375 ENDDO 376 ENDDO 278 377 ELSE 378 DO l = 1, nbniv 379 DO j = jdfil(hemisph),jffil(hemisph) 279 380 DO 16 i=1,iim 280 champ( i,j,l ) = ( champ(i,j,l) - eignq(i) ) * sdd2(i) 381 c champ( i,j,l ) = ( champ(i,j,l) - eignq(i) ) * sdd2(i) 382 champ( i,j,l ) = ( champ(i,j,l) - eignq(i,j,l) ) * sdd2(i) 281 383 16 CONTINUE 384 ENDDO 385 ENDDO 282 386 ENDIF 283 387 c 388 DO l = 1, nbniv 389 DO j = jdfil(hemisph),jffil(hemisph) 284 390 champ( iip1,j,l ) = champ( 1,j,l ) 285 c 286 30 CONTINUE 287 c 288 50 CONTINUE 391 ENDDO 392 ENDDO 393 c 394 c 30 CONTINUE 395 c 396 c 50 CONTINUE 289 397 c 290 398 100 CONTINUE
Note: See TracChangeset
for help on using the changeset viewer.