Interpolate 2D evenly spaced points, taking into account the borders
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension( bfin%lb1: bfin%ub1, bfin%lb2: bfin%ub2) | :: | tabfin |
tableau de départ fin |
|
type(tborne), | intent(in) | :: | bfin |
indices des tableaux |
||
real(kind=R8), | intent(out), | dimension(bgros%lb1:bgros%ub1, bgros%lb2:bgros%ub2) | :: | tabgros |
tableau grossier résultant |
|
type(tborne), | intent(in) | :: | bgros |
indices des tableaux |
||
integer(kind=I4), | intent(in) | :: | ordre |
ordre de l’interpolation |
subroutine restrict2D(tabfin, bfin, tabgros, bgros, ordre) !! Interpolate 2D evenly spaced points, taking into account the borders implicit none type(tborne), intent(in ) :: bfin, bgros !! *indices des tableaux* integer(kind=I4), intent(in ) :: ordre !! *ordre de l'interpolation* real(kind=R8), intent(in ), dimension( bfin%lb1: bfin%ub1, bfin%lb2: bfin%ub2) :: tabfin !! *tableau de départ fin* real(kind=R8), intent(out), dimension(bgros%lb1:bgros%ub1, bgros%lb2:bgros%ub2) :: tabgros !! *tableau grossier résultant* integer(kind=I4) :: ii, j real(kind=R8), dimension(bgros%lb1:bgros%ub1, bfin%lb2:2*bgros%ub2) :: tab_tmp do j = bfin%lb2, 2*bgros%ub2 call restrict1D( tabfin = tabfin(:,j), & ! lb_fin = bfin%lb1, & ! tabgros = tab_tmp(:,j), & ! lb_gros = bgros%lb1, & ! ub_gros = bgros%ub1, & ! ordre = ordre ) ! enddo do ii = bgros%lb1, bgros%ub1 call restrict1D( tabfin = tab_tmp(ii,:), & ! lb_fin = bfin%lb2, & ! tabgros = tabgros(ii,:), & ! lb_gros = bgros%lb2, & ! ub_gros = bgros%ub2, & ! ordre = ordre ) ! enddo return endsubroutine restrict2D