Generic subroutine for real or complex arrays that shift the center to the corners
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(in), | dimension(1:long, 1:larg) | :: | tab_in |
2D array to transform |
|
class(*), | intent(out), | dimension(1:long, 1:larg) | :: | tab_out |
transformed 2D array |
|
integer(kind=I4), | intent(in) | :: | long |
2D array length |
||
integer(kind=I4), | intent(in) | :: | larg |
2D array width |
subroutine trans_center2corner(tab_in, tab_out, long, larg) !! Generic subroutine for real or complex arrays that shift the center to the corners implicit none integer(kind=I4), intent(in ) :: long !! *2D array length* integer(kind=I4), intent(in ) :: larg !! *2D array width* class(*), intent(in ), dimension(1:long, 1:larg) :: tab_in !! *2D array to transform* class(*), intent(out), dimension(1:long, 1:larg) :: tab_out !! *transformed 2D array* select type(tab_in) type is( real(kind=R8) ) select type(tab_out) type is( real(kind=R8) ) call trans_center2corner_real(tab_in(1:long, 1:larg), tab_out(1:long, 1:larg), long = long, larg = larg) endselect type is( complex(kind=R8) ) select type(tab_out) type is( complex(kind=R8) ) call trans_center2corner_cmpl(tab_in(1:long, 1:larg), tab_out(1:long, 1:larg), long = long, larg = larg) endselect endselect return endsubroutine trans_center2corner