Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClimaSeaIce"
uuid = "6ba0ff68-24e6-4315-936c-2e99227c95a4"
authors = ["Climate Modeling Alliance and contributors"]
version = "0.4.6"
version = "0.4.7"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand All @@ -12,24 +12,19 @@ RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"

[weakdeps]
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"

[extensions]
ClimaSeaIceNCDatasetsExt = "NCDatasets"

[compat]
Adapt = "3, 4"
JLD2 = "0.6.2"
KernelAbstractions = "0.9"
Oceananigans = "0.104.1, 0.105, 0.106"
Oceananigans = "0.106, 0.107"
RootSolvers = "0.3, 0.4, 1.0"
Roots = "2"
SeawaterPolynomials = "0.3.4"
julia = "1.10"

[extras]
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
Expand Down
44 changes: 0 additions & 44 deletions ext/ClimaSeaIceNCDatasetsExt.jl

This file was deleted.

28 changes: 28 additions & 0 deletions src/ClimaSeaIce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,32 @@ end
# No diffusion timescale for sea ice for now
cell_diffusion_timescale(model::SeaIceModel) = Inf

#####
##### Default output attributes for NetCDF output
#####

default_horizontal_velocity_attributes(::RectilinearGrid) = Dict(
"u" => Dict("long_name" => "Velocity in the +x-direction.", "units" => "m/s"),
"v" => Dict("long_name" => "Velocity in the +y-direction.", "units" => "m/s"))

default_horizontal_velocity_attributes(::LatitudeLongitudeGrid) = Dict(
"u" => Dict("long_name" => "Velocity in the zonal direction (+ = east).", "units" => "m/s"),
"v" => Dict("long_name" => "Velocity in the meridional direction (+ = north).", "units" => "m/s"))

default_horizontal_velocity_attributes(::OrthogonalSphericalShellGrid) = Dict(
"u" => Dict("long_name" => "Velocity in the i-direction (+ = increasing i).", "units" => "m/s"),
"v" => Dict("long_name" => "Velocity in the j-direction (+ = increasing j).", "units" => "m/s"))

default_horizontal_velocity_attributes(ibg::ImmersedBoundaryGrid) = default_horizontal_velocity_attributes(ibg.underlying_grid)

default_sea_ice_attributes() = Dict(
"h" => Dict("long_name" => "Sea ice thickness.", "units" => "m"),
"ℵ" => Dict("long_name" => "Sea ice concentration.", "units" => "-"))

function Oceananigans.OutputWriters.default_output_attributes(model::SeaIceModel)
velocity_attrs = default_horizontal_velocity_attributes(model.grid)
tracer_attrs = default_sea_ice_attributes()
return merge(velocity_attrs, tracer_attrs)
end

end # module
Loading