Skip to content

valentinaschueller/clima-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toy Examples for ClimaCoupler.jl

This repository contains coupled (toy) problems and coupling setups that are representative of and relevant for atmosphere-ocean-ice coupling. The idea is to explicitly make use of the ClimaCoupler.jl API for these problems.

To run the code:

> julia --project
> ]instantiate
# return to REPL
> using clima_playground
> coupled_heat_equations()

This solves the coupled heat equation on the time interval $t\in[0:3600] s$ with coupling time step $\Delta t_{cpl}=100 s$ and only one iteration per coupling time step.

Simulation parameters (physical and numerical) can be changed by passing keyword arguments, e.g.,

coupled_heat_equations(iterations=10, Δt_min=10, t_max=1000, Δt_cpl=1000)

If you want to use the parallel Schwarz iteration, run:

coupled_heat_equations(iterations=10, parallel=true)

To activate sea ice, use a nonzero ice area fraction, e.g., a_I=0.5. There are three implemented ice models:

  • :constant: ice thickness and temperature remain constant
  • :temperature_feedback: constant ice thickness, dynamic ice temperature
  • :thickness_feedback: dynamic ice thickness and temperature (the 0-layer model from Semtner, 1976)

The directory experiments contains scripts for plotting analytical and numerical results with this code.

  • kjellson_thesis_plots.jl creates plots resembling figures from Hanna Kjellson's MSc thesis.
  • plot_solution.jl creates plots that show the solution of a simulation over time or space
  • plot_ice.jl contains plots for when the dynamic sea ice component is active
  • semtner_testcase.jl runs a validation test case for the ice model based on (Semtner, 1976)

About

Toy Examples for ClimaCoupler.jl

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages