Functions in LearnConvection Module
LearnConvection.GaussianProcessLearnConvection.Data.ProfileDataLearnConvection.GaussianProcess.GPLearnConvection.GaussianProcess.GP_multipleLearnConvection.GaussianProcess.KernelLearnConvection.GaussianProcess.SquaredExponentialILearnConvection.Data.ReadJLD2_LESbraryDataLearnConvection.Data.ReadJLD2_OceananigansDataLearnConvection.Data.ReadNetCDF_OceananigansDataLearnConvection.Data.closure_free_convection_flexibleLearnConvection.Data.closure_free_convection_kpp_full_evolutionLearnConvection.Data.custom_avgLearnConvection.Data.dataLearnConvection.Data.dataLearnConvection.Data.get_predictors_targetsLearnConvection.Data.get_predictors_targetsLearnConvection.Data.get_predictors_targetsLearnConvection.Data.get_predictors_targetsLearnConvection.Data.get_predictors_targetsLearnConvection.Data.get_predictors_targetsLearnConvection.Data.get_problemLearnConvection.Data.get_vLearnConvection.Data.postprocess_predictionLearnConvection.Data.postprocess_predictionLearnConvection.Data.postprocess_predictionLearnConvection.Data.postprocess_predictionLearnConvection.Data.postprocess_predictionLearnConvection.Data.postprocess_predictionLearnConvection.Data.read_les_outputLearnConvection.GaussianProcess.antiderivative_distanceLearnConvection.GaussianProcess.compute_kernel_matrixLearnConvection.GaussianProcess.derivative_distanceLearnConvection.GaussianProcess.euclidean_distanceLearnConvection.GaussianProcess.mean_log_marginal_lossLearnConvection.GaussianProcess.modelLearnConvection.GaussianProcess.modelLearnConvection.GaussianProcess.model_outputLearnConvection.GaussianProcess.uncertaintyLearnConvection.Main.plot_profileLearnConvection.Main.predict
LearnConvection.Main
LearnConvection.Main.plot_profile โ Methodplotprofile(gp::GP, data::ProfileData, Vname, timeindex, gprprediction)
Description
Used in interact.jl Plots the simulation profile at a single given index in the data timeseries along with the corresponding GP prediction (prediciting on the training data). i.e. produces a snapshot of the profile evolution. The gpr_prediction is computed outside this function for efficiency.
Arguments
โณ(GP or NN). The model.๐(ProfileData). The ProfileData object used for training and testing.V_name(ProfileData). The ProfileData object whose starting profile will be evolved forward using โณ.time_index(Int). The time indexgpr_prediction(Array). Output of getgprpred (which should only be computed once) on โณ and ๐.
LearnConvection.Main.predict โ MethodDescription
Predict profile across all time steps for the true check. - if the problem is sequential, predict profiles from start to finish without the training, using only the initial profile as the initial condition. - if the problem is residual, predict profiles at each timestep using model-predicted difference between truth and physics-based model (KPP or TKE) prediction
Returns an n-length array of D-length vectors, where n is the number of training points and D is the
Arguments
โณ(GP or NN). The model you will use to approximate the mapping.๐(ProfileData). The ProfileData object whose data ๐ข will "test on", not necessarily the object that was used to train ๐ข. If the problem is sequential, ๐ is the ProfileData object whose starting profile will be evolved forward using ๐ข.
Keyword Arguments
postprocessed(bool or String). If false, return whatever the model predicts directly (direct model output) If true, return the full predicted temperature profile calculated from the model output. If "both", return both.
LearnConvection.GaussianProcess
LearnConvection.GaussianProcess โ ModuleIncludes all useful functions for applying GPR to T and wT profiles from Oceananigans.jl simulations. Uses ProfileData struct to store data and GP struct for performing GPR on the data in ProfileData object.
LearnConvection.GaussianProcess.GP โ TypeGP
Description
- data structure for typical GPR computations
Data Structure and Description
kernel::โฑ, a Kernel object
x_train::๐ฎ , an array of vectors (n-length array of D-length vectors)
ฮฑ::๐ฎ2 , an array
K::๐ฐ , matrix or sparse matrix
CK::๐ฑ, cholesky factorization of KLearnConvection.GaussianProcess.GP_multiple โ TypeGP_multiple
Description
- data structure for GPR computations where each gridpoint in the prediction has a different predictor
Data Structure and Description
GPs, Array of GP objects
kernel, Kernel object
x_trainLearnConvection.GaussianProcess.Kernel โ TypeConstructors for covariance (kernel) functions.
Constructor Description Isotropic/Anisotropic
- SquaredExponentialI(ฮณ,ฯ): squared exponential covariance function isotropic
- ExponentialI(ฮณ,ฯ): exponential covariance function isotropic
- RationalQuadraticI(ฮณ,ฯ,ฮฑ): rational quadratic covariance function isotropic
- Matern12I(ฮณ,ฯ): Matรฉrn covariance function with ส = 1/2. isotropic
- Matern32I(ฮณ,ฯ): Matรฉrn covariance function with ส = 3/2. isotropic
- Matern52I(ฮณ,ฯ): Matรฉrn covariance function with ส = 5/2. isotropic
- SMP(w,ฮผ,ฮณ): Spectral mixture product cov. functionDistance metrics
- euclidean_distance lยฒ-norm: d(x,x') = || x - x' ||",
- derivative_distance Hยน-norm: d(x,x') = || diff(x)./diff(z) - diff(x')./diff(z) ||",
- antiderivative_distance Hโปยน-norm: d(x,x') = || diff(x).*diff(z) - diff(x').*diff(z) ||"LearnConvection.GaussianProcess.SquaredExponentialI โ TypeSquaredExponentialI(ฮณ,ฯ): squared exponential covariance function, isotropic
LearnConvection.GaussianProcess.antiderivative_distance โ Methodantiderivative_distance: computes the Hโปยน-norm w.r.t z of two vectors
LearnConvection.GaussianProcess.compute_kernel_matrix โ Methodcomputekernelmatrix(kernel, x)
Description
- Computes the kernel matrix for GPR
Arguments
k: (Kernel) kernel function k(a,b).x: (array of predictors). x[1] is a vector
Return
sK: (symmetric matrix). A symmetric matrix with entries sK[i,j] = k(x[i], x[j]). This is only meaningful if k(x,y) = k(y,x) (it should)
LearnConvection.GaussianProcess.derivative_distance โ Methodderivative_distance: computes the Hยน-norm w.r.t z of two vectors
LearnConvection.GaussianProcess.euclidean_distance โ Methodeuclidean_distance: computes the Euclidean distance (lยฒ-norm) between two vectors
LearnConvection.GaussianProcess.mean_log_marginal_loss โ Methodmeanlogmarginalloss(ytrain, ๐ข::GP; add_constant=false)
Description
Computes log marginal loss for each element in the output and averages the results. Assumes noise-free observations.
log(p(y|X)) = -(1/2) * (y'ฮฑ + 2sum(Diagonal(CK)) + nlog(2pi)) where n is the number of training points and
Arguments
y_train: (Array). training outputs (prediction), must have the same number as x_train๐ข: (GP).
Keyword Arguments
add_constant: (bool). whether to give the exact value of the loss or leave out an added constant for efficiency.
LearnConvection.GaussianProcess.model โ Methodmodel(xtrain, ytrain; kernel; sparsitythreshold = 0.0, robust = true, entrythreshold = sqrt(eps(1.0)))
Description
Constructs the posterior distribution for a gp. In other words this does the 'training' automagically.
Arguments
x_train: (array). training inputs (predictors), must be an array of states. length-n array of D-length vectors, where D is the length of each input n is the number of training points.y_train: (array). training outputs (prediction), must have the same number as x_train length-n array of D-length vectors.kernel: (Kernel). Kernel object. See kernels.jl. kernel_function(kernel)(x,x') maps predictor x predictor to real numbers.
Keyword Arguments
z: (vector). values w.r.t. which to derivate the state (default none).normalize: (bool). whether to normalize the data during preprocessing and reverse the scaling for postprocessing. Can lead to better performance.hyperparameters: (array). default = []. hyperparameters that enter into the kernelsparsity_threshold: (number). default = 0.0. a number between 0 and 1 that determines when to use sparse array format. The default is to never use itrobust: (bool). default = true. This decides whether to uniformly scale the diagonal entries of the Kernel Matrix. This sometimes helps with Cholesky factorizations.entry_threshold: (number). default = sqrt(eps(1.0)). This decides whether an entry is "significant" or not. For typical machines this number will be about 10^(-8) * largest entry of kernel matrix.
Return
- GP object
LearnConvection.GaussianProcess.model โ Methodmodel(๐::ProfileData; kernel::Kernel = Kernel(), stencil_size=nothing)
Description
Create an instance of GP using data from ProfileData object ๐.
Arguments
- ๐::ProfileData, Data for training the GP
Keyword Arguments
- kernel::Kernel,
- stencil_size::Int64
LearnConvection.GaussianProcess.model_output โ Methodprediction(x, ๐ข::GP_multiple)
Description
- Given state x, GP_multiple ๐ข, returns the mean GP prediction
Arguments
x: single scaled state๐ข: GP_multiple object with which to make the prediction
Return
y: scaled prediction
LearnConvection.GaussianProcess.uncertainty โ Methoduncertainty(x, ๐ข::GP)
Description
- Given state x and GP ๐ข, output the variance at a point
Arguments
x: state
Return
var: variance
LearnConvection.Data
LearnConvection.Data.ProfileData โ TypeProfileData
Description
- data structure for preparing profile data for analysis with gpr or nn.
Data Structure and Description
v::Array, Nz x Nt array of T or wT values directly from the LES simulation, not preprocessed.
vavg::Array, Nt-length array of Nz-length vectors from LES simulation, scaled and pre-processed
x::Array, all simulation inputs, scaled and pre-processed
y::Array, all simulation inputs, scaled and pre-processed
x_train::Array, training inputs (predictors; array of states). (length-n array of D-length vectors, where D is the length of each input n is the number of training points)
y_train::Array, training outputs (predictions) (length-n array of D-length vectors).
validation_set::Array, vector of indices corresponding to validation data
z::Array, Nz-length vector of depth values
zavg::Array, length-D vector; depth values averaged to D gridpoints
t::Array, timeseries [seconds]
Nt::Int64, length(timeseries)
state_variables
problem::Problem, what mapping you wish to evaluate with the model. (Sequential("T"), Sequential("wT"), Residual("T"), Residual("KPP"), or Residual("TKE"))LearnConvection.Data.ReadJLD2_LESbraryData โ MethodLESbraryData(filename)
Description
- Constructor for Oceananigans data type. Loads data from LES
Fields for the output are
# initial conditions
Tโฐ::๐ฎ
Sโฐ::๐ฎ
Uโฐ::๐ฎ
Vโฐ::๐ฎ
# fields at each moment in time
T::๐ฏ
S::๐ฏ
U::๐ฏ
V::๐ฏ
# some second order statistics at each moment in time
wT::๐ฏ
wS::๐ฏ
uu::๐ฏ
vv::๐ฏ
ww::๐ฏ
tke::๐ฏ
# simulation constants
ฯ::๐ฐ
ฮฑ::๐ฐ
ฮฒ::๐ฐ
cแต::๐ฐ
fโฐ::๐ฐ
g::๐ฐ
# time and grid
t::๐ฎ
z::๐ฎ
# #top boundary condition data, see string for type of boundary condition
# top_T::๐ฐ
# top_S::๐ฐ
# top_U::๐ฐ
# top_V::๐ฐ
# #bottom boundary condition data, see string for type of boundary condtion
# bottom_T::๐ฐ
# bottom_S::๐ฐ
# bottom_U::๐ฐ
# bottom_V::๐ฐ
#info about the simulation
info::๐ฑLearnConvection.Data.ReadJLD2_OceananigansData โ MethodOceananigansData(filename)
Description
- Constructor for Oceananigans data type. Loads data from LES
Fields for the output are
# initial conditions
Tโฐ::๐ฎ
Sโฐ::๐ฎ
Uโฐ::๐ฎ
Vโฐ::๐ฎ
# fields at each moment in time
T::๐ฏ
S::๐ฏ
U::๐ฏ
V::๐ฏ
# some second order statistics at each moment in time
wT::๐ฏ
wS::๐ฏ
uu::๐ฏ
vv::๐ฏ
ww::๐ฏ
tke::๐ฏ
# simulation constants
ฯ::๐ฐ
ฮฑ::๐ฐ
ฮฒ::๐ฐ
cแต::๐ฐ
fโฐ::๐ฐ
g::๐ฐ
# time and grid
t::๐ฎ
z::๐ฎ
#top boundary condition data, see string for type of boundary condition
top_T::๐ฐ
top_S::๐ฐ
top_U::๐ฐ
top_V::๐ฐ
#bottom boundary condition data, see string for type of boundary condtion
bottom_T::๐ฐ
bottom_S::๐ฐ
bottom_U::๐ฐ
bottom_V::๐ฐ
#info about the simulation
info::๐ฑLearnConvection.Data.ReadNetCDF_OceananigansData โ MethodOceananigansData(filename)
Description
- Constructor for Oceananigans data type. Loads data from LES
Fields for the output are
# initial conditions
Tโฐ::๐ฎ
Sโฐ::๐ฎ
Uโฐ::๐ฎ
Vโฐ::๐ฎ
# fields at each moment in time
T::๐ฏ
S::๐ฏ
U::๐ฏ
V::๐ฏ
# some second order statistics at each moment in time
wT::๐ฏ
wS::๐ฏ
uu::๐ฏ
vv::๐ฏ
ww::๐ฏ
# simulation constants
ฯ::๐ฐ
ฮฑ::๐ฐ
ฮฒ::๐ฐ
cแต::๐ฐ
fโฐ::๐ฐ
g::๐ฐ
# time and grid
t::๐ฎ
z::๐ฎ
#top boundary condition data, see string for type of boundary condition
top_T::๐ฐ
top_S::๐ฐ
top_U::๐ฐ
top_V::๐ฐ
#bottom boundary condition data, see string for type of boundary condtion
bottom_T::๐ฐ
bottom_S::๐ฐ
bottom_U::๐ฐ
bottom_V::๐ฐ
#info about the simulation
info::๐ฑLearnConvection.Data.closure_free_convection_flexible โ Methodclosurefreeconvection_flexible(N, ฮt, les::OceananigansData; subsample = 1, grid = 1)
Description
- constructs forward map. Assumes initial conditions and boundary conditions are taken from les data. Adds two more parameters compared to previous one
Arguments
N: number of gridpoints to output toฮt: time step size in secondsles: les data of the OceananigansData type
Keyword Arguments
subsample: indices to subsample in time,grid: in case one wants to save the model gridpower: a method of modifying the scaling law, default is 1
Output
The forward map. A function that takes parameters and outputs temperature profiles
๐ช: parameters in KPP, assumes that๐ช[1]: Surface Layer Fraction
๐ช[2]: Nonlocal Flux Amplitude
๐ช[3]: Diffusivity Amplitude
๐ช[4]: Shear Constant, w1 * w2
๐ช[5] = Shear Constant 2 ๐ช[6]: Shear Constant 3,
The extra parameters correspond to C[5] * w1^(1-power) * w2^(1+power)
where w1 = max(0, h * Qb)^(1/3), w2 = sqrt(๐ช[6] * h^2), are two velocity scales.
LearnConvection.Data.closure_free_convection_kpp_full_evolution โ Methodclosurefreeconvection(N, ฮt, les::OceananigansData; subsample = 1, grid = 1)
Description
- constructs forward map. Assumes initial conditions and boundary conditions are taken from les data.
Arguments
N: number of gridpoints to output toฮt: time step size in secondsles: les data of the OceananigansData type
Keyword Arguments
subsample: indices to subsample in time,grid: in case one wants to save the model grid
Output
The forward map. A function that takes parameters and outputs temperature profiles
๐ช: parameters in KPP, assumes that๐ช[1]: Surface Layer Fraction
๐ช[2]: Nonlocal Flux Amplitude
๐ช[3]: Diffusivity Amplitude
๐ช[4]: Shear Constant
LearnConvection.Data.custom_avg โ MethodFrom sandreza/Learning/sandbox/oceananigansconverter.jl https://github.com/sandreza/Learning/blob/master/sandbox/oceananigansconverter.jl
custom_avg(ฮฆ, n)
Description
- Average a field down to n.
- Requires field to have evenly spaced points. Size of N leq length(ฮฆ).
- Furthermore requires
Arguments
ฮฆ:(vector) The field, an arrayn:(Int) number of grid points to average down to.
Return
ฮฆ2:(vector) The field with values averaged, an array
LearnConvection.Data.data โ Methoddata(filename, D; N=4)
Description
Returns an instance of ProfileData containing training data from multiple simulations. *** Important: ONLY v, xtrain and ytrain contain data from all filenames; the remaining attributes are taken from the first filename in filenames
Arguments
filenames: (string) Vector of filenames (.nc or .jld2) to collect data from.problem: (Problem). What mapping you wish to evaluate with the model. (Sequential("T"), Sequential("wT"), Residual("T"), Residual("KPP"), or Residual("TKE"))
Keyword Arguments
D: (integer) Number of gridpoints in the z direction to average the data to for training and prediction.N: (integer) Interval between the timesteps to be reserved for training data (default 4). If N=4, the profile data for every 4 timesteps will be reserved for training (~25% training data); the rest will be used in the validation set.
LearnConvection.Data.data โ Methoddata(filename, problem; D=16, N=4)
Description
Returns a ProfileData object based on data from filename
Arguments
filename: (string) Name of the NetCDF or JLD2 file containing the data from the Oceananigans simulation.problem: (Problem). What mapping you wish to evaluate with the model.
Keyword Arguments
D: (integer) Number of gridpoints in the z direction to average the data to for training and prediction.N: (integer) Interval between the timesteps to be reserved for training data (default 4). If N=4, the profile data for every 4 timesteps will be reserved for training (~25% training data); the rest will be used in the validation set.
LearnConvection.Data.get_predictors_targets โ Methodget_predictors_targets(vavg::Array, problem::Sequential_T)
Description
Returns x and y, the predictors and target predictions from which to extract the training and verification data for "T" profiles.
model( predictors ) -> targets
model( T[i] ) -> T[i+1]Arguments
vavg: (Array) Nt-length array of D-length vectors. Data from which to extract x and y, the predictors and corresponding predictions.problem: (SequentialT) SequentialT object associated with the data (output of get_problem)
LearnConvection.Data.get_predictors_targets โ Methodget_predictors_targets(vavg, problem::Sequential_wT)
Description
Returns x and y, the predictors and targets from which to extract the training and verification data for "wT" profiles.
model( predictor ) -> target
model( wT[i] ) -> wT[i+1]Arguments
vavg: (Array) Nt-length array of D-length vectors. Data from which to extract x and y, the predictors and corresponding predictions.problem: (SequentialwT) SequentialwT object associated with the data (output of get_problem)
LearnConvection.Data.get_predictors_targets โ Methodget_predictors_targets(vavg::Array, problem::Sequential_T)
Description
Returns x and y, the scaled predictor and target pairs from which to extract the training and verification data sets for "T" profiles.
model( predictor ) -> target
model( T[i] ) -> (T[i+1]-T[i])/ฮt โ โt(T)Arguments
vavg: (Array) Nt-length array of D-length vectors. Data from which to extract x and y, the predictors and corresponding predictions.problem: (SequentialdT) SequentialT object associated with the data (output of get_problem)
LearnConvection.Data.get_predictors_targets โ Methodgetpredictorstargets(vavg::Array, problem::Residual_KPP)
Description
Returns x and y, the scaled predictors and target predictions from which to extract the training and verification data for temperature profiles.
Scales the predictors and targets using min-max scaling based on the initial temperature profile from the les simulation.
model( predictors ) = targets
model( KPP(T[i]) ) = T[i] - KPP(T[i])Arguments
vavg: (Array) Nt-length array of D-length vectors. Data from which to extract x and y, the predictors and corresponding predictions.problem: (ResidualKPP) ResidualKPP object associated with the data (output of get_problem)
LearnConvection.Data.get_predictors_targets โ Methodgetpredictorstargets(vavg::Array, problem::Residual_KPP)
Description
Returns x and y, the scaled predictors and target predictions from which to extract the training and verification data for temperature profiles.
Scales the predictors and targets using min-max scaling based on the initial temperature profile from the les simulation.
model( predictors ) = targets
model( KPP(T[i]) ) = T[i] - KPP(T[i])Arguments
vavg: (Array) Nt-length array of D-length vectors. Data from which to extract x and y, the predictors and corresponding predictions.problem: (ResidualKPP) ResidualKPP object associated with the data (output of get_problem)
LearnConvection.Data.get_predictors_targets โ Methodgetpredictorstargets(vavg::Array, problem::Slack_KPP)
Description
Returns x and y, the scaled predictors and target predictions from which to extract the training and verification data for temperature profiles.
Scales the predictors and targets using min-max scaling based on the initial temperature profile from the les simulation.
model( predictors ) = targets
model( KPP(T[i]) ) = T[i] - KPP(T[i])Arguments
vavg: (Array) Nt-length array of D-length vectors. Data from which to extract x and y, the predictors and corresponding predictions.problem: (SlackKPP) SlackKPP object associated with the data (output of get_problem)
LearnConvection.Data.get_problem โ Methodget_problem(problem::Problem, data::OceananigansData, timeseries)
Description
Creates an instance of a Problem struct depending on the type of mapping.
Returns the problem and the correct data array from the OceananigansData objectssociated with the variable of interest.Arguments
- 'problem': (Problem). what mapping you wish to evaluate with the model. (Sequential("T"), Sequential("wT"))
- 'v': (Array). Array of values
- 'les': (OceananigansData). LES simulation output
- 'Nยฒ': (Number) initial buoyancy stratification
- 'D': (Number) number of grid points in the vertical
LearnConvection.Data.get_v โ Methodget_v(problem)
Description
Return data array from the OceananigansData object associated with the variable of interest.Arguments
- 'problem': (Problem). what mapping you wish to evaluate with the model. (Sequential("T"), Sequential("wT"))
LearnConvection.Data.postprocess_prediction โ Methodpostprocess_prediction(predictor, prediction, problem::Sequential_T)
Description
Takes in a scaled predictor, T[i], the scaled GP prediction on the predictor, G(T[i]), and a Sequential_T object. Returns the predicted temperature profile, T[i+1], computed from T[i] and G(T[i]) by
prediction = model( predictor )
predicted T[i+1] = model( T[i] )Arguments
predictor: (Array) T[i], the scaled predictor for a temperature profileprediction: (Array) model(T[i), the scaled prediction for a temperature profileproblem: (Sequential_T)
LearnConvection.Data.postprocess_prediction โ Methodpostprocess_prediction(predictor, model_output, problem::Sequential_dT)
Description
Takes in a scaled predictor, T[i], the scaled model output on the predictor, model(T[i]), and a Sequential_T object. Returns the unscaled prediction (predicted temperature profile), T[i+1], computed from T[i] and model(T[i]) by
predicted T[i+1] = model(T[i])ฮt + T[i]Arguments
predictor: (Array) T[i], the scaled predictor for a temperature profilemodel_output: (Array) model(T[i]), the scaled model output for a temperature profileproblem: (Sequential_dT)
LearnConvection.Data.postprocess_prediction โ Methodpostprocess_prediction(predictor, prediction, problem::Sequential_wT)
Description
Takes in a scaled predictor, wT[i], the scaled model prediction on the predictor, model(wT[i]), and a Sequential_wT object. Returns the temperature profile, T[i+1], computed from model(T[i]) by
prediction = model(predictor)
predicted wT[i+1] = model(wT[i])Arguments
predictor: (Array) wT[i], the predictor for a wT profileprediction: (Array) predicted wT[i+1], the model prediction for a wT profileproblem: (SequentialwT) SequentialwT object associated with the data
LearnConvection.Data.postprocess_prediction โ MethodDescription
Takes in a predictor, T[i], the GP prediction on the predictor, G(T[i]), and a Residual_KPP object. Returns the predicted temperature profile, T[i+1], computed from T[i] and G(T[i]) by
prediction = model(predictor) # residual
predicted T[i+1] = model(KPP(T[i])) + KPP(T[i])Arguments
predictor: (Array) T[i], the predictor for a temperature profileprediction: (Array) model(T[i), the prediction for a temperature profileproblem: (Residual_KPP)
LearnConvection.Data.postprocess_prediction โ MethodDescription
Takes in a predictor, T[i], the GP prediction on the predictor, G(T[i]), and a Residual_KPP object. Returns the predicted temperature profile, T[i+1], computed from T[i] and G(T[i]) by
prediction = model(predictor) # residual
predicted T[i+1] = model(KPP(T[i])) + KPP(T[i])Arguments
predictor: (Array) T[i], the predictor for a temperature profileprediction: (Array) model(T[i), the prediction for a temperature profileproblem: (Residual_KPP)
LearnConvection.Data.postprocess_prediction โ MethodDescription
Takes in a predictor, T[i], the GP prediction on the predictor, G(T[i]), and a Slack_KPP object. Returns the predicted temperature profile, T[i+1], computed from T[i] and G(T[i]) by
prediction = model(predictor) # residual
predicted T[i+1] = model(KPP(T[i])) + KPP(T[i])Arguments
predictor: (Array) T[i], the predictor for a temperature profileprediction: (Array) model(T[i), the prediction for a temperature profileproblem: (Slack_KPP)
LearnConvection.Data.read_les_output โ Methodreadlesoutput(filename::String; days=0)