This returns a AryEdgesInfoT (see Section 2.3).
interface getAryEdgesInfo function getAryEdgesInfoDbl1d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 1 real(double), intent(in) :: ary(:) real(double), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoDbl1d function getAryEdgesInfoDbl2d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 2 real(double), intent(in) :: ary(:,:) real(double), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoDbl2d function getAryEdgesInfoDbl3d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 3 real(double), intent(in) :: ary(:,:,:) real(double), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoDbl3d function getAryEdgesInfoSgl1d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 1 real(single), intent(in) :: ary(:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! Start end function getAryEdgesInfoSgl1d function getAryEdgesInfoSgl2d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 2 real(single), intent(in) :: ary(:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoSgl2d function getAryEdgesInfoSgl3d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 3 real(single), intent(in) :: ary(:,:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoSgl3d function getAryEdgesInfoInt321d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 1 integer(int32), intent(in) :: ary(:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt321d function getAryEdgesInfoInt322d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 2 integer(int32), intent(in) :: ary(:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt322d function getAryEdgesInfoInt323d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 3 integer(int32), intent(in) :: ary(:,:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt323d function getAryEdgesInfoInt161d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 1 integer(int16), intent(in) :: ary(:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt161d function getAryEdgesInfoInt162d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 2 integer(int16), intent(in) :: ary(:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt162d function getAryEdgesInfoInt163d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 3 integer(int16), intent(in) :: ary(:,:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt163d function getAryEdgesInfoInt81d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 1 integer(int8), intent(in) :: ary(:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt81d function getAryEdgesInfoInt82d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 2 integer(int8), intent(in) :: ary(:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt82d function getAryEdgesInfoInt83d(ary, lEdge, uEdge, lboundIndex, style) result(aryEdgesInfo) integer, parameter :: rankArin = 3 integer(int8), intent(in) :: ary(:,:,:) real(single), intent(in), optional :: lEdge(rankArin), uEdge(rankArin) integer, intent(in), optional :: lboundIndex(rankArin) character(*), intent(in), optional :: style type(AryEdgesInfoT) :: aryEdgesInfo ! return end function getAryEdgesInfoInt83d end interface
Among the input arguments, lboundIndex is lbound(ary) (in the caller); or 1 if unspecified. If style=='wcs', then it is allowed neither lEdge nor uEdge are given (nb., if you for some reason choose to give one, please give the both); in that case lEdge is lboundIndex-0.5 and uEdge is accordingly defined. Otherwise lEdge and uEdge MUST be given.