--- trunk/Sources/filtrez/filtreg_v.f 2015/05/06 15:51:03 137 +++ trunk/Sources/filtrez/filtreg_v.f 2015/06/09 14:32:46 143 @@ -9,13 +9,12 @@ ! From filtrez/filtreg.F, version 1.1.1.1, 2004/05/19 12:53:09 ! Author: P. Le Van - ! Filtre matriciel longitudinal, avec les matrices - ! pr\'ecalcul\'ees pour l'op\'erateur filtre. On v grid, direct - ! only. + ! Matrix filter on longitudes. Matrices have already been + ! computed. On v grid, direct filter only. - USE coefils, ONLY: sddu, unsddu USE dimens_m, ONLY: iim, jjm use filtreg_hemisph_m, only: filtreg_hemisph + USE inifgn_m, ONLY: sddu, unsddu use inifilr_m, only: jfiltnv, jfiltsv, matricevn, matricevs use nr_util, only: assert @@ -23,26 +22,20 @@ ! en entr\'ee : champ \`a filtrer, en sortie : champ filtr\'e logical, intent(in):: intensive - ! champ intensif ou extensif (pond\'er\'e par les aires) + ! false means the field is weighted by the area of the mesh ! Local: - REAL sdd1(iim), sdd2(iim) + REAL sdd(iim) !----------------------------------------------------------- call assert(size(champ, 1) == iim + 1, "filtreg_v iim + 1") call assert(size(champ, 2) == jjm, "filtreg_v jjm") - IF (intensive) THEN - sdd1 = sddu - sdd2 = unsddu - ELSE - sdd1 = unsddu - sdd2 = sddu - END IF + sdd = merge(sddu, unsddu, intensive) - call filtreg_hemisph(champ(:, :jfiltnv, :), sdd1, sdd2, matricevn) - call filtreg_hemisph(champ(:, jfiltsv:jjm, :), sdd1, sdd2, matricevs) + call filtreg_hemisph(champ(:, :jfiltnv, :), sdd, matricevn) + call filtreg_hemisph(champ(:, jfiltsv:jjm, :), sdd, matricevs) END SUBROUTINE filtreg_v