/[lmdze]/trunk/Sources/filtrez/filtreg_hemisph.f
ViewVC logotype

Annotation of /trunk/Sources/filtrez/filtreg_hemisph.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 141 - (hide annotations)
Fri Jun 5 19:21:08 2015 UTC (8 years, 11 months ago) by guez
File size: 766 byte(s)
Procedure filtreg_hemisph is always called with sdd2 = 1 / sdd1. It
would not make sense otherwise. I do not like that this does not
appear explicitly in filtreg_hemisph. So replaced the two arguments
sdd1 and sdd2 by a single argument sdd. The cost is computing a
division instead of multplication for every 3-dimensional
position. Besides, this changes the results.

1 guez 136 module filtreg_hemisph_m
2    
3     implicit none
4    
5     contains
6    
7 guez 141 subroutine filtreg_hemisph(champ, sdd, matri)
8 guez 136
9     USE dimens_m, ONLY: iim
10    
11     REAL, intent(inout):: champ(:, :, :) ! (iim + 1, :, :)
12 guez 141 REAL, intent(in):: sdd(:) ! (iim)
13 guez 136 real, intent(in), dimension(:, :, :):: matri ! (iim, iim, :)
14    
15     ! Local:
16     integer l, j
17    
18     !-----------------------------------------------------------------
19    
20     DO l = 1, size(champ, 3)
21     DO j = 1, size(champ, 2)
22 guez 141 champ(:iim, j, l) = champ(:iim, j, l) * sdd
23 guez 136 champ(:iim, j, l) = (champ(:iim, j, l) &
24 guez 141 + matmul(matri(:, :, j), champ(:iim, j, l))) / sdd
25 guez 136 champ(iim + 1, j, l) = champ(1, j, l)
26     END DO
27     END DO
28    
29     end subroutine filtreg_hemisph
30    
31     end module filtreg_hemisph_m

  ViewVC Help
Powered by ViewVC 1.1.21