swirlspy.qpf package
Submodules
swirlspy.qpf.persistence module
- swirlspy.qpf.persistence.persistence(xr2d, timesteps, timesteps_size)
Forecast by persistence, accepting an observation xarray and returning a forecast xarray. Persistence means that the forecast is exactly same as the observation. While it sounds trivial, this is usefulf for benchmarking the performance of another QPF algorithm.
- Parameters
xr2d (xarray.DataArray (2-dimensional, in 'x' 'y')) – The xarray containing data to be forecast
timesteps (int) – Number of timesteps to be forecast
timesteps_size (int) – Time interval between each steps, in minutes.
- Returns
persistence_xrnd – Data values in ‘xr2d’ being copied along the ‘end_time’ axis, coordinates of ‘end_time’ axis have a unique value for each timestep.
- Return type
xarray.DataArray
swirlspy.qpf.rover module
swirlspy.qpf.sla module
- swirlspy.qpf.sla.sla(qpf_xarray, motion_u, motion_v, steps=6)
Calculates forecast reflectivity using Semi-Lagrangian Advection from horizontal and vertical motion fields.
- Parameters
qpf_xarray (xarray.DataArray) – Contains reflectivity data. First element of array corresponds to the geographic upper left corner.
motion_u (xarray.DataArray) – x component of motion field.
motion_v (xarray.DataArray) – y component of motion field.
- Returns
forecast – A xarray.DataArray populated with forecast reflectivity and metadata.
- Return type
xarray.DataArray