Skip to main content

All options

Every option of the parameter classes, in one place

Reference tables of every option of the NLSA Python toolkit’s parameter classes, grouped by calculation block, with types, allowed values, defaults and descriptions, generated from the source code of version 0.4.

This page collects the option tables of the calculation block pages. They are generated from the source code of version 0.4: option names, types, allowed values and defaults are those of the code, and every documented option has been checked to exist. required means that the option has no default.

Classes from the toolkit are imported as shown in each table’s caption. PredPars, TrainPars, TestPars and Pars are defined in each example script, and differ slightly between the scripts.

EXPERIMENT chooses the configuration to run. It is a member of the script’s Experiment enumeration, from which from_experiment() builds the parameters of the run (together with CONE_KERNEL and KERNEL_NORMALIZATION); see Experiments. The kernel analog forecasting script runs ELNINO_2027_FROM_ERA5_NINO34SST, the Koopman script ENSO_FROM_ERA5_IPSST.

Switches of the ENSO scripts: computing
Switch Type or values Value in the scripts Description
IDX_GPU int or Sequence[int] or None KAF: 0
Koopman: None
GPU to use: an index, a list of indices for several GPUs, or None to run on the CPU.
XLA_MEM_FRACTION str or None "0.95" Fraction of GPU memory that JAX may reserve at start-up (passed to initialize_jax).
JAX_CACHE_DIR str or None "jax_cache" Folder for JAX’s compilation cache (defined in the scripts but not passed to initialize_jax at present).
FP "f32" or "f64" "f32" Floating-point precision: "f32" (single, faster) or "f64" (double).
Switches of the ENSO scripts: kernel
Switch Type or values Value in the scripts Description
CONE_KERNEL bool KAF: True
Koopman: False
Use the cone kernel. It also switches on the velocity covariates in the experiment settings.
KERNEL_TUNING_GRAD_METHOD "explicit" or "automatic" KAF: "automatic"
Koopman: "explicit"
How the tuning curve is differentiated: "explicit" (a closed-form gradient for the exponential shape function) or "automatic" (JAX automatic differentiation).
KERNEL_NORMALIZATION "diffusion_maps" or "bistochastic" "diffusion_maps" "diffusion_maps" (uses DmKernelPars) or "bistochastic" (uses BsKernelPars).
Switches of the ENSO scripts: folders (each a string)
Switch Value in the scripts Description
OUTPUT_DATA_DIR "examples/enso/data" Folder, relative to where the script is run, under which results are saved and read.
ERA5_DAILY_DATA_DIR Koopman script: "/storage/data/era5/daily01" Folder with the daily ERA5 files. Defined in the Koopman script but not used by its current experiments, which are monthly.
ERA5_MONTHLY_DATA_DIR Koopman script: "/storage/data/era5/month_nc_1940_2025" Folder with the monthly ERA5 files.
Switches of the ENSO scripts: run modes (each "calc", "calcsave" or "read")
Switch Value in the scripts Step
EXTRACT_DATA_MODE "read" Reading and preparing the data.
TUNE_KERNEL_MODE KAF: "calc"
Koopman: "read"
Bandwidth tuning.
KERNEL_EIGEN_MODE KAF: "calc"
Koopman: "read"
The kernel eigendecomposition.
KERNEL_PROJECTION_MODE KAF: "calc"
Koopman: "calcsave"
Projecting a field onto the kernel eigenfunctions.
GENERATOR_MATRIX_MODE Koopman script: "calc" The generator matrix.
KOOPMAN_EIGEN_MODE Koopman script: "calc" The Koopman eigendecomposition.
KOOPMAN_PROJECTION_MODE Koopman script: "calcsave" Projecting a field onto the Koopman eigenfunctions.
KOOPMAN_EIG_EVAL_MODE Koopman script: "calc" Evaluating the selected Koopman eigenfunction.
KAF_EXPANSION_COEFFS_MODE "calc" The KAF expansion coefficients.
KAF_PREDS_MODE "calc" The forecasts.
SKILL_SCORES_MODE "calc" The skill scores.
Switches of the ENSO scripts: plots and printed tables
Switch Type or values Value in the scripts Description
PLOT_MODE "save" or "show" or "saveshow" or None "show" "show" (open windows), "save" (write PNG files), "saveshow" (both) or None (no plots).
WHICH_PLOTS set of plot names KAF: {"running_pred", "pred_timeseries", "skill_scores"}
Koopman: {"koopman_modes"}
Set of plots to make (see the plot list on the Skill and outputs page); {"all"} makes every plot.
MATPLOTLIB_BACKEND "Agg" or None None Matplotlib backend; set "Agg" on a server without a display.
DELAY_PLOT_MODE "backward" or "central" "central" Time stamp given to a delay window in plots: its centre ("central") or its last sample ("backward").
PLT_DATE_RANGE tuple[str, str] or None None Restrict time-series plots to this date range; None plots the whole period.
KERNEL_EIGS_PLT Sequence[int] or "interactive" or None "interactive" Kernel eigenfunctions to plot: a list of indices, "interactive" (ask at the prompt) or None.
KERNEL_MODES_PLT Sequence[int] or "interactive" or None "interactive" Kernel modes (spatial patterns) to plot, as above.
KOOPMAN_EIGS_PLT Sequence[int] or "interactive" or None Koopman script: "interactive" Koopman eigenfunctions to plot, as above.
KOOPMAN_MODES_PLT Sequence[int] or "interactive" or None Koopman script: "interactive" Koopman modes (spatial patterns) to plot, as above.
LEAD_TIMES_PLT Sequence[int] or "interactive" or None "interactive" Lead times for the running-forecast plot, as above.
INITIALIZATION_TIMES_PLT Sequence[int] or "interactive" or None "interactive" Initialization times for the forecast time-series plot, as above.
NUM_TABULATE int 40 Number of eigenvalues printed in the summary tables.
Time (nlsa_models.climate, defined in src/nlsa_models/climate.py)
Option Type or values Default Description
date_range tuple[str, str] required First and last date ("YYYY-MM-DD") of the data. For training data this is the training period, for test data the test period.
sampling "monthly" or "daily" required Time sampling: "monthly" or "daily".
rolling_window int or None None Length, in samples, of a running mean applied after the climatology is removed. None means no smoothing.
rolling_mode "forward" or "backward" or "center" "center" Alignment of the running-mean window: "center" (centred), "backward" (the current and previous samples) or "forward" (the current and following samples).
custom_climatology_date_range tuple[str, str] or None None Period used to compute the climatology and the standardization statistics. If None, date_range is used. Set it to the training period for both training and test data, so that test anomalies use the training climatology.
Climatology (nlsa_models.climate, defined in src/nlsa_models/climate.py)
Option Type or values Default Description
remove bool False Subtract the mean annual cycle (the average for each calendar month, or each day of the year for daily data) computed over the climatology period.
standardize bool False Rescale the data using statistics from the climatology period (see Standardization above).
Domain (nlsa_models.era5, defined in src/nlsa_models/era5.py)
Option Type or values Default Description
sampling "pointwise" or "coarsened" or "area_averaged" or "meridionally_averaged" or "zonally_averaged" required How grid points are used: "pointwise", "coarsened", "area_averaged", "meridionally_averaged" or "zonally_averaged" (see Spatial sampling).
min_lon float or None None Western edge of the domain, in degrees east (0–360).
max_lon float or None None Eastern edge of the domain, in degrees east (0–360).
min_lat float or None None Southern edge of the domain, in degrees north.
max_lat float or None None Northern edge of the domain, in degrees north.
step_lon int or None None Step in grid points along longitude: keep every step_lon-th point ("pointwise") or average blocks of step_lon points ("coarsened").
step_lat int or None None Step in grid points along latitude, as for step_lon.
IO (nlsa_models.era5, defined in src/nlsa_models/era5.py)
Option Type or values Default Description
input_path str or Path or None None Folder with the ERA5 files. All files with the chosen extension in the folder are opened together as one data set.
file_format "grib" or "nc" "nc" File format: "nc" (NetCDF) or "grib".
DataSpecs (nlsa_models.era5, defined in src/nlsa_models/era5.py)
Option Type or values Default Description
vars Sequence[Var] required ERA5 variables to read (see the variable table).
domain Domain required Spatial domain and spatial sampling, as an era5.Domain.
time Time required Period, time sampling and smoothing, as a climate.Time.
io IO required Location and format of the files, as an era5.IO.
climatology Climatology Climatology() Anomaly and standardization settings, as a climate.Climatology.
IO (nlsa_models.ws44, defined in src/nlsa_models/ws44.py)
Option Type or values Default Description
input_path str or Path or None None Folder with one <STATION>_dailystats.csv file per station.
file_format "csv" "csv" File format; only "csv" is supported.
DataSpecs (nlsa_models.ws44, defined in src/nlsa_models/ws44.py)
Option Type or values Default Description
vars Sequence[Var] required Station variables, as ws44.Var members (columns of the daily-statistics files).
stations Sequence[Station] required Stations, as ws44.Station members (ICAO codes). Each station adds its variables as columns of the predictor vector.
time Time required Period, time sampling and smoothing, as a climate.Time. Monthly sampling averages the daily values.
io IO required Location of the files, as a ws44.IO.
climatology Climatology Climatology() Anomaly and standardization settings, as a climate.Climatology.
HighLatIO (nlsa_models.ws44, defined in src/nlsa_models/ws44.py)
Option Type or values Default Description
input_path str or Path or None None Folder with one subfolder per station; all CSV files in a station’s subfolder are merged on their obs_date column.
file_format "csv" "csv" File format; only "csv" is supported.
HighLatDataSpecs (nlsa_models.ws44, defined in src/nlsa_models/ws44.py)
Option Type or values Default Description
vars Sequence[HighLatVar] required Variables, as ws44.HighLatVar members.
stations Sequence[HighLatStation] required Stations, as ws44.HighLatStation members (currently BGTL, Pituffik Space Base).
time Time required Period, time sampling and smoothing, as a climate.Time.
io HighLatIO required Location of the files, as a ws44.HighLatIO.
climatology Climatology Climatology() Anomaly and standardization settings, as a climate.Climatology.
Covariate (nlsa_models.climate, defined in src/nlsa_models/climate.py)
Option Type or values Default Description
specs sequence of era5.DataSpecs, ws44.DataSpecs or ws44.HighLatDataSpecs required One or more data specifications (ERA5 or station). Their columns are joined side by side into the predictor vector.
Response (nlsa_models.climate, defined in src/nlsa_models/climate.py)
Option Type or values Default Description
specs era5.DataSpecs (area-averaged), ws44.DataSpecs or ws44.HighLatDataSpecs required One data specification for the quantity to forecast: an ERA5 field with "area_averaged" sampling (for example the Niño 3.4 index) or a station variable.
DataPars (nlsa_models.lorenz63, defined in src/nlsa_models/lorenz63.py)
Option Type or values Default Description
covariate "x" or "y" or "z" or "xy" or "xyz" required Components of the Lorenz 63 state used as predictors: "x", "y", "z", "xy" or "xyz".
response "x" or "y" or "z" required Component to forecast: "x", "y" or "z".
dt float required Sampling interval, in model time units.
x0 tuple[float, float, float] required Initial condition of the simulated trajectory.
num_spinup int required Samples discarded at the start of the simulation, so that the trajectory is on the attractor.
num_samples int required Number of samples left after spin-up, delay embedding and finite differences (set directly here, unlike the climate pipeline where it follows from the dates).
num_half_delays int 0 As for the climate DataPars.
delay_embedding_mode "explicit" or "on_the_fly" "on_the_fly" As for the climate DataPars.
num_before int 0 As for the climate DataPars.
num_after int 0 As for the climate DataPars.
velocity_covariate bool False As for the climate DataPars.
velocity_fd_order 2 or 4 or 6 or 8 or None None As for the climate DataPars.
eval_batch_size int or None None As for the climate DataPars.
DataPars (nlsa_models.climate, defined in src/nlsa_models/climate.py)
Option Type or values Default Description
covariate Covariate required Predictors, as a climate.Covariate.
response Response required Forecast target, as a climate.Response.
num_half_delays int 0 Half-width h of the delay window. Each sample is represented by 2h + 1 consecutive snapshots (2h delays); 0 means no delay embedding.
delay_embedding_mode "explicit" or "on_the_fly" "on_the_fly" How delay vectors are formed: "on_the_fly" assembles each window when it is needed (low memory); "explicit" builds the matrix of all windows (Hankel matrix) once (more memory). In the climate pipeline this field is currently not read: the builder functions such as make_data_driven_l2_space take their own delay_embedding_mode argument, which defaults to "on_the_fly".
num_before int 0 Extra samples reserved before the first delay window. The Koopman generator needs fd_order // 2 of them for its finite differences.
num_after int 0 Extra samples reserved after the last sample, so that future values are available. For kernel analog forecasting it must be at least the number of prediction steps; the Koopman generator needs fd_order // 2 more.
velocity_covariate bool False Add the time tendency (a finite-difference velocity) to every snapshot. Required by the cone kernel.
velocity_fd_order 2 or 4 or 6 or 8 or None None Order (2, 4, 6 or 8) of the central finite difference used for the velocities. It also reserves that many samples, half at each end of the record.
eval_batch_size int or None None Evaluate functions on the samples in batches of this size, to reduce memory. None evaluates all samples at once.
ConePars (nlsa.jax.kernels, defined in src/nlsa/kernels.py)
Option Type or values Default Description
zeta float required Anisotropy ζ of the cone kernel, between 0 and 1. With ζ = 0 the cone distance reduces to the ordinary distance; as ζ approaches 1, displacements along the direction of motion count less. The examples use 0.99.
threshold float 1e-12 Small constant added inside the square root of the cone distance, so that automatic differentiation is stable when two points coincide.
TunePars (nlsa.jax.kernels, defined in src/nlsa/kernels.py)
Option Type or values Default Description
num_bandwidths int 128 Number of trial bandwidths, spaced evenly in log10.
log10_bandwidth_lims tuple[int, int] (-3, 3) Range of the trial bandwidths, as powers of ten: (-3, 3) scans 10⁻³ to 10³.
manifold_dim float or None None If None, choose the bandwidth at which the estimated dimension is largest. If a number, choose the bandwidth whose estimated dimension is closest to it.
bandwidth_scl float 1 Factor that multiplies the selected bandwidth. Values above 1 give a wider, smoother kernel.
bandwidth_batch_size int or None None Evaluate the trial bandwidths in batches of this size, to reduce memory.
DmKernelPars (nlsa.jax.kernels, defined in src/nlsa/kernels.py)
Option Type or values Default Description
normalization "laplace" or "fokkerplanck" or None required Diffusion-maps normalization: "laplace" (α = 1, removes the influence of the sampling density), "fokkerplanck" (α = ½), or None (use the kernel as it is).
eigensolver "eigh" or "eigsh" required "eigh": builds the full N × N matrix and computes all its eigenpairs (memory grows as N²). "eigsh": iterative solver (SciPy) that computes only num_eigs eigenpairs without storing the matrix; use it for large N.
num_eigs int required Number of eigenpairs kept. They form the data-driven basis used by the later blocks.
batch_size int or None None Build the kernel matrix in batches of this many columns ("eigh" only), to reduce peak memory.
BsKernelPars (nlsa.jax.kernels, defined in src/nlsa/kernels.py)
Option Type or values Default Description
eigensolver "svd" or "svds" required "svd": dense singular-value decomposition. "svds": iterative truncated decomposition that computes only num_eigs singular vectors.
num_eigs int required Number of eigenpairs kept.
batch_size int or None None Batch size for matrix products, to reduce peak memory.

Results:

TuneInfo (nlsa.jax.kernels, defined in src/nlsa/jax/kernels/_kernels.py)
Field Type Description
log10_bandwidths array The trial bandwidths (log10).
est_dims array Estimated dimension at each trial bandwidth (the tuning curve).
opt_bandwidth array Bandwidth selected by the tuning criterion.
opt_dim array Estimated dimension at the selected bandwidth.
i_opt array Index of the selected bandwidth among the trial bandwidths.
bandwidth array Bandwidth actually used: opt_bandwidth × bandwidth_scl.
dim array Estimated dimension at the bandwidth actually used.
vol array Estimated volume of the data manifold (used to normalize the bandwidth function).
kernel_vol array Normalization constant from the kernel integral (used with vol).
KernelEigen (nlsa.jax.kernels, defined in src/nlsa/jax/kernels/_kernels.py)
Field Type Description
evals array Kernel eigenvalues λ, in decreasing order. With a normalized kernel the first is 1 and belongs to the constant eigenfunction.
evecs array Kernel eigenvectors φ: the eigenfunctions evaluated on the training samples (one row per eigenfunction).
dual_evecs array Dual (left) eigenvectors, used to compute expansion coefficients by inner products.
weights array Sample weights that make the eigenvectors orthonormal (for diffusion maps, the invariant measure of the Markov kernel).
bandwidth array Bandwidth used, stored for converting λ to Laplace eigenvalues.
KoopmanParsDiff (nlsa.jax.koopman, defined in src/nlsa/koopman.py)
Option Type or values Default Description
fd_order 2 or 4 or 6 or 8 required Order (2, 4, 6 or 8) of the central finite differences used for time derivatives along the trajectory. Reserve fd_order // 2 samples before and after with num_before and num_after.
dt float required Time step. Recorded in the output folder name only: the finite differences use the sampling interval of the data (one sample in the climate pipeline, DataPars.dt for Lorenz 63). The ENSO example sets it to 1.
tau float required Strength τ of the diffusion regularization: the generator is replaced by V − τΔ, which damps rough eigenfunctions. The examples use 0.002 to 0.01.
antisym bool required Keep only the antisymmetric part (V − Vᵀ)/2 of the generator matrix, the structure the generator has for measure-preserving dynamics.
which_eigs_galerkin int or tuple[int, int] or list[int] required Kernel eigenfunctions spanning the Galerkin space (the constant one is added separately): an integer L means φ₁ … φ_L; a tuple (a, b) means φ_a … φ_b; a list gives the indices.
num_eigs int or None None Number of Koopman eigenpairs kept after sorting, including the constant eigenfunction. None keeps nearly all of them.
laplacian_method "log" or "lin" or "inv" "log" Formula for converting kernel eigenvalues λ into Laplace eigenvalues η: "log" η = −4 ln λ / ε², "lin" η = 4(1 − λ)/ε², "inv" η = (1/λ − 1) rescaled by a reference eigenvalue. In the current code the value only enters the output folder name: the regularization always uses "log".
sort_by "energy" or "frequency" "frequency" Order of the results: "energy" (smallest Dirichlet energy, i.e. smoothest, first) or "frequency" (smallest |frequency| first).
eval_tx_batch_size int or None None Batch size for evaluating the time derivatives on the samples (used by the Lorenz 63 scripts).
grad_batch_size int or None None Batch size for the directional derivatives of the basis functions.
gram_batch_size int or None None Batch size for the inner products that form the generator matrix.
KoopmanParsTransf (nlsa.jax.koopman, defined in src/nlsa/koopman.py)
Option Type or values Default Description
transform "laplace" or "gauss" required Integral transform of the Koopman evolution: "laplace" (weights \(e^{-zt}\), the resolvent) or "gauss" (weights \(e^{-(zt)^2}\)).
quadrature "trapezoidal" or "simpson" required Rule for the time integral: "trapezoidal" or "simpson" (Simpson needs an even num_quad).
num_quad int required Number of quadrature intervals. The transform uses the next num_quad samples after each training sample, so reserve them with num_after.
bandwidth float required Transform parameter z. Larger values weight short times more heavily.
dt float required Time step of the quadrature (the sampling interval of the data).
tau float required Exponent τ of the smoothing weights that make the operator compact.
which_eigs_galerkin int or tuple[int, int] or list[int] required As for KoopmanParsDiff.
antisym bool True Use the antisymmetric part of the transform matrix and a Hermitian eigensolver.
num_eigs int or None None As for KoopmanParsDiff.
laplacian_method "log" or "lin" or "inv" "log" As for KoopmanParsDiff: recorded in the folder name; the Laplace eigenvalues used by the "fejer" smoothing are always computed with "log".
smoothing_kernel "exponential" or "fejer" "exponential" Smoothing weights: "exponential" λ_j^τ (kernel eigenvalues to the power τ) or "fejer" (1 − √(η_j / η_max))^τ.
sort_by "energy" or "frequency" "frequency" As for KoopmanParsDiff.
eval_quad_batch_size int or None None Batch size for evaluating the basis functions at the quadrature samples.
quad_batch_size int or None None Batch size for the quadrature over basis functions.
gram_batch_size int or None None Batch size for the inner products that form the transform matrix.

Result:

KoopmanEigen (nlsa.jax.koopman, defined in src/nlsa/jax/koopman/_koopman.py)
Field Type Description
evals array Eigenvalues of the operator that was diagonalized (the regularized generator, or the transform for resolvent schemes).
gen_evals array Generator eigenvalues; the imaginary part is the angular frequency, the real part a growth or decay rate.
engys array Dirichlet energy of each eigenfunction, a measure of roughness (smaller is smoother).
efreqs array Eigenfrequencies ω, in radians per unit time (per sample in the climate pipeline).
eperiods array Eigenperiods 2π/ω, in the same time units.
evec_coeffs array Expansion coefficients of the Koopman eigenfunctions in the kernel basis.
dual_evec_coeffs array Expansion coefficients of the dual eigenfunctions (used to project data onto the eigenfunctions).

Kernel analog forecasting script (examples/enso/kernel_analog_forecasting.py):

PredPars (examples/enso/kernel_analog_forecasting.py, defined in examples/enso/kernel_analog_forecasting.py)
Option Type or values Default Description
dt int required Prediction time step. Currently ignored: the KAF implementation assumes a step of one sample.
num_steps int required Number of prediction steps; forecasts are made at leads 0, 1, …, num_steps samples.
which_eigs int or tuple[int, int] or list[int] required Kernel eigenfunctions used in the forecast: an integer n means φ₀ … φ_n−1; a tuple (a, b) means φ_a … φ_b; a list gives the indices.
TrainPars (examples/enso/kernel_analog_forecasting.py, defined in examples/enso/kernel_analog_forecasting.py)
Option Type or values Default Description
data DataPars required Training data and embedding settings, as a climate.DataPars.
tune TunePars required Settings for tuning the kernel bandwidth, as a TunePars.
kernel DmKernelPars or BsKernelPars required Kernel normalization and eigensolver, as a DmKernelPars or BsKernelPars.
pred PredPars required Prediction settings, as a PredPars.
cone ConePars or None None Cone-kernel settings, as a ConePars, or None for an ordinary distance.
bw_tune TunePars or None None Settings for tuning the variable-bandwidth function, as a TunePars, or None for a fixed bandwidth.
TestPars (examples/enso/kernel_analog_forecasting.py, defined in examples/enso/kernel_analog_forecasting.py)
Option Type or values Default Description
num_pred_steps int required Number of prediction steps (equal to PredPars.num_steps).
data DataPars required Test data, as a climate.DataPars with the same embedding settings as the training data.
Pars (examples/enso/kernel_analog_forecasting.py, defined in examples/enso/kernel_analog_forecasting.py)
Option Type or values Default Description
train TrainPars required Training parameters.
test TestPars required Test parameters.
kernel_projection ProjectionPars or None None Optional projection of a gridded field onto the kernel eigenfunctions, as a ProjectionPars.

Koopman script (examples/enso/koopman_diffusion_regularization_kaf.py):

PredPars (examples/enso/koopman_diffusion_regularization_kaf.py, defined in examples/enso/koopman_diffusion_regularization_kaf.py)
Option Type or values Default Description
dt float required Prediction time step (redundant for KAF; set to 1).
num_steps int required Number of prediction steps.
idx_koopman_eig int required Index of the Koopman eigenfunction to forecast (the ENSO eigenfunction in this example).
which_kernel_eigs int or tuple[int, int] or list[int] required Kernel eigenfunctions used in the KAF forecast of that eigenfunction, as for which_eigs.
TrainPars (examples/enso/koopman_diffusion_regularization_kaf.py, defined in examples/enso/koopman_diffusion_regularization_kaf.py)
Option Type or values Default Description
data DataPars required As in the KAF script.
tune TunePars required As in the KAF script.
kernel DmKernelPars or BsKernelPars required As in the KAF script.
pred PredPars required Prediction settings, as this script’s PredPars.
koopman KoopmanParsDiff required Koopman settings, as a KoopmanParsDiff.
cone ConePars or None None As in the KAF script.
bw_tune TunePars or None None As in the KAF script.
TestPars (examples/enso/koopman_diffusion_regularization_kaf.py, defined in examples/enso/koopman_diffusion_regularization_kaf.py)
Option Type or values Default Description
num_pred_steps int required As in the KAF script.
data DataPars required As in the KAF script.
Pars (examples/enso/koopman_diffusion_regularization_kaf.py, defined in examples/enso/koopman_diffusion_regularization_kaf.py)
Option Type or values Default Description
train TrainPars required Training parameters.
test TestPars required Test parameters.
kernel_projection ProjectionPars or None None Optional projection onto the kernel eigenfunctions.
koopman_projection ProjectionPars or None None Optional projection of a gridded field onto the Koopman eigenfunctions (the spatial Koopman modes).

Quantum mechanical data assimilation (building blocks):

Qmda (nlsa.qmda, defined in src/nlsa/qmda.py)
Option Type or values Default Description
nTO int 1 Number of time steps between observations.
nTF int 1 Number of forecast time steps.
nL int 1 Number of basis functions.
shape_fun str "bump" Kernel shape function (default "bump").
epsilon float 1 Kernel bandwidth scaling.
ifVB bool True Use a variable-bandwidth kernel.
ifSqrtm bool False Perform the analysis (Bayesian update) step with the matrix square root of the feature operator.
ProjectionPars (nlsa_models.climate, defined in src/nlsa_models/climate.py)
Option Type or values Default Description
data era5.DataSpecs required The gridded field to project, as an era5.DataSpecs (for example global SST).
which_pcs int or slice or Sequence[int] slice(None) Eigenfunctions to project onto: an integer (a single eigenfunction), a slice or a list of indices.
time_origin str or int 0 Index or date that aligns the eigenfunction time series with the field. The examples use the centre of the delay window, delay_embedding_center.
lead_steps int or Sequence[int] 0 Time shift, in samples, between the field and the eigenfunctions; a list gives one pattern per shift, stored along a lead dimension.
SkillScores (nlsa_models.core, defined in src/nlsa_models/core.py)
Field Type Description
nrmses array Normalized root-mean-square error at each lead time 0 … num_steps.
accs array Anomaly correlation at each lead time 0 … num_steps.
EEOFPars (nlsa.eofs, defined in src/nlsa/eofs.py)
Option Type or values Default Description
num_delays int required Number of delays in the extended EOF analysis.
delay_step int 1 Step between delays, in samples.
eigensolver "svd" "svd" Solver; only "svd" is available.
num_eigs int or None None Number of EOF pairs kept.
batch_size int or None None Batch size for matrix products.