stateVector.parseGrids
Parse inputs that are either gridfile objects or .grid file paths
Syntax
Description
Parses gridfile inputs for a specified number of variables. If inputs are strings, returns the unique set of gridfile objects. If inputs are gridfile objects, updates the objects and returns them directly.
gridfile inputs may either be a scalar or a vector with one element per specified variable. Regardless of input type, the output parsed grids include “whichGrid” indices that specify which gridfile object should be used for each listed variable.
If any gridfile fails to build or update, records the failed gridfile and exits.
Customize header in thrown error IDs.
Input Arguments
grids
nVariables
header
Output Arguments
grids
.gridfiles (gridfile vector [nGrids]): The gridfile objects
.whichGrid (vector, linear indices [nVariables]): The index of the gridfile object for each variable. Indices are on the interval 1:nGrids