Skip to content

Commit

Permalink
Update ClimaParams, set compat
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed May 31, 2024
1 parent 0e2b645 commit 43a0617
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
5 changes: 4 additions & 1 deletion examples/OceananigansSingleColumnSimulation/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[deps]
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[compat]
Oceananigans = "0.91"
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
using Oceananigans
using CLIMAParameters
using ClimaParams

# In a "real" use case, we recommend implementing setups in source code.
include("single_column_simulation.jl")
project_dir = dirname(Base.active_project())

parameters = CLIMAParameters.create_toml_dict(
toml_dict = ClimaParams.create_toml_dict(
Float64,
override_file = "my_parameters.toml",
default_file = "default_parameters.toml",
dict_type = "name",
override_file = joinpath(project_dir, "my_parameters.toml"),
default_file = joinpath(project_dir, "default_parameters.toml"),
)

parameters = CLIMAParameters.get_parameter_values!(
parameters,
parameters = ClimaParams.get_parameter_values(
toml_dict,
"gravitational_acceleration",
"Ocean",
)
parameters = NamedTuple(parameters...)

output_filename = "single_column_simulation.jld2"
simulation = single_column_simulation(;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Oceananigans
using Oceananigans.Units
using SeawaterPolynomials
using SeawaterPolynomials.TEOS10: TEOS10EquationOfState
using CLIMAParameters
using ClimaParams

using Printf

Expand Down

0 comments on commit 43a0617

Please sign in to comment.