Routines (alphabetical) > Routines: H > HDF-EOS Routines > EOS_GD_EXTRACTREGION

# EOS_GD_EXTRACTREGION

This function reads data into the data buffer from a subsetted region as defined by EOS_GD_DEFBOXREGION.

## Examples

In this example, we extract data from the “Temperature” field from the region defined in EOS_GD_DEFBOXREGION. The size of the subsetted region for the field is given by the EOS_GD_REGIONINFO routine.

status = EOS_GD_EXTRACTREGION(EOS_GD_id, regionID, $

"Temperature", datbuf32)

## Syntax

Result = EOS_GD_EXTRACTREGION(gridID, regionID, fieldname, buffer)

## Return Value

Returns SUCCEED (0) if successful and FAIL (–1) otherwise.

## Arguments

### gridID

Grid id (long) returned by EOS_GD_CREATE or EOS_GD_ATTACH.

### regionID

Region or period id (long) returned by EOS_GD_DEFBOXREGION.

### fieldname

Field to subset (string).

### buffer

A named variable that will contain the data Buffer.

## Keywords

None

## Version History

5.2 | Introduced