Skip to content

Better defaults for sea_ice_simulation #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

simone-silvestri
Copy link
Collaborator

@simone-silvestri simone-silvestri commented May 22, 2025

the new interface will be

ocean = ocean_simulation(grid)
seaice = sea_ice_simulation(grid, ocean)

alternatively, to change the sea ice dynamics

ocean = ocean_simulation(grid)
dynamics = sea_ice_dynamics(grid, ocean; rheology=ElastoViscoPlasticRheology(), solver=SplitExplicitSolver(200), coriolis= ..., kwargs....)
seaice = sea_ice_simulation(grid, ocean; dynamics)

@simone-silvestri
Copy link
Collaborator Author

Requires a new version of ClimaSeaIce which I am waiting for CliMA/ClimaSeaIce.jl#73 and CliMA/ClimaSeaIce.jl#72 to release

@glwagner
Copy link
Member

What was the old interface?

@simone-silvestri
Copy link
Collaborator Author

simone-silvestri commented May 23, 2025

The old interface requires building the dynamics and the bottom boundary condition manually in the script because the ocean is not passed to sea_ice_simulation. A typical sea ice model construction looks like this:

SSS = view(ocean.model.tracers.S.data, :, :, grid.Nz)
bottom_heat_boundary_condition = IceWaterThermalEquilibrium(SSS)

SSU = view(ocean.model.velocities.u, :, :, grid.Nz)
SSV = view(ocean.model.velocities.v, :, :, grid.Nz)
coriolis = ocean.model.coriolis

τo  = SemiImplicitStress(uₑ=SSU, vₑ=SSV, Cᴰ=sea_ice_ocean_drag_coefficient)
τua = Field{Face, Center, Nothing}(grid)
τva = Field{Center, Face, Nothing}(grid)

dynamics = SeaIceMomentumEquation(grid;
                                  coriolis,
                                  top_momentum_stress = (u=τua, v=τva),
                                  bottom_momentum_stress = τo,
                                  rheology = ElastoViscoPlasticRheology(),
                                  solver = SplitExplicitSolver(150))

sea_ice = sea_ice_simulation(grid; bottom_heat_boundary_condition, dynamics, advection=WENO(order=7))

@glwagner
Copy link
Member

The old interface requires building the dynamics and the bottom boundary condition manually in the script because the ocean is not passed to sea_ice_simulation. A typical sea ice model construction looks like this:

SSS = view(ocean.model.tracers.S.data, :, :, grid.Nz)
bottom_heat_boundary_condition = IceWaterThermalEquilibrium(SSS)

SSU = view(ocean.model.velocities.u, :, :, grid.Nz)
SSV = view(ocean.model.velocities.v, :, :, grid.Nz)
coriolis = ocean.model.coriolis

τo  = SemiImplicitStress(uₑ=SSU, vₑ=SSV, Cᴰ=sea_ice_ocean_drag_coefficient)
τua = Field{Face, Center, Nothing}(grid)
τva = Field{Center, Face, Nothing}(grid)

dynamics = SeaIceMomentumEquation(grid;
                                  coriolis,
                                  top_momentum_stress = (u=τua, v=τva),
                                  bottom_momentum_stress = τo,
                                  rheology = ElastoViscoPlasticRheology(),
                                  solver = SplitExplicitSolver(150))

sea_ice = sea_ice_simulation(grid; bottom_heat_boundary_condition, dynamics, advection=WENO(order=7))

okay great, and I think it makes sense that this lives in ClimaOcean where we are doing the coupling. Possibly there will be other changes down the line to make stand-alone modeling easier with ClimaSeaIce (if that still makes sense even)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants