API

Source code: https://bitbucket.org/kul-reseco/dineof/src.

For issues, bugs, proposals or remarks, visit the issue tracker.

———————————————————————————————————————
Date : April 2020
Copyright : © 2020 by Ann Crabbé
Acknowledgements : Based on DINEOF 4.0 (ULG Liege) by Alida Alvera-Azcárte and Alexander Barth.

This file is part of the EOF-based Time Series Reconstructor QGIS plugin package.

This program is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License (COPYING.txt). If not see www.gnu.org/licenses.
———————————————————————————————————————
class dineof.core.dineof.Dineof(data_path: str, output_folder: str, eof_max: int, krylov_max: int, mask_path: str = None, eof_min: int = 1, eof_max_it: int = 300, eof_it_stop: float = 0.001, lanczos: float = 1e-08, time_path: str = None, time_alpha: float = 0.01, time_it: int = 3, reconstruct_all: int = 1, save_eof_base: int = 0, normalize_input: int = 0, cv_seed: int = 243435, cv_clouds: str = None)[source]

Bases: object

EOF-based method to fill in missing data from geophysical fields, such as clouds in sea surface temperature.

Parameters:
  • data_path – path to netCDF data with gaps to be filled
  • output_folder – path to output folder where all results will be stored
  • eof_max – the max number of EOF modes to compute; only the optimal number of EOFs + 3 will be computed for robust optimum detection must be <= temporal size of data - 5; start high and adjust down for subsequent reconstructions; if the max number of modes have been used, the algorithm probably needs more information
  • krylov_max – the maximum size for the Krylov subspace; must be: >= eof_max + 5 and <= temporal size of data
  • mask_path – path to land-sea mask; netCDF format (optional) without mask, all points are considered as ocean
  • eof_min – the min number of EOF modes to computes; default = 1 (recommended)
  • eof_max_it – set the maximum iterations for each EOF calculation; default = 300; eof decomposition <-> truncated reconstruction and replacement of missing data; use large number and only increase if this number is reached for each EOF
  • eof_it_stop – stop EOF iterations once: rms(successive reconstruction) / std(existing data) < eof_it_stop
  • lanczos – threshold for Lanczos convergence; default = 1.e-8 (recommended)
  • time_path – path to time file; netCDF format; used for the diffusion of the covariance matrix specified as the relative increment in time between your individual images; example: [1,2,3,4,…] if all data is 1 day apart; [1,2,4,…] if day 3 is missing
  • time_alpha – sets strength of the filter; 0 to deactivate
  • time_it – number of iterations for the filter
  • reconstruct_all – 1: reconstruct all points; 0: reconstruct only missing data
  • save_eof_base – 1: save left and right EOFs; 0: not
  • normalize_input – 1: normalize the input matrix for multivariate case; 0: not
  • cv_seed – initialize random number generator, for selection of cross-validation points; repeating an experiment with the same seed will yield the exact same result while another seed will yield a slight variation
  • cv_clouds – path to cloud file; netCDF format; mask with manual selection of cross-validation points cv_seed will be ignored

For more information on how DINEOF works, please refer to:

Alvera-Azcárate, A., Barth, A., Rixen, M., Beckers, J.M., 2005, Reconstruction of incomplete oceanographic data sets using empirical orthogonal functions: application to the Adriatic Sea surface temperature, Ocean Modelling, 9-4, p. 325-346

Beckers, J.M., Rixen, M., 2003, EOF calculations and data filling from incomplete oceanographic data sets, Journal of Atmospheric and Oceanic Technology, 20-12, p. 1839-1856

The multivariate application of DINEOF is explained in:

Alvera-Azcárate, A., Barth, A., Beckers, J.M., Weisberg, R.H., 2007, Multivariate reconstruction of missing data in sea surface temperature, chlorophyll, and wind satellite fields, Journal of Geophysical Research. Oceans, 112-C3, p. C03008

The error calculation using an optimal interpolation approach is explained in:

Beckers, J.M., Barth, A., Alvera-Azcárate, A., 2006, DINEOF reconstruction of clouded images including error maps – application to the Sea-Surface Temperature around Corsican Island, Ocean Science, 2, 183–199

For more information about the Lanczos solver:

Toumazou, V., Cretaux, J.F., 2001, Using a Lanczos Eigensolver in the Computation of Empirical Orthogonal Functions, Monthly Weather Review, 129-5, p. 1243–1250

execute()[source]
write_init_file(path)[source]
Parameters:path – the path of the init file
Returns:Write the input variables as text string to path