Skip to content

Commit

Permalink
(0.89.1) Make maximum numeric diffusivity more generic for named tupl…
Browse files Browse the repository at this point in the history
…es of diffusivity (#3274)

* Update turbulence_closure_diagnostics.jl

* Bump patch number

* Update turbulence_closure_diagnostics.jl

[skip ci]

* Update TurbulenceClosures.jl

* Update src/TurbulenceClosures/turbulence_closure_diagnostics.jl

Co-authored-by: Gregory L. Wagner <[email protected]>

---------

Co-authored-by: Gregory L. Wagner <[email protected]>
Co-authored-by: Navid C. Constantinou <[email protected]>
  • Loading branch information
3 people committed Oct 6, 2023
1 parent 82503b8 commit 5dd96cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Oceananigans"
uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
authors = ["Climate Modeling Alliance and contributors"]
version = "0.89.0"
version = "0.89.1"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
1 change: 1 addition & 0 deletions src/TurbulenceClosures/TurbulenceClosures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ using Oceananigans.BuoyancyModels
using Oceananigans.Utils

using Oceananigans.Architectures: AbstractArchitecture, device
using Oceananigans.Fields: FunctionField
import Oceananigans.Advection: required_halo_size

const VerticallyBoundedGrid{FT} = AbstractGrid{FT, <:Any, <:Any, <:Bounded}
Expand Down
3 changes: 2 additions & 1 deletion src/TurbulenceClosures/turbulence_closure_diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ cell_diffusion_timescale(model) = cell_diffusion_timescale(model.closure, model.
cell_diffusion_timescale(::Nothing, diffusivities, grid) = Inf

maximum_numeric_diffusivity::Number) = κ
maximum_numeric_diffusivity::NamedTuple) = maximum(κ)
maximum_numeric_diffusivity::FunctionField) = maximum(κ)
maximum_numeric_diffusivity(κ_tuple::NamedTuple) = maximum(maximum_numeric_diffusivity(κ) for κ in κ_tuple)
maximum_numeric_diffusivity::NamedTuple{()}) = 0 # tracers=nothing means empty diffusivity tuples
maximum_numeric_diffusivity(::Nothing) = 0

Expand Down

2 comments on commit 5dd96cf

@jagoosw
Copy link
Collaborator Author

@jagoosw jagoosw commented on 5dd96cf Oct 6, 2023

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/92902

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.89.1 -m "<description of version>" 5dd96cf310e988fc5d3a2523c2dcc7197f18ff62
git push origin v0.89.1

Please sign in to comment.