gridfile.loadInternal

Load requested data from pre-built dataSource objects


Syntax



Description

[X, meta] = obj.loadInternal(userDimOrder, loadIndices, s, dataSources)

Returns a loaded output array and associated metadata given load parameters and pre-built dataSource objects.

= obj.loadInternal(…, precision)

Specify whether the loaded array should be single or double precision. If unspecified, uses a double array when either 1. Requested data is not in any data source, or 2. Requested data includes double, (u)int32, or (u)int64 data types. Uses a single array if all requested data is a of single, char, logical, (u)int8, or (u)int16 data types.


Input Arguments

userDimOrder

vector, linear indices [nUserDims]
The locations of the user-requested output dimensions in the full set of gridfile dimensions.

loadIndices

cell vector [nGridDims] {vector, linear indices}
The elements along each gridfile dimension that are required to implement the load operation. Includes all gridfile dimensions in the gridfile’s dimension order.

s

vector, linear indices [nSource]
The indices of data sources that are required in order to load the requested data.

dataSources

cell vector [nSource] {scalar dataSource object}
dataSource objects for the data sources at the specified indices.

precision

[] | ‘single’ | ‘double
Indicates the required numeric precision of the loaded data. If ‘single’ or ‘double’, uses the specified type. If unset or an empty array, uses double unless all requested data has a single, char, logical, (u)int8, or (u)int16 data type.

Output Arguments

X

double array | single array
The loaded data array

meta

scalar gridMetadata object
Metadata for the loaded array.