diff --git a/Project.toml b/Project.toml index 3aca4f89..4905a393 100644 --- a/Project.toml +++ b/Project.toml @@ -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" @@ -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" diff --git a/mwe.jl b/mwe.jl deleted file mode 100644 index f77545eb..00000000 --- a/mwe.jl +++ /dev/null @@ -1,11 +0,0 @@ -using ClimaOcean -using NCDatasets - -cachepath = ClimaOcean.DataWrangling.JRA55.download_jra55_cache -filename = "RYF.tas.1990_1991.nc" -filepath = joinpath(cachepath, filename) - -ds = Dataset(filepath) -Nx, Ny, Nt = size(ds["tas"]) -ds["tas"][1, 1, [Nt, 1]] -close(ds) diff --git a/src/DataWrangling/ECCO/ECCO.jl b/src/DataWrangling/ECCO/ECCO.jl index 96e3415e..350d1dff 100644 --- a/src/DataWrangling/ECCO/ECCO.jl +++ b/src/DataWrangling/ECCO/ECCO.jl @@ -25,7 +25,6 @@ using Adapt using Scratch download_ECCO_cache::String = "" - function __init__() global download_ECCO_cache = @get_scratch!("ECCO") end diff --git a/src/DataWrangling/ECCO/ECCO_restoring.jl b/src/DataWrangling/ECCO/ECCO_restoring.jl index b8abcb0d..8e974b18 100644 --- a/src/DataWrangling/ECCO/ECCO_restoring.jl +++ b/src/DataWrangling/ECCO/ECCO_restoring.jl @@ -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 @@ -244,6 +244,7 @@ end time_indexing = Cyclical(), mask = 1, rate = 1, + dir = download_ECCO_cache, inpainting = NearestNeighborInpainting(Inf), cache_inpainted_data = true) @@ -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. @@ -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 diff --git a/src/OceanSeaIceModels/CrossRealmFluxes/ocean_sea_ice_surface_fluxes.jl b/src/OceanSeaIceModels/CrossRealmFluxes/ocean_sea_ice_surface_fluxes.jl index e6d856f1..3e994c3f 100644 --- a/src/OceanSeaIceModels/CrossRealmFluxes/ocean_sea_ice_surface_fluxes.jl +++ b/src/OceanSeaIceModels/CrossRealmFluxes/ocean_sea_ice_surface_fluxes.jl @@ -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") diff --git a/src/OceanSeaIceModels/ocean_sea_ice_model.jl b/src/OceanSeaIceModels/ocean_sea_ice_model.jl index efc2ebe7..1d721648 100644 --- a/src/OceanSeaIceModels/ocean_sea_ice_model.jl +++ b/src/OceanSeaIceModels/ocean_sea_ice_model.jl @@ -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