Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into ss/one-degree-take3
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri committed Dec 23, 2024
2 parents 3035819 + 7ddb30b commit 915320d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 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.3.1"
version = "0.3.2"

[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.95.2 - 0.99"
Oceananigans = "0.95.4 - 0.99"
OffsetArrays = "1.14"
OrthogonalSphericalShellGrids = "0.2.0"
OrthogonalSphericalShellGrids = "0.2.1"
Scratch = "1"
SeawaterPolynomials = "0.3.4"
StaticArrays = "1"
Expand Down
11 changes: 0 additions & 11 deletions mwe.jl

This file was deleted.

1 change: 0 additions & 1 deletion src/DataWrangling/ECCO/ECCO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ using Adapt
using Scratch

download_ECCO_cache::String = ""

function __init__()
global download_ECCO_cache = @get_scratch!("ECCO")
end
Expand Down
9 changes: 7 additions & 2 deletions src/DataWrangling/ECCO/ECCO_restoring.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ end
ECCOFieldTimeSeries(variable_name::Symbol, version=ECCO4Monthly(); kw...) =
ECCOFieldTimeSeries(ECCOMetadata(variable_name, all_ECCO_dates(version), version); kw...)

# Variable names for restoreable data
# Variable names for restorable data
struct Temperature end
struct Salinity end
struct UVelocity end
Expand Down Expand Up @@ -244,6 +244,7 @@ end
time_indexing = Cyclical(),
mask = 1,
rate = 1,
dir = download_ECCO_cache,
inpainting = NearestNeighborInpainting(Inf),
cache_inpainted_data = true)
Expand Down Expand Up @@ -296,6 +297,9 @@ Keyword Arguments
- `rate`: The restoring rate, i.e., the inverse of the restoring timescale (in s⁻¹).
- `dir`: The directory where the native ECCO data is located. If the data does not exist it will
be automatically downloaded. Default: `download_ECCO_cache`.
- `inpainting`: inpainting algorithm, see [`inpaint_mask!`](@ref). Default: `NearestNeighborInpainting(Inf)`.
- `cache_inpainted_data`: If `true`, the data is cached to disk after inpainting for later retrieving.
Expand All @@ -305,9 +309,10 @@ function ECCORestoring(variable_name::Symbol,
arch_or_grid = CPU();
version = ECCO4Monthly(),
dates = all_ECCO_dates(version),
dir = download_ECCO_cache,
kw...)

metadata = ECCOMetadata(variable_name, dates, version)
metadata = ECCOMetadata(variable_name, dates, version, dir)
return ECCORestoring(metadata, arch_or_grid; kw...)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const celsius_to_kelvin = 273.15
@inline convert_to_kelvin(::DegreesKelvin, T) = T

Base.summary(crf::OceanSeaIceSurfaceFluxes) = "OceanSeaIceSurfaceFluxes"
Base.show(io::IO, crf::OceanSeaIceSurfaceFluxes) = print(io, summary(crf))

function Base.show(io::IO, crf::OceanSeaIceSurfaceFluxes)
print(io, summary(crf), "\n")
Expand Down
3 changes: 2 additions & 1 deletion src/OceanSeaIceModels/ocean_sea_ice_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ function Base.show(io::IO, cm::OSIM)
end

# Assumption: We have an ocean!
architecture(model::OSIM) = architecture(model.ocean)
architecture(model::OSIM) = architecture(model.ocean.model)
Base.eltype(model::OSIM) = Base.eltype(model.ocean.model)

prettytime(model::OSIM) = prettytime(model.clock.time)
iteration(model::OSIM) = model.clock.iteration
Expand Down

0 comments on commit 915320d

Please sign in to comment.