1 SUBROUTINE da_apply_rf( be, vp, grid )
5 TYPE (be_type), INTENT(IN) :: be ! Background error structure.
6 TYPE (vp_type), INTENT(INOUT) :: vp ! working array
7 type (domain) , intent(inout) :: grid ! Dimensions and xpose buffers.
13 !-------------------------------------------------------------------------
16 call da_apply_rf_1v( be, vp%v1, grid, 1)
18 call da_apply_rf_1v( be, vp%v1(ims,jms,kms), grid, 1)
21 !-------------------------------------------------------------------------
24 call da_apply_rf_1v( be, vp%v2, grid, 2)
26 call da_apply_rf_1v( be, vp%v2(ims,jms,kms), grid, 2)
29 !-------------------------------------------------------------------------
32 call da_apply_rf_1v( be, vp%v3, grid, 3)
34 call da_apply_rf_1v( be, vp%v3(ims,jms,kms), grid, 3)
37 !-------------------------------------------------------------------------
40 call da_apply_rf_1v( be, vp%v4, grid, 4)
42 call da_apply_rf_1v( be, vp%v4(ims,jms,kms), grid, 4)
45 !-------------------------------------------------------------------------
46 !-------------------------------------------------------------------------
47 ! [2.0]: Perform 1D recursive filter in y-x direction:
48 !-------------------------------------------------------------------------
50 grid%xp%v1z(its:ite,jts:jte,1) = vp%v5(its:ite,jts:jte,1)
52 call da_transpose_z2x ( grid )
54 in=grid%xp%ipex-grid%xp%ipsx
55 jn=grid%xp%jpex-grid%xp%jpsx
57 if ( LBOUND(grid%xp%v1x,3) == 1 ) then
59 grid%xp%v1x(grid%xp%ipsx:grid%xp%ipex,grid%xp%jpsx:grid%xp%jpex,1),&
60 be%slipx(grid%xp%ipsx:grid%xp%ipex,grid%xp%jpsx:grid%xp%jpex),&
61 be%ndeg,be%be,be%nta,be%swidth,be%table)
64 call da_transpose_x2y ( grid )
66 in=grid%xp%ipey-grid%xp%ipsy
67 jn=grid%xp%jpey-grid%xp%jpsy
69 if ( LBOUND(grid%xp%v1y,3) == 1 ) then
71 grid%xp%v1y(grid%xp%ipsy:grid%xp%ipey,grid%xp%jpsy:grid%xp%jpey,1),&
72 be%sljpy(grid%xp%ipsy:grid%xp%ipey,grid%xp%jpsy:grid%xp%jpey),&
73 be%ndeg,be%be,be%nta,be%swidth,be%table)
76 call da_transpose_y2z ( grid )
78 vp%v5(its:ite,jts:jte,1)= grid%xp % v1z(its:ite,jts:jte,1)
80 !-------------------------------------------------------------------------
82 END SUBROUTINE da_apply_rf