gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
gtvargetsliceall.f90 File Reference

Get variable I/O range restriction information (bulk get for all dimensions). More...

Go to the source code of this file.

Functions/Subroutines

subroutine gtvargetsliceall (var, start, count, stride)

Detailed Description

Get variable I/O range restriction information (bulk get for all dimensions).

Author
Eizi TOYODA, Yasuhiro MORIKAWA

This subroutine is provided as gtdata_generic#Get_Slice through gtdata_generic.

Definition in file gtvargetsliceall.f90.

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 )

Get I/O range information for all dimensions

Gets I/O range information set by Slice for variable var. To bulk get I/O range for all dimensions, must first call Inquire(var, alldims) to allocate the number of dimensions.

See Slice for start, count, stride.

Get_Slice is a generic name for 2 subroutines; there is also a method to get information for a single dimension.

Parameters
[in]varVariable handle
[out]startStart array for each dimension (optional)
[out]countCount array for each dimension (optional)
[out]strideStride array for each dimension (optional)

Definition at line 57 of file gtvargetsliceall.f90.

58 use gtdata_types, only: gt_variable
60 implicit none
61 type(GT_VARIABLE), intent(in):: var
62 integer, intent(out), optional:: start(:), count(:), stride(:)
63 integer:: nd, i
64 logical:: all
65 nd = huge(1)
66 all = present(start) .and. present(count) .and. present(stride)
67 if (present(start)) nd = min(nd, size(start))
68 if (present(count)) nd = min(nd, size(count))
69 if (present(stride)) nd = min(nd, size(stride))
70 do, i = 1, nd
71 if (all) then
72 call gtvargetslice(var, i, start(i), count(i), stride(i))
73 cycle
74 endif
75 if (present(start)) call gtvargetslice(var, i, start=start(i))
76 if (present(count)) call gtvargetslice(var, i, count=count(i))
77 if (present(stride)) call gtvargetslice(var, i, stride=stride(i))
78 enddo
subroutine gtvargetslice(var, dimord, start, count, stride, count_compact)

References gtvargetslice().

Here is the call graph for this function: