lorenz.enkf package
Submodules
lorenz.enkf.enkf module
- lorenz.enkf.enkf.RK4_Lorenz(γ, X0, N, T)[source]
- Parameters
γ – an array of real that represente the three parameter of the lorenz system (σ, b, r)
X0 – a size 3 array with the initial constition, initial point (x,y,z)
N – a real that represents the number of discritisation
T – a real that represents the time interval
- Returns
this fonction return resolution with RK4 X[:,0]: array of x X[:,1]: array of y X[:,2]: array of z T_tab: array of the time
- lorenz.enkf.enkf.RK4_harmonique(w, X0, N, T)[source]
- Parameters
w – a real that represente the first parameter of the hamonic oscillator
X0 – a size 2 array with the initial constition, initial point.
N – a real that represents the number of discritisation
T – a real that represents the time interval
- Returns
this fonction return resolution with RK4 X[:,0]: array of x X[:,1]: array of y T_tab: array of the time
- lorenz.enkf.enkf.assimilation_donnée(x, read_sensor, P, Q, R, T, dimz, dt, N, nb_echantillon, hx, fx, γ)[source]
- Parameters
x – a size 3 array with the initial constition, initial point (x,y,z)
read_sensor – a function that will read the observation every time
P – covariance matrix associated with the forecast state error
Q – covariance matrix associated with the model error
R – covariance matrix associated with the observations error
T – a real that represents the time interval
dimz – a real that represent the dimention of the observations
dt – a real that represent the time for each discretisation
N – a real that represents the index difference between the observations and the model
nb_echantillon – a real that represents the index difference between the observations and the model
hx – Measurement function. Convert state x into a measurement
fx – State transition function
γ – an array of real that represente the three parameter of the lorenz system (σ, b, r)
N – a real that represents the number of discritisation
- Returns
this function do the data assimilation using the ensemble kalman filter -tab_etat: an array with the state mean after data assimilation -tab_temps: an array with the time -tab_cov: an array with the diagonal of the state covarience matrix pour each time
- lorenz.enkf.enkf.euler_explicit_harmonique(w, X0, N, T)[source]
- Parameters
w – a real that represente the first parameter of the hamonic oscillator
X0 – a size 2 array with the initial constition, initial point.
N – a real that represents the number of discritisation
T – a real that represents the time interval
- Returns
this fonction return resolution with euler X[:,0]: array of x X[:,1]: array of y T_tab: array of the time
- lorenz.enkf.enkf.f_orcillateur(t, X_n, w)[source]
- Parameters
X_n – un tableau de reel de taille 2
w – a real that represente the first parameter of the hamonic oscillator
- lorenz.enkf.enkf.plot(lorenz1, lorenz2, tab_temps, tab_x_y_z)[source]
- Parameters
lorenz1 – observations,an array of vectors where each vector is of size 3, representing [x,y,z]
lorenz2 – model,an array of vectors where each vector is of size 3, representing [x,y,z]
tab_temps – real type array representing time
tab_x_y_z – represente an array of vectors where each vector is of size 3,array after data assimilation, representing [x,y,z]
- Returns
- return nothing but makes three different plot, in each one we will have
3 curves (observations,model and stade after data assimilation) as a function of time
- lorenz.enkf.enkf.plot_1_fig(lorenz1, lorenz2, ind, tab_temps, tab_cov, diff, tab_x_y_z, labelx, labely)[source]
- Parameters
lorenz1 – observations,an array of vectors where each vector is of size 3, representing [x,y,z]
lorenz2 – model,an array of vectors where each vector is of size 3, representing [x,y,z]
ind – a real representing the index we want to plot (x, y or z)
tab_temps – real type array representing time
tab_cov – an array of vectors where each vector is of size 3, representing variances (diag of the cov matrix associated to the state obtained through data assimilation)
diff – represent the distance to create our standart deviation variance
tab_x_y_z – represente an array of vectors where each vector is of size 3,array after data assimilation, representing [x,y,z]
labelx – legend of the x-curve
labely – legend of the y-curve
- Returns
return nothing but plot 3 curves as a function of ind(either x,y or z) as a function of time