ensembleMetadata.getLatLon
Return latitude-longitude coordinates for a variable
Syntax
Description
Obtains latitude-longitude coordinates at the specified rows of avariable in a state vector. Extracts coordinates from either the lat and lon dimensions, or from the site dimension. If the variable is missing the required dimensions, returns NaN coordinates. Also returns NaN coordinates if the variable implements a mean over the dimensions. Expects the lat/lon coordinate metadata for each row to either be a numeric scalar, string scalar, or char row vector. Returns NaN coordinates if the metadata does not follow this format. If the coordinate metadata is string or char, converts the coordinate to a numeric format using the “str2double” function. If the coordinate cannot be converted, uses a NaN coordinate for the row.
Extracts coordinate metadata from the lat and lon dimensions.
Extracts coordinate metadata from the site dimension. Coordinates are extracted from the indicated columns of the metadata. If the site metadata is missing a column, returns NaN for that coordinate.