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#
- parameter : str, mandatory
Tracer of the input to be clipped or cropped
- component : str, mandatory
Component of the input to be clipped or cropped
- mode : “clip” or “crop”, mandatory
Clip/crop mode to apply
- xmin : float, mandatory
West longitude of the rectangle to clip/crop
- xmax : float, mandatory
East longitude of the rectangle to clip/crop
- ymin : float, mandatory
South latitude of the rectangle to clip/crop
- ymax : float, mandatory
North latitude of the rectangle to clip/crop
Optional arguments#
- orig_parameter_plg : Plugin, optional
Plugin object on which the transform works on
- orig_component_plg : Plugin, optional
Corresponding component object on which the transform works on
- successor : str, optional
Name of the successor transform
- precursor : str, optional
Name of the precursor transform
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 parameter: XXXXX # str
9 component: XXXXX # str
10 mode: XXXXX # clip|crop
11 xmin: XXXXX # float
12 xmax: XXXXX # float
13 ymin: XXXXX # float
14 ymax: XXXXX # float
15
16 # Optional arguments
17 orig_parameter_plg: XXXXX # Plugin
18 orig_component_plg: XXXXX # Plugin
19 successor: XXXXX # str
20 precursor: XXXXX # str