Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1667e33
start climatoloy
simone-silvestri Apr 30, 2025
e26b67e
few fixes + sensible and latent heat fluxes
navidcy Apr 30, 2025
63bd72a
no space
simone-silvestri May 1, 2025
9760ef8
some fixing
simone-silvestri May 1, 2025
c8f27ad
run it on GPU for the moment
simone-silvestri May 1, 2025
20db923
Merge branch 'main' into ss-nc/fix-climatoloy-experiment
navidcy May 3, 2025
5edabc0
add dataset_type
navidcy May 6, 2025
9ccb0cc
use dataset_defaults.FloatType
navidcy May 6, 2025
894ab39
add Qc+Qv + better averaging that do not depend on the end_time
navidcy May 6, 2025
f139804
fixes
navidcy May 6, 2025
e6428da
update figs
navidcy May 6, 2025
0d39d05
compute std in the kernel
navidcy May 6, 2025
0159623
Merge branch 'main' into ss-nc/fix-climatoloy-experiment
navidcy May 7, 2025
0ec0bd4
add all this
simone-silvestri May 7, 2025
33a7d7f
Merge remote-tracking branch 'origin/ss/add-radiative-flux-diagnostic…
simone-silvestri May 7, 2025
b5dfad2
easier flux computation by storing the flux
simone-silvestri May 7, 2025
e1e64ba
Merge branch 'ss-nc/fix-climatoloy-experiment' of github.com:CliMA/Cl…
simone-silvestri May 7, 2025
1e048c9
improve stats
simone-silvestri May 7, 2025
2a9922b
Merge branch 'ss-nc/fix-climatoloy-experiment' of github.com:CliMA/Cl…
simone-silvestri May 7, 2025
455a12a
fix the edson stability function
simone-silvestri May 7, 2025
60969bc
some fixes
simone-silvestri May 7, 2025
ac25d0a
add some fluxes
simone-silvestri May 7, 2025
2823180
Merge branch 'main' into ss-nc/fix-climatoloy-experiment
simone-silvestri May 8, 2025
d47961f
small change to trigger docs build
simone-silvestri May 8, 2025
50861af
Update interpolate_atmospheric_state.jl
simone-silvestri May 8, 2025
d1bbd60
Merge remote-tracking branch 'origin/main' into ss-nc/fix-climatoloy-…
simone-silvestri Jun 6, 2025
2c3aaee
Merge branch 'main' into ss-nc/fix-climatoloy-experiment
simone-silvestri Jun 12, 2025
469ef02
Merge branch 'main' into ss-nc/fix-climatoloy-experiment
simone-silvestri Jul 14, 2025
a288fac
new commit
simone-silvestri Oct 8, 2025
73265e6
merge main
simone-silvestri Oct 8, 2025
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
2 changes: 1 addition & 1 deletion src/DataWrangling/DataWrangling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using KernelAbstractions: @kernel, @index
using Oceananigans.DistributedComputations
using Adapt

const dataset_defaults = Oceananigans.Defaults(FloatType=Float32)
Copy link
Member

Choose a reason for hiding this comment

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

thank you!

import Oceananigans.Fields: set!

#####
##### Downloading utilities
Expand Down
56 changes: 0 additions & 56 deletions src/DataWrangling/metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,59 +286,3 @@ function compute_native_date_range(native_dates, start_date, end_date)

return native_dates[start_idx:end_idx]
end

"""
vertical_interfaces(metadata)

Return an array with the vertical interfaces (``z``-faces) of the dataset
that `metadata` corresponds to.
"""
vertical_interfaces(metadata::Metadata{V}) where V =
error("vertical_interfaces not implemented for $V")

variable_is_three_dimensional(metadata::Metadata{V}) where V =
error("variable_is_three_dimensional not implemented for $V")

function dataset_latitude_extent end

"""
empty_field(metadata::Metadata;
architecture = CPU(),
horizontal_halo = (7, 7))

Return an empty field of `metadata` on `architecture` and with `horizontal_halo`s.
"""
function empty_field(metadata::Metadata, FT=dataset_defaults.FloatType;
architecture = CPU(),
horizontal_halo = (7, 7))

Nx, Ny, Nz, _ = size(metadata)
loc = location(metadata)
longitude = (0, 360)
latitude = dataset_latitude_extent(metadata)
TX, TY = (Periodic, Bounded)

if variable_is_three_dimensional(metadata)
TZ = Bounded
LZ = Center
z = vertical_interfaces(metadata)
halo = (horizontal_halo..., 3)
sz = (Nx, Ny, Nz)
else # the variable is two-dimensional
TZ = Flat
LZ = Nothing
z = nothing
halo = horizontal_halo
sz = (Nx, Ny)
end

grid = LatitudeLongitudeGrid(architecture, FT; halo, longitude, latitude, z,
size = sz,
topology = (TX, TY, TZ))
return Field{loc...}(grid)
end

struct Celsius end
struct Kelvin end

function dataset_temperature_units end
5 changes: 2 additions & 3 deletions src/OceanSeaIceModels/InterfaceComputations/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,5 @@ end

# Inside the solver we lose both spatial and temporal information, but the
# radiative properties have already been computed correctly
@inline net_downwelling_radiation(Qs, Qℓ, α, ϵ) = - (1 - α) * Qs - ϵ * Qℓ

@inline upwelling_radiation(T, σ, ϵ) = σ * ϵ * T^4
@inline net_absorbed_interface_radiation(Qs, Qℓ, α, ϵ) = - (1 - α) * Qs - ϵ * Qℓ
@inline emitted_longwave_radiation(T, σ, ϵ) = σ * ϵ * T^4
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ Keyword Arguments
function SimilarityTheoryFluxes(FT::DataType = Oceananigans.defaults.FloatType;
von_karman_constant = 0.4,
turbulent_prandtl_number = 1,
gustiness_parameter = 6.5,
stability_functions = edson_stability_functions(FT),
roughness_lengths = default_roughness_lengths(FT),
gustiness_parameter = 1,
stability_functions = atmosphere_ocean_stability_functions(FT),
momentum_roughness_length = MomentumRoughnessLength(FT),
temperature_roughness_length = ScalarRoughnessLength(FT),
water_vapor_roughness_length = ScalarRoughnessLength(FT),
similarity_form = LogarithmicSimilarityProfile(),
solver_stop_criteria = nothing,
solver_tolerance = 1e-8,
Expand Down Expand Up @@ -328,16 +330,16 @@ stability function for _stable_ or _unstable_ atmospheric conditions, respective
"""
@kwdef struct EdsonMomentumStabilityFunction{FT} <: AbstractStabilityFunction
ζmax :: FT = 50.0
:: FT = 0.35
:: FT = 0.7
:: FT = 0.75
:: FT = 5 / 0.35
Aᵘ :: FT = 15.0
Bᵘ :: FT = 2.0
Cᵘ :: FT = π/2
Dᵘ :: FT = 10.15
Eᵘ :: FT = 3.0
Fᵘ :: FT = π / sqrt(3)
A⁺ :: FT = 0.35
B⁺ :: FT = 0.7
C⁺ :: FT = 0.75
D⁺ :: FT = 5/0.35
A⁻ :: FT = 15.0
B⁻ :: FT = 2.0
C⁻ :: FT = π/2
D⁻ :: FT = 10.15
E⁻ :: FT = 3.0
F⁻ :: FT = π / sqrt(3)
end

@inline function stability_profile(ψ::EdsonMomentumStabilityFunction, ζ)
Expand All @@ -355,7 +357,7 @@ end

ζ⁻ = min(zero(ζ), ζ)
ζ⁺ = max(zero(ζ), ζ)
dζ = min(ζmax, * ζ⁺) # ok
dζ = min(ζmax, A⁺ * ζ⁺)

# Stability parameter for _stable_ atmospheric conditions
ψ⁺ = - B⁺ * ζ⁺ - C⁺ * (ζ⁺ - D⁺) * exp(- dζ) - C⁺ * D⁺
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.