Skip to content

Commit

Permalink
some name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri committed Jul 14, 2024
1 parent 131873c commit 0866f88
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/SeaIceThermodynamics/SeaIceThermodynamics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ end
return ρℓ * ℒ₀ + (ρℓ * cℓ - ρᵢ * cᵢ) * (T - T₀)
end

@inline external_top_heat_flux(sea_ice_thermodynamics, top_heat_flux) = top_heat_flux
@inline external_top_heat_flux(ice_thermodynamics, top_heat_flux) = top_heat_flux

# Fallback for no thermodynamics
@inline thickness_thermodynamic_tendency(i, j, grid, args...) = zero(grid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Oceananigans.TimeSteppers: time_step!, update_state!
import Oceananigans.Utils: prettytime

include("slab_heat_and_tracer_fluxes.jl")
include("slab_sea_ice_thermodynamics.jl")
include("slab_ice_thermodynamics.jl")

end # module

20 changes: 10 additions & 10 deletions src/sea_ice_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ struct SeaIceModel{GR, TD, D, CL, TS, U, T, IT, IC, STF, SMS, A} <: AbstractMode
ice_thickness :: IT
ice_concentration :: IC
# Thermodynamics
sea_ice_thermodynamics :: TD
ice_thermodynamics :: TD
# Dynamics
sea_ice_dynamics :: D
ice_dynamics :: D
# External boundary conditions
external_heat_fluxes :: STF
external_momentum_stresses :: SMS
Expand All @@ -34,8 +34,8 @@ function SeaIceModel(grid;
top_momentum_stress = nothing, # Fix when introducing dynamics
tracers = (),
boundary_conditions = NamedTuple(),
sea_ice_thermodynamics = SlabSeaIceThermodynamics(grid),
sea_ice_dynamics = nothing)
ice_thermodynamics = SlabSeaIceThermodynamics(grid),
ice_dynamics = nothing)

if isnothing(velocities)
velocities = (u = ZeroField(), v=ZeroField(), w=ZeroField())
Expand All @@ -52,7 +52,7 @@ function SeaIceModel(grid;
ice_salinity = field((Center, Center, Nothing), ice_salinity, grid)
tracers = merge(tracers, (; S = ice_salinity))

top_heat_flux = external_top_heat_flux(sea_ice_thermodynamics, top_heat_flux)
top_heat_flux = external_top_heat_flux(ice_thermodynamics, top_heat_flux)

# Package the external fluxes and boundary conditions
external_heat_fluxes = (top = top_heat_flux,
Expand All @@ -65,8 +65,8 @@ function SeaIceModel(grid;
tracers,
ice_thickness,
ice_concentration,
sea_ice_thermodynamics,
sea_ice_dynamics,
ice_thermodynamics,
ice_dynamics,
external_heat_fluxes,
top_momentum_stress,
advection)
Expand All @@ -92,8 +92,8 @@ function Base.show(io::IO, model::SIM)

print(io, "SeaIceModel{", typeof(arch), ", ", gridname, "}", timestr, '\n')
print(io, "├── grid: ", summary(model.grid), '\n')
print(io, "├── sea ice thermodynamics: ", summary(model.sea_ice_thermodynamics), '\n')
print(io, "├── sea ice dynamics: ", summary(model.sea_ice_dynamics), '\n')
print(io, "├── sea ice thermodynamics: ", summary(model.ice_thermodynamics), '\n')
print(io, "├── sea ice dynamics: ", summary(model.ice_dynamics), '\n')
print(io, "├── advection: ", summary(model.advection), '\n')
print(io, "└── external_heat_fluxes: ", '\n')
print(io, " ├── top: ", flux_summary(model.external_heat_fluxes.top, ""), '\n')
Expand All @@ -108,7 +108,7 @@ fields(model::SIM) = merge((; h = model.ice_thickness,
= model.ice_concentration),
model.tracers,
model.velocities,
fields(model.sea_ice_thermodynamics))
fields(model.ice_thermodynamics))

# TODO: make this correct
prognostic_fields(model::SIM) = merge((; h = model.ice_thickness,
Expand Down
2 changes: 1 addition & 1 deletion src/time_stepping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function time_step!(model::SIM, Δt; callbacks=nothing)
model.velocities,
model.advection,
model.ice_concentration,
model.sea_ice_thermodynamics,
model.ice_thermodynamics,
model.external_heat_fluxes.top,
model.external_heat_fluxes.bottom,
nothing, #model.forcing.h,
Expand Down

0 comments on commit 0866f88

Please sign in to comment.