/[lmdze]/trunk/filtrez/filtreg_v.f
ViewVC logotype

Annotation of /trunk/filtrez/filtreg_v.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
Original Path: trunk/Sources/filtrez/filtreg_v.f
File size: 1219 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 137 module filtreg_v_m
2    
3     IMPLICIT NONE
4    
5     contains
6    
7     SUBROUTINE filtreg_v(champ, intensive)
8    
9     ! From filtrez/filtreg.F, version 1.1.1.1, 2004/05/19 12:53:09
10     ! Author: P. Le Van
11    
12 guez 138 ! Matrix filter on longitudes. Matrices have already been
13     ! computed. On v grid, direct filter only.
14 guez 137
15     USE dimens_m, ONLY: iim, jjm
16     use filtreg_hemisph_m, only: filtreg_hemisph
17 guez 140 USE inifgn_m, ONLY: sddu, unsddu
18 guez 137 use inifilr_m, only: jfiltnv, jfiltsv, matricevn, matricevs
19     use nr_util, only: assert
20    
21     REAL, intent(inout):: champ(:, :, :) ! (iim + 1, jjm, :)
22     ! en entr\'ee : champ \`a filtrer, en sortie : champ filtr\'e
23    
24     logical, intent(in):: intensive
25 guez 138 ! false means the field is weighted by the area of the mesh
26 guez 137
27     ! Local:
28 guez 141 REAL sdd(iim)
29 guez 137
30     !-----------------------------------------------------------
31    
32     call assert(size(champ, 1) == iim + 1, "filtreg_v iim + 1")
33     call assert(size(champ, 2) == jjm, "filtreg_v jjm")
34    
35     IF (intensive) THEN
36 guez 141 sdd = sddu
37 guez 137 ELSE
38 guez 141 sdd = unsddu
39 guez 137 END IF
40    
41 guez 141 call filtreg_hemisph(champ(:, :jfiltnv, :), sdd, matricevn)
42     call filtreg_hemisph(champ(:, jfiltsv:jjm, :), sdd, matricevs)
43 guez 137
44     END SUBROUTINE filtreg_v
45    
46     end module filtreg_v_m

  ViewVC Help
Powered by ViewVC 1.1.21