Loading...
Searching...
No Matches
gtvargetsliceall.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine gtvargetsliceall (var, start, count, stride)

Function/Subroutine Documentation

◆ gtvargetsliceall()

subroutine gtvargetsliceall ( type(gt_variable), intent(in) var,
integer, dimension(:), intent(out), optional start,
integer, dimension(:), intent(out), optional count,
integer, dimension(:), intent(out), optional stride )

Definition at line 15 of file gtvargetsliceall.f90.

16 !
17 !== 変数入出力範囲限定情報を取得 (全ての次元の情報を一括取得)
18 !
19 ! 変数 *var* に関して、
20 ! Slice によって設定された入出力範囲の情報を取得します。
21 ! 全次元の入出力範囲について一括取得するため、
22 ! あらかじめ Inquire(var, alldims) して次元の数を確保
23 ! しなければなりません。
24 !
25 ! *start*, *count*, *stride* に関しては Slice を参照してください。
26 !
27 ! *Get_Slice* は 2 つのサブルーチンの総称名であり、
28 ! 他にもある1つの次元に関して情報を取得する
29 ! 方法もあります。下記のサブルーチンを参照ください。
30 !
31 use gtdata_types, only: gt_variable
32 use gtdata_generic, only: gtvargetslice
33 implicit none
34 type(GT_VARIABLE), intent(in):: var
35 integer, intent(out), optional:: start(:), count(:), stride(:)
36 integer:: nd, i
37 logical:: all
38 nd = huge(1)
39 all = present(start) .and. present(count) .and. present(stride)
40 if (present(start)) nd = min(nd, size(start))
41 if (present(count)) nd = min(nd, size(count))
42 if (present(stride)) nd = min(nd, size(stride))
43 do, i = 1, nd
44 if (all) then
45 call gtvargetslice(var, i, start(i), count(i), stride(i))
46 cycle
47 endif
48 if (present(start)) call gtvargetslice(var, i, start=start(i))
49 if (present(count)) call gtvargetslice(var, i, count=count(i))
50 if (present(stride)) call gtvargetslice(var, i, stride=stride(i))
51 enddo
subroutine gtvargetslice(var, dimord, start, count, stride, count_compact)

References gtvargetslice().

Here is the call graph for this function: