CliMA / ClimaSeaIce.jl

🧊 Coupled and stand-alone simulations of sea ice for Earth system modeling
https://clima.github.io/ClimaSeaIceDocumentation/dev/
Apache License 2.0
15 stars 1 forks source link

Implement a few ice-ocean examples #18

Closed glwagner closed 12 months ago

glwagner commented 1 year ago

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[bot] commented 1 year ago

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 ```diff @@ 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](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA) | Coverage Δ | | |---|---|---| | [src/SlabSeaIceModels/SlabSeaIceModels.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1NsYWJTZWFJY2VNb2RlbHMvU2xhYlNlYUljZU1vZGVscy5qbA==) | `100.00% <100.00%> (ø)` | | | [src/ClimaSeaIce.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL0NsaW1hU2VhSWNlLmps) | `6.66% <0.00%> (ø)` | | | [...malBoundaryConditions/ThermalBoundaryConditions.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1RoZXJtYWxCb3VuZGFyeUNvbmRpdGlvbnMvVGhlcm1hbEJvdW5kYXJ5Q29uZGl0aW9ucy5qbA==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: | | [...ryConditions/bottom\_thermal\_boundary\_conditions.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1RoZXJtYWxCb3VuZGFyeUNvbmRpdGlvbnMvYm90dG9tX3RoZXJtYWxfYm91bmRhcnlfY29uZGl0aW9ucy5qbA==) | `0.00% <0.00%> (ø)` | | | [...ndaryConditions/top\_thermal\_boundary\_conditions.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1RoZXJtYWxCb3VuZGFyeUNvbmRpdGlvbnMvdG9wX3RoZXJtYWxfYm91bmRhcnlfY29uZGl0aW9ucy5qbA==) | `0.00% <0.00%> (ø)` | | | [...rc/SlabSeaIceModels/slab\_heat\_and\_tracer\_fluxes.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1NsYWJTZWFJY2VNb2RlbHMvc2xhYl9oZWF0X2FuZF90cmFjZXJfZmx1eGVzLmps) | `0.00% <0.00%> (ø)` | | | [src/ThermalBoundaryConditions/boundary\_fluxes.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1RoZXJtYWxCb3VuZGFyeUNvbmRpdGlvbnMvYm91bmRhcnlfZmx1eGVzLmps) | `0.00% <0.00%> (ø)` | | | [...SlabSeaIceModels/slab\_tendency\_kernel\_functions.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1NsYWJTZWFJY2VNb2RlbHMvc2xhYl90ZW5kZW5jeV9rZXJuZWxfZnVuY3Rpb25zLmps) | `0.00% <0.00%> (ø)` | | | [src/SlabSeaIceModels/slab\_time\_stepping.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1NsYWJTZWFJY2VNb2RlbHMvc2xhYl90aW1lX3N0ZXBwaW5nLmps) | `0.00% <0.00%> (ø)` | | | [src/SlabSeaIceModels/slab\_sea\_ice\_model.jl](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA#diff-c3JjL1NsYWJTZWFJY2VNb2RlbHMvc2xhYl9zZWFfaWNlX21vZGVsLmps) | `0.00% <0.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/CliMA/ClimaSeaIce.jl/pull/18/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CliMA)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

glwagner commented 1 year ago

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 commented 1 year ago

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.

https://github.com/CliMA/ClimaSeaIce.jl/assets/15271942/69d639ce-9a1b-471c-aedf-4ff1b7c31d93

glwagner commented 1 year ago

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 commented 12 months ago

A few more examples...

Baroclinic ice cube

https://github.com/CliMA/ClimaSeaIce.jl/assets/15271942/c0bff019-3c78-4e3c-a272-475e2356fa51

Salty baroclinic ice cube

https://github.com/CliMA/ClimaSeaIce.jl/assets/15271942/302ad9ca-f133-446a-b6a1-c0ff73cf17a6

navidcy commented 12 months ago

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

glwagner commented 12 months ago

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

Yes, like 256^3 and running on GPU.

glwagner commented 12 months ago

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.