oceanspy.subsample.cutout(od, varList=None, YRange=None, XRange=None, add_Hbdr=False, mask_outside=False, ZRange=None, add_Vbdr=False, timeRange=None, timeFreq=None, sampMethod='snapshot', dropAxes=False, transformation=False, centered='Atlantic')[source]

Cutout the original dataset in space and time preserving the original grid structure.

od: OceanDataset

oceandataset to subsample

varList: 1D array_like, str, or None

List of variables (strings).

YRange: 1D array_like, scalar, or None

Y axis limits (e.g., latitudes). If len(YRange)>2, max and min values are used.

XRange: 1D array_like, scalar, or None

X axis limits (e.g., longitudes). If len(XRange)>2, max and min values are used.

add_Hbdr: bool, scal

If scalar, add and subtract add_Hbdr to the the horizontal range. of the horizontal ranges. If True, automatically estimate add_Hbdr. If False, add_Hbdr is set to zero.

mask_outside: bool

If True, set all values in areas outside specified (Y,X)ranges to NaNs. (Useful for curvilinear grids).

ZRange: 1D array_like, scalar, or None

Z axis limits. If len(ZRange)>2, max and min values are used.

add_Vbdr: bool, scal

If scalar, add and subtract add_Vbdr to the the vertical range. If True, automatically estimate add_Vbdr. If False, add_Vbdr is set to zero.

timeRange: 1D array_like, numpy.ScalarType, or None

time axis limits. If len(timeRange)>2, max and min values are used.

timeFreq: str or None

Time frequency. Available optionts are pandas Offset Aliases (e.g., ‘6H’): http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases

sampMethod: {‘snapshot’, ‘mean’}

Downsampling method (only if timeFreq is not None).

dropAxes: 1D array_like, str, or bool

List of axes to remove from Grid object. if one point only is in the range. If True, set dropAxes=od.grid_coords. If False, preserve original grid.

transformation: str, or bool

Lists the transformation of the llcgrid into a new one in which face is no longer a dimension. Default is False. If True, need to define how data will be centered

centered: str, or bool

default is Atlantic, and other options is Pacific. This refers to which ocean appears centered on the data.

od: OceanDataset

Subsampled oceandataset


If any of the horizontal ranges is not None, the horizontal dimensions of the cutout will have len(Xp1)>len(X) and len(Yp1)>len(Y) even if the original oceandataset had len(Xp1)==len(X) or len(Yp1)==len(Y).