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

subroutine GTVarSlice(var, dimord, start, count, stride)
    use gtdata_types, only: GT_VARIABLE
    use an_generic, only: slice
    use dc_error, only: GT_EFAKE, StoreError
    type(GT_VARIABLE), intent(inout):: var
    integer, intent(in):: dimord
    integer, intent(in), optional:: start
    integer, intent(in), optional:: count
    integer, intent(in), optional:: stride
    if (associated(var%an)) then
        call slice(var%an, dimord, start, count, stride)
    else
        call StoreError(GT_EFAKE, "GTVarSlice(unknown variable)")
    endif
end subroutine