From 0866f88bb3fa2a7c030c900bcb4312f2c7477f2a Mon Sep 17 00:00:00 2001 From: Simone Silvestri <33547697+simone-silvestri@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:20:37 +0100 Subject: [PATCH] some name changes --- .../SeaIceThermodynamics.jl | 2 +- .../SlabThermodynamics/SlabThermodynamics.jl | 2 +- src/sea_ice_model.jl | 20 +++++++++---------- src/time_stepping.jl | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/SeaIceThermodynamics/SeaIceThermodynamics.jl b/src/SeaIceThermodynamics/SeaIceThermodynamics.jl index edf1267..5b0bb6c 100644 --- a/src/SeaIceThermodynamics/SeaIceThermodynamics.jl +++ b/src/SeaIceThermodynamics/SeaIceThermodynamics.jl @@ -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) diff --git a/src/SeaIceThermodynamics/SlabThermodynamics/SlabThermodynamics.jl b/src/SeaIceThermodynamics/SlabThermodynamics/SlabThermodynamics.jl index 4cadf7e..4c14bbb 100644 --- a/src/SeaIceThermodynamics/SlabThermodynamics/SlabThermodynamics.jl +++ b/src/SeaIceThermodynamics/SlabThermodynamics/SlabThermodynamics.jl @@ -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 diff --git a/src/sea_ice_model.jl b/src/sea_ice_model.jl index 0596ae2..bc7c848 100644 --- a/src/sea_ice_model.jl +++ b/src/sea_ice_model.jl @@ -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 @@ -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()) @@ -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, @@ -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) @@ -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') @@ -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, diff --git a/src/time_stepping.jl b/src/time_stepping.jl index 4989200..18fd29a 100644 --- a/src/time_stepping.jl +++ b/src/time_stepping.jl @@ -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,