| pktools 2.6.7 Processing Kernel for geospatial data

pkkalman

produce kalman filtered raster time series

## SYNOPSIS

`Usage: pkkalman -mod modelinput.tif -obs obsinput.tif [-direction [forward|backward|smooth]]* -ofw output_fc.tif -obw output_bw.tif -ofb output_fb.tif`

``

`Options[-tmod time]* [-tobs time]* [-modnodata value]* [-obsnodata value]* [-modmask mask.tif] [-obsmask mask.tif] [-msknodata value]* [-mskband] [-u_ofw uncert_fw.tif] [-u_obw uncert_bw.tif] [-u_ofb uncert_fb.tif]`

`Advanced options (see table)`

# Description

The utilty pkkalman will complement a time series of observations (option -obs) at fine spatial resolution. A data assimilation technique based on a Kalman filter is hereby used. The data at fine spatial resolution are assimilated with coarse spatial resolution time series at a finer temporal resolution, referred to as a model (option -mod). The time series for both observation and model can either be provided as multi-band raster datasets or as multiple single band datasets. Missing data in the observations are predicted by the algorithm. The model must cover at least the spatial coverage of the observation. The missing data must be provided either as nodata values in the input (using option -obsnodata) or as an external mask (using option -obsmask). The time sequence for the model and observation should be provided via the options -tmod and -tobs. Tuning parameters for the algorithm are process noise (option -q) and the weights for uncertainty of valid observations (-uo) and the model (-um).

# Options

- use either `-short` or `--long` options (both `--long=value` and `--long value` are supported)
- short option `-h` shows basic options only, long option `--help` shows all options

  short | long | type | default | description
  --- | --- | --- | --- | ---
  dir | direction | std::string | forward | direction to run model (forward|backward|smooth)
  mod | model | std::string |  | coarse spatial resolution input datasets(s) used as model. Use either multi-band input (-model multiband_model.tif) or multiple single-band inputs (-mod model1 -mod model2 etc.)
  modmask | modmask | std::string |  | model mask datasets(s). Must have same dimension as model input. Use either multi-band input or multiple single-band inputs
  obs | observation | std::string |  | fine spatial resolution input dataset(s) used as observation. Use either multi-band input (-obs multiband_obs.tif) or multiple single-band inputs (-obs obs1 -obs obs2 etc.)
  obsmask | obsmask | std::string |  | observation mask dataset(s). Must have same dimension as observation input (use multi-band input or multiple single-band inputs
  tmod | tmodel | int |  | time sequence of model input. Sequence must have exact same length as model input. Leave empty to have default sequence 0,1,2,etc.
  tobs | tobservation | int |  | time sequence of observation input. Sequence must have exact same length as observation input
  a_srs | a_srs | std::string |  | Override the projection for the output file (leave blank to copy from input file, use epsg:3035 to use European projection and force to European grid
  ofw | outputfw | std::string |  | Output raster dataset for forward model
  u_ofw | u_outputfw | std::string |  | Uncertainty output raster dataset for forward model
  obw | outputbw | std::string |  | Output raster dataset for backward model
  u_obw | u_outputbw | std::string |  | Uncertainty output raster dataset for backward model
  ofb | outputfb | std::string |  | Output raster dataset for smooth model
  u_ofb | u_outputfb | std::string |  | Uncertainty output raster dataset for smooth model
  modnodata | modnodata | double | 0 | invalid value for model input
  obsnodata | obsnodata | double | 0 | invalid value for observation input
  msknodata | msknodata | float | 0 | Mask value not to consider
  mskband | mskband | short | 0 | Mask band to read (0 indexed)
  obsmin | obsmin | double |  | Minimum value for observation data
  obsmax | obsmax | double |  | Maximum value for observation data
  eps | eps | double | 1e-05 | epsilon for non zero division
  um | uncertmodel | double | 1 | Uncertainty of the model
  uo | uncertobs | double | 1 | Uncertainty of valid observations
  unodata | uncertnodata | double | 100 | Uncertainty in case of no-data values in observation
  q | q | double | 1 | Process noise: expresses instability (variance) of proportions of fine res pixels within a moderate resolution pixel
  down | down | int |  | Downsampling factor for reading model data to calculate regression (default is ratio between coarse (model) and fine (obs) resolution raster datasets)
  ot | otype | std::string |  | Data type for output image ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). Empty string: inherit type from input image
  of | oformat | std::string | GTiff | Output image format (see also gdal_translate).
  co | co | std::string |  | Creation option for output file. Multiple options can be specified.
  v | verbose | short | 0 | verbose mode when positive

# Examples

Some examples how to use pkcrop can be found here