dash.stateVectorVariable.matchMetadata

Order reference indices so that ensemble metadata matches a ordering set


Syntax



Description

obj = obj.matchMetadata(d, metadata, grid)

Compares the variable’s metadata along the indexed dimension to an ordering set of metadata. Removes reference indices with metadata not in the ordering set. Reorders the remaining reference indices to match the order of the ordering set.

When this method finishes, the reference indices along the dimension point to metadata that exactly matches the ordering set.

Note: This method can only be called after the variable has been finalized.


Input Arguments

d

scalar dimension index
The index of an ensemble dimension

metadata

matrix
The ordering set of metadata. Reference indices will be updated so that metadata along the dimension exactly matches this set.

grid

scalar gridfile object
The gridfile object for the variable

Output Arguments

obj

scalar dash.*stateVectorVariable* object
The variable with updated reference indices and metadata