| Path: | src/gtvargetsliceall.f90 |
| Last Update: | Wed Jul 20 18:22:24 JST 2005 |
Copyright (C) GFD Dennou Club, 2000. All rights reserved.
| var : | type(GT_VARIABLE), intent(in) |
| start(:) : | integer, intent(out), optional |
| count(:) : | integer, intent(out), optional |
| stride(:) : | integer, intent(out), optional |
入出力範囲指定を全次元について一括取得 あらかじめ inquire(var, alldims) して配列を確保しなければならない。
subroutine GTVarGetSliceAll(var, start, count, stride)
implicit none
type(GT_VARIABLE), intent(in):: var
integer, intent(out), optional:: start(:), count(:), stride(:)
integer:: nd, i
logical:: all
nd = HUGE(1)
all = present(start) .and. present(count) .and. present(stride)
if (present(start)) nd = min(nd, size(start))
if (present(count)) nd = min(nd, size(count))
if (present(stride)) nd = min(nd, size(stride))
do, i = 1, nd
if (all) then
call GTVarGetSlice(var, i, start(i), count(i), stride(i))
cycle
endif
if (present(start)) call GTVarGetSlice(var, i, start=start(i))
if (present(count)) call GTVarGetSlice(var, i, count=count(i))
if (present(stride)) call GTVarGetSlice(var, i, stride=stride(i))
enddo
end subroutine