! Copyright (C) GFD Dennou Club, 2000.  All rights reserved.

! 入出力範囲指定を全次元について一括取得
! あらかじめ inquire(var, alldims) して配列を確保しなければならない。
!
subroutine GTVarGetSliceAll(var, start, count, stride)
    use gtdata_types, only: GT_VARIABLE
    use gtdata_generic, only: GTVarGetSlice
    type(GT_VARIABLE), intent(in):: var
    integer, intent(out):: start(:), count(:), stride(:)
    integer:: nd, i
    nd = min(size(start), size(count), size(stride))
    do, i = 1, nd
        call GTVarGetSlice(var, i, start(i), count(i), stride(i))
    enddo
end subroutine

