Skip to content
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

Implement a few ice-ocean examples #18

Merged
merged 23 commits into from
Oct 4, 2023
Merged

Implement a few ice-ocean examples #18

merged 23 commits into from
Oct 4, 2023

Conversation

glwagner
Copy link
Member

@glwagner glwagner commented Sep 2, 2023

This PR implements a few simple ice-ocean examples in the new directory validation/ice_ocean_model/. That directory also contains a prototype implementation of IceOceanModel, an abstraction for a coupled-ice-ocean model that contains an ocean simulation, ice simulation, and coupling parameterizations.

The prototype IceOceanModel works on GPUs and implements the "ice bath" parameterization for ice-ocean heat fluxes.

Closes #17

@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Attention: 144 lines in your changes are missing coverage. Please review.

Comparison is base (d9cc1da) 26.81% compared to head (7986b0e) 22.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
- Coverage   26.81%   22.80%   -4.02%     
==========================================
  Files           7       11       +4     
  Lines         261      307      +46     
==========================================
  Hits           70       70              
- Misses        191      237      +46     
Files Coverage Δ
src/SlabSeaIceModels/SlabSeaIceModels.jl 100.00% <100.00%> (ø)
src/ClimaSeaIce.jl 6.66% <0.00%> (ø)
...malBoundaryConditions/ThermalBoundaryConditions.jl 50.00% <0.00%> (-50.00%) ⬇️
...ryConditions/bottom_thermal_boundary_conditions.jl 0.00% <0.00%> (ø)
...ndaryConditions/top_thermal_boundary_conditions.jl 0.00% <0.00%> (ø)
...rc/SlabSeaIceModels/slab_heat_and_tracer_fluxes.jl 0.00% <0.00%> (ø)
src/ThermalBoundaryConditions/boundary_fluxes.jl 0.00% <0.00%> (ø)
...SlabSeaIceModels/slab_tendency_kernel_functions.jl 0.00% <0.00%> (ø)
src/SlabSeaIceModels/slab_time_stepping.jl 0.00% <0.00%> (ø)
src/SlabSeaIceModels/slab_sea_ice_model.jl 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glwagner
Copy link
Member Author

glwagner commented Sep 6, 2023

Here's a plot from an "ocean mixed layer" case in which clear sky radiative emission with no incoming radiation cools the ocean surface (and then the ice surface) during the first 40 days. Then we add a constant heat flux that overcomes the outgoing radiation, which melts the ice and warms the ocean once the ice is melted.

image

This model is relatively simple; since there are no horizontal heat fluxes in the ocean, there is no ice-ocean heat flux while the ocean is ice-covered. The ocean gets saltier when ice is forming, and that salt is returned to the ocean when the ice melts.

@glwagner
Copy link
Member Author

glwagner commented Sep 6, 2023

Here's a similar example as above, but replacing the slab ocean with a column model. Convection mixes the column to the bottom during the initial cooling, so the column behaves similarly as the slab. However, during the warming phase the heat and salinity melt are trapped at the surface, so the ocean surface warms much more.

freezing_and_melting.mp4

@glwagner
Copy link
Member Author

glwagner commented Sep 6, 2023

The coupled cases required a substantial amount of code to implement a coupled model abstraction. I'm going to move the coupled model abstraction to ClimaOcean, so when we merge this PR the example will depend on ClimaOcean. Possibly we want to have a simple coupled model implementation that is independent of ClimaOcean --- perhaps a slab freshwater ocean, so we can ignore salinity fluxes.

@glwagner
Copy link
Member Author

glwagner commented Oct 4, 2023

A few more examples...

Baroclinic ice cube

baroclinic_ice_cube.mp4

Salty baroclinic ice cube

salty_baroclinic_ice_cube.mp4

@navidcy
Copy link
Collaborator

navidcy commented Oct 4, 2023

why these examples are not part of the docs? are they computationally intense?

@glwagner
Copy link
Member Author

glwagner commented Oct 4, 2023

why these examples are not part of the docs? are they computationally intense?

Yes, like 256^3 and running on GPU.

@glwagner
Copy link
Member Author

glwagner commented Oct 4, 2023

They also use IceOceanModel which is not part of the source code. IceOceanModel is prototyped here, but will be moved to ClimaOcean. Its' not ready for docs.

@glwagner glwagner requested a review from navidcy October 4, 2023 18:35
Copy link
Collaborator

@navidcy navidcy left a comment

Choose a reason for hiding this comment

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

these examples look sweet!

@glwagner glwagner merged commit dea9bf9 into main Oct 4, 2023
7 of 8 checks passed
@glwagner glwagner deleted the glw/one-point-ocean branch October 4, 2023 18:47
ice.Δt = Δt
ocean.Δt = Δt

fill_halo_regions!(h)
Copy link
Collaborator

Choose a reason for hiding this comment

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

where is this h coming from?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, there should be an

h = ice.model.ice_thickness

before.

it's taking it from the global scope here so it just happened to work.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed here #20

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.

Implement an idealized coupled ice-ocean column model with SlabSeaIceModel
3 participants