array2sampled/std array2sampled/std#
Description#
array2sampled transform: sample a gridded model field at observation locations.
Converts a model output array of shape (time, lev, lat, lon) to a
sparse observation-indexed DataFrame by extracting the model value at
each observation’s (i, j, level, tstep) index.
Forward: grid array → sparse simulated observations. Adjoint: scatter observation-space sensitivities back onto the grid
(atomic add via
np.add.at).
This transform is typically placed between loadfromoutputs and
toobsvect when the model provides gridded output fields.
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:
Optional arguments#
- parameter : str, optional
Parameter name on which the transform works on
- component : str, optional
Component name on which the transform works on
- 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: array2sampled
4 version: std
5 type: transform
6
7 # Optional arguments
8 parameter: XXXXX # str
9 component: XXXXX # str
10 orig_parameter_plg: XXXXX # Plugin
11 orig_component_plg: XXXXX # Plugin
12 successor: XXXXX # str
13 precursor: XXXXX # str
See also