Clip & crop (clipcrop / std)

Description

The transform clipcrop clips or crops a dataset given a rectangle area.

Cropping means setting all values to 0, except inside the area of interest. Clipping is the opposite, keeping all values the same, except the ones in the area of interest.

Pixels matching the area of interest are pixels for which the center coordinates are inside the area to clip/crop. The borders of each grid cells are not accounted for.

Yaml arguments

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Mandatory arguments

component: (mandatory)

Component of the input to be clipped or cropped

accepted type: <class ‘str’>

parameter: (mandatory)

Tracer of the input to be clipped or cropped

accepted type: <class ‘str’>

mode: (mandatory)

Clip/crop mode to apply

accepted values: [‘clip’, ‘crop’]

xmin: (mandatory)

West longitude of the rectangle to clip/crop

accepted type: <class ‘float’>

xmax: (mandatory)

East longitude of the rectangle to clip/crop

accepted type: <class ‘float’>

ymin: (mandatory)

South latitude of the rectangle to clip/crop

accepted type: <class ‘float’>

ymax: (mandatory)

North latitude of the rectangle to clip/crop

accepted type: <class ‘float’>

Yaml template

Please find below a template for a Yaml configuration:

 1transform:
 2  plugin:
 3    name: clipcrop
 4    version: std
 5    type: transform
 6
 7  # Mandatory arguments
 8  component: XXXXX
 9  parameter: XXXXX
10  mode: XXXXX
11  xmin: XXXXX
12  xmax: XXXXX
13  ymin: XXXXX
14  ymax: XXXXX