Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Sep 10, 2024
1 parent 28683a9 commit 840cc12
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 1 addition & 5 deletions experiments/calibration/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# ClimaLand calibration

This folder contains scripts to perform calibration on ClimaLand simulations, using [ClimaCalibrate.jl](https://github.com/CliMA/ClimaCalibrate.jl).

Like other ClimaLand/experiments scripts, the Julia environment (Project.toml) is located in .buildkite

The structure of this folder currently mimics [ClimaAtmos.jl/calibration](https://github.com/CliMA/ClimaAtmos.jl/tree/main/calibration).
This folder contains scripts to perform calibration on ClimaLand simulations.

## Documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,18 @@ 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?

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

# We are now ready to carry out the inversion. At each iteration, we get the ensemble from the last iteration, apply
# ClimaLand_lhf(g1) to each ensemble member, and apply the Kalman update to the ensemble.

for i in 1:N_iterations
params_i = get_ϕ_final(prior_g1, ensemble_kalman_process)

ClimaLand_ens = hcat([ClimaLand_lhf(params_i[:, i]) for i in 1:N_ensemble]...)

EKP.update_ensemble!(ensemble_kalman_process, ClimaLand_ens)
end

# Done! Here are the parameters:

final_ensemble = get_ϕ_final(prior_g1, ensemble_kalman_process)

0 comments on commit 840cc12

Please sign in to comment.