Skip to content

Commit

Permalink
(0.2.5) Update compat to Oceananigans 0.95 (#297)
Browse files Browse the repository at this point in the history
* Update to Oceananigans 0.95

* Bump to 0.2.5

* update orthogonalsphericalshellgrids

* Update Project.toml

* adapt to new syntax

* correct the formulation

* last one

* Update Project.toml

* Update docs Project compat

* Bump docs compat for OrthogonalSphericalShellGrids

---------

Co-authored-by: Simone Silvestri <[email protected]>
  • Loading branch information
glwagner and simone-silvestri authored Dec 13, 2024
1 parent c00a4b6 commit 07af260
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "ClimaOcean"
uuid = "0376089a-ecfe-4b0e-a64f-9c555d74d754"
license = "MIT"
authors = ["Climate Modeling Alliance and contributors"]
version = "0.2.4"
version = "0.2.5"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down Expand Up @@ -42,9 +42,9 @@ JLD2 = "0.4, 0.5"
KernelAbstractions = "0.9"
MPI = "0.20"
NCDatasets = "0.12, 0.13, 0.14"
Oceananigans = "0.94.3 - 0.99" # This needs to be 0.94.4 when PolarBoundaryCondition is implemented
Oceananigans = "0.95.2 - 0.99"
OffsetArrays = "1.14"
OrthogonalSphericalShellGrids = "0.1.9"
OrthogonalSphericalShellGrids = "0.2.0"
Scratch = "1"
SeawaterPolynomials = "0.3.4"
StaticArrays = "1"
Expand Down
4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ OrthogonalSphericalShellGrids = "c2be9673-fb75-4747-82dc-aa2bb9f4aed0"
CairoMakie = "0.10.12, 0.11, 0.12"
DataDeps = "0.7"
Documenter = "1"
Oceananigans = "0.94.3"
OrthogonalSphericalShellGrids = "0.1.8"
Oceananigans = "0.95.2 - 0.99"
OrthogonalSphericalShellGrids = "0.2.0"
2 changes: 1 addition & 1 deletion examples/single_column_os_papa_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using ClimaOcean
using Oceananigans
using Oceananigans.Units
using Oceananigans.BuoyancyModels: buoyancy_frequency
using Oceananigans.BuoyancyFormulations: buoyancy_frequency
using Oceananigans.Units: Time
using Printf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Oceananigans
using Oceananigans.Architectures: arch_array
using Oceananigans.Units
using Oceananigans.Utils: WallTimeInterval
using Oceananigans.BuoyancyModels: buoyancy
using Oceananigans.BuoyancyFormulations: buoyancy
using Oceananigans.Models.HydrostaticFreeSurfaceModels: VerticalVorticityField
using ClimaOcean.NearGlobalSimulations: one_degree_near_global_simulation
using ParameterEstimocean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Oceananigans.Architectures: arch_array
using Oceananigans.Units
using Oceananigans.Grids: on_architecture
using Oceananigans.Utils: WallTimeInterval
using Oceananigans.BuoyancyModels: buoyancy
using Oceananigans.BuoyancyFormulations: buoyancy
using Oceananigans.Models.HydrostaticFreeSurfaceModels: VerticalVorticityField
using ClimaOcean.NearGlobalSimulations: one_degree_near_global_simulation
using ParameterEstimocean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Oceananigans
using Oceananigans.BuoyancyModels: ∂z_b, buoyancy_perturbation
using Oceananigans.BuoyancyFormulations: ∂z_b, buoyancy_perturbation
using SeawaterPolynomials.TEOS10: TEOS10EquationOfState
using JLD2
using CairoMakie
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using ClimaOcean.NearGlobalSimulations: one_degree_near_global_simulation
using Oceananigans
using Oceananigans.Units
using Oceananigans.Utils: WallTimeInterval
using Oceananigans.BuoyancyModels: buoyancy
using Oceananigans.BuoyancyFormulations: buoyancy
using Oceananigans.Models.HydrostaticFreeSurfaceModels: VerticalVorticityField
using Oceananigans.TurbulenceClosures.CATKEVerticalDiffusivities:
MixingLength, TurbulentKineticEnergyEquation, CATKEVerticalDiffusivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Oceananigans
using Oceananigans.Architectures: arch_array
using Oceananigans.Units
using Oceananigans.Utils: WallTimeInterval
using Oceananigans.BuoyancyModels: buoyancy
using Oceananigans.BuoyancyFormulations: buoyancy
using Oceananigans.Models.HydrostaticFreeSurfaceModels: VerticalVorticityField
using ClimaOcean.NearGlobalSimulations: one_degree_near_global_simulation
using ParameterEstimocean
Expand Down
2 changes: 1 addition & 1 deletion src/Diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Diagnostics
export MixedLayerDepthField

using Oceananigans
using Oceananigans.BuoyancyModels: buoyancy
using Oceananigans.BuoyancyFormulations: buoyancy
using Oceananigans.BoundaryConditions: fill_halo_regions!
using Oceananigans.ImmersedBoundaries: ImmersedBoundaryGrid
using Oceananigans.Architectures: device, architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function OceanSeaIceSurfaceFluxes(ocean, sea_ice=nothing;
if !isnothing(atmosphere)
# It's the "thermodynamics gravitational acceleration"
# (as opposed to the one used for the free surface)
gravitational_acceleration = ocean.model.buoyancy.model.gravitational_acceleration
gravitational_acceleration = ocean.model.buoyancy.formulation.gravitational_acceleration

if isnothing(similarity_theory)
similarity_theory = SimilarityTheoryTurbulentFluxes(ocean_grid; gravitational_acceleration)
Expand Down
10 changes: 5 additions & 5 deletions src/OceanSeaIceModels/ocean_sea_ice_model.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Oceananigans
using Oceananigans.Models: update_model_field_time_series!
using Oceananigans.TimeSteppers: Clock
using Oceananigans.BuoyancyModels: SeawaterBuoyancy
using Oceananigans: SeawaterBuoyancy

using SeawaterPolynomials: TEOS10EquationOfState

Expand Down Expand Up @@ -57,12 +57,12 @@ reference_density(unsupported) =
heat_capacity(unsupported) =
throw(ArgumentError("Cannot deduce the heat capacity from $(typeof(unsupported))"))

reference_density(ocean::Simulation) = reference_density(ocean.model.buoyancy.model)
reference_density(buoyancy_model::SeawaterBuoyancy) = reference_density(buoyancy_model.equation_of_state)
reference_density(ocean::Simulation) = reference_density(ocean.model.buoyancy.formulation)
reference_density(buoyancy_formulation::SeawaterBuoyancy) = reference_density(buoyancy_formulation.equation_of_state)
reference_density(eos::TEOS10EquationOfState) = eos.reference_density

heat_capacity(ocean::Simulation) = heat_capacity(ocean.model.buoyancy.model)
heat_capacity(buoyancy_model::SeawaterBuoyancy) = heat_capacity(buoyancy_model.equation_of_state)
heat_capacity(ocean::Simulation) = heat_capacity(ocean.model.buoyancy.formulation)
heat_capacity(buoyancy_formulation::SeawaterBuoyancy) = heat_capacity(buoyancy_formulation.equation_of_state)

function heat_capacity(eos::TEOS10EquationOfState{FT}) where FT
cₚ⁰ = SeawaterPolynomials.TEOS10.teos10_reference_heat_capacity
Expand Down
2 changes: 1 addition & 1 deletion src/OceanSimulations/OceanSimulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using Oceananigans.TurbulenceClosures.TKEBasedVerticalDiffusivities:

using SeawaterPolynomials.TEOS10: TEOS10EquationOfState

using Oceananigans.BuoyancyModels: g_Earth
using Oceananigans.BuoyancyFormulations: g_Earth
using Oceananigans.Coriolis: Ω_Earth
using Oceananigans.Operators

Expand Down
2 changes: 1 addition & 1 deletion test/test_ecco.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ end
φ₂ = @allowscalar grid.φᵃᶜᵃ[21]
φ₃ = @allowscalar grid.φᵃᶜᵃ[80]
φ₄ = @allowscalar grid.φᵃᶜᵃ[100]
z₁ = @allowscalar grid.zᵃᵃᶜ[6]
z₁ = @allowscalar grid.z.cᵃᵃᶜ[6]

mask = LinearlyTaperedPolarMask(northern = (φ₃, φ₄),
southern = (φ₁, φ₂),
Expand Down

2 comments on commit 07af260

@glwagner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/121391

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.5 -m "<description of version>" 07af260e8fc0772a3e3eadd93c8b80d3b362dd9a
git push origin v0.2.5

Please sign in to comment.