Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Sep 11, 2024
1 parent 840cc12 commit 07be216
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[deps]
ClimaLand = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
ClimaLandSimulations = "348a0bd3-1299-4261-8002-d2cd97df6055"
EnsembleKalmanProcesses = "aa8a2aa5-91d8-4396-bcef-d4f2ec43552d"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Packages
import ClimaLandSimulations.Fluxnet as CLS # to run the model
import EnsembleKalmanProcesses as EKP # to perform the calibration
import Random # we need it for ...

# a function returning our model lhf output given the params to calibrate
function ClimaLand_lhf(g1)
Expand All @@ -37,14 +38,15 @@ lhf_target = ClimaLand_lhf(141.0) # our default for Ozark, in sqrt(Pa). This is

# parameters prior
prior_g1 = EKP.constrained_gaussian("g1", 221, 100, 0, Inf) # mean of 221 sqrt(Pa) = 7 sqrt(kPa), std of 100 (3 kPa)
# Ollie: why does it return μ=5.3, σ=0.4? Are the values transformed?

# generate the initial ensemble and set up the ensemble Kalman inversion
N_ensemble = 5
N_iterations = 5
N_ensemble = 5 # Ollie: is this parameter set at each iteration?
N_iterations = 5 # Ollie: is this always equal to N_ensemble?
rng_seed = 41 # Ollie: why 41?
rng = Random.MersenneTwister(rng_seed) # Ollie: pseudo-random number?

initial_ensemble = EKP.construct_initial_ensemble(rng, prior_g1, N_ensemble) # Ollie: what does this do?
initial_ensemble = EKP.construct_initial_ensemble(rng, prior_g1, N_ensemble) # Ollie: what does this do? 5 random values of g1?

ensemble_kalman_process = EKP.EnsembleKalmanProcess(initial_ensemble, y, Γ, Inversion(); rng = rng) # Ollie: do we need y and Γ?

Expand Down

0 comments on commit 07be216

Please sign in to comment.