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

Contents of /trunk/Sources/filtrez/filtreg_scal.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137 - (show annotations)
Wed May 6 15:51:03 2015 UTC (9 years ago) by guez
File size: 1620 byte(s)
Removed unused argument missval in ma_fucoll_r[1-3]1, ma_fufill_r[1-3]1.

Split filtreg into two procedures: filtreg_scal and filtreg_v. I did
not like the test on the extent of the argument and there was no
common code between the two cases: jjm and jjm + 1. Also, it is
simpler now to just remove the argument "direct" from filtreg_v instead
of allowing it and then stopping the program if it is false.

Removed the computation of pkf in reanalyse2nat, was not used.

As a consequence of the split of filtreg, had to extract the
computation of pkf out of exner_hyb. This is clearer anyway because we
want to be able to call exner_hyb with any size in the first two
dimensions (as in test_disvert). But at the same time exner_hyb
required particular sizes for the computation of pkf. It was
awkward. The only computation of pkf is now in leapfrog.

1 module filtreg_scal_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE filtreg_scal(champ, direct, intensive)
8
9 ! From filtrez/filtreg.F, version 1.1.1.1, 2004/05/19 12:53:09
10 ! Author: P. Le Van
11 ! Objet : filtre matriciel longitudinal, avec les matrices pr\'ecalcul\'ees
12 ! pour l'op\'erateur filtre.
13
14 USE coefils, ONLY: sddv, unsddv
15 USE dimens_m, ONLY: iim, jjm
16 use filtreg_hemisph_m, only: filtreg_hemisph
17 use inifilr_m, only: jfiltnu, jfiltsu, matriceun, matriceus, matrinvn, &
18 matrinvs
19 use nr_util, only: assert
20
21 REAL, intent(inout):: champ(:, :, :) ! (iim + 1, jjm + 1, :)
22 ! en entr\'ee : champ \`a filtrer, en sortie : champ filtr\'e
23
24 logical, intent(in):: direct ! filtre direct ou inverse
25
26 logical, intent(in):: intensive
27 ! champ intensif ou extensif (pond\'er\'e par les aires)
28
29 ! Local:
30 REAL sdd1(iim), sdd2(iim)
31
32 !-----------------------------------------------------------
33
34 call assert(size(champ, 1) == iim + 1, "filtreg_scal iim + 1")
35 call assert(size(champ, 2) == jjm + 1, "filtreg_scal jjm + 1")
36
37 IF (intensive) THEN
38 sdd1 = sddv
39 sdd2 = unsddv
40 ELSE
41 sdd1 = unsddv
42 sdd2 = sddv
43 END IF
44
45 if (direct) then
46 call filtreg_hemisph(champ(:, 2:jfiltnu, :), sdd1, sdd2, matriceun)
47 call filtreg_hemisph(champ(:, jfiltsu:jjm, :), sdd1, sdd2, matriceus)
48 else
49 call filtreg_hemisph(champ(:, 2:jfiltnu, :), sdd1, sdd2, - matrinvn)
50 call filtreg_hemisph(champ(:, jfiltsu:jjm, :), sdd1, sdd2, - matrinvs)
51 end if
52
53 END SUBROUTINE filtreg_scal
54
55 end module filtreg_scal_m

  ViewVC Help
Powered by ViewVC 1.1.21