Main Content

matlab.io.hdfeos.gd.defVrtRegion

Namespace: matlab.io.hdfeos.gd

Define vertical subset region

Syntax

out_RID = defVrtRegion(gridID,regionID,vobj,vRange)

Description

out_RID = defVrtRegion(gridID,regionID,vobj,vRange) defines a vertical subset region and can be used on either a monotonic field or contiguous elements of a dimension.

regionID should be 'noprevsub' if no prior subsetting has occurred. Otherwise it should be a value as returned from a previous subsetting routine.

vobj is the name of either the dimension or field to subset. If vobj is a dimension, it should be prefixed with 'DIM:'.

vRange is the minimum and maximum range for the vertical subset.

This function corresponds to the GDdefvrtregion function in the HDF-EOS library C API.

Examples

import matlab.io.hdfeos.*
gfid = gd.open('grid.hdf');
gridID = gd.attach(gfid,'PolarGrid');
range = [333 667];
regionID = gd.defVrtRegion(gridID,'noprevsub','Height',range);
data = gd.extractRegion(gridID,regionID,'pressure');
gd.detach(gridID);
gd.close(gfid);
import matlab.io.hdfeos.*
gfid = gd.open('grid.hdf');
gridID = gd.attach(gfid,'PolarGrid');
range = [3 5];
regionID = gd.defVrtRegion(gridID,'noprevsub','DIM:Height',range);
data = gd.extractRegion(gridID,regionID,'pressure');
gd.detach(gridID);
gd.close(gfid);