API¶
Source code: https://bitbucket.org/kulreseco/dineof/src.
For issues, bugs, proposals or remarks, visit the issue tracker.

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 = 1e08, 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
EOFbased 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 landsea 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.e8 (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 crossvalidation 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 crossvalidation points cv_seed will be ignored
For more information on how DINEOF works, please refer to:
AlveraAzcá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, 94, p. 325346
Beckers, J.M., Rixen, M., 2003, EOF calculations and data filling from incomplete oceanographic data sets, Journal of Atmospheric and Oceanic Technology, 2012, p. 18391856
The multivariate application of DINEOF is explained in:
AlveraAzcá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, 112C3, p. C03008
The error calculation using an optimal interpolation approach is explained in:
Beckers, J.M., Barth, A., AlveraAzcárate, A., 2006, DINEOF reconstruction of clouded images including error maps – application to the SeaSurface 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, 1295, p. 1243–1250