Skip to content

Commit

Permalink
Use circo to display composition diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
lukem12345 authored Dec 4, 2024
1 parent ca35514 commit a0a29fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/src/ebm_melt/ebm_melt.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ice_dynamics = apex(oapply(ice_dynamics_composition_diagram,
[Open(halfar_eq2, [:Γ,:n]),
Open(glens_law, [:Γ,:n])]))
to_graphviz(ice_dynamics_composition_diagram)
draw_composition(ice_dynamics_composition_diagram)
```

The composition pattern tells you how to couple the variables and introduces namespaces that we will use later when supplying initial conditions.
Expand Down Expand Up @@ -166,7 +166,7 @@ budyko_sellers = apex(oapply(budyko_sellers_composition_diagram,
Open(heat_transfer, [:Tₛ, :HT, :cosϕᵖ]),
Open(insolation, [:Q, :cosϕᵖ])]))
to_graphviz(budyko_sellers_composition_diagram)
draw_composition(budyko_sellers_composition_diagram)
```

Our full model can then be composed by adding terms for melting of water. We will assume that the meltwater is transported by diffusion because the transport of meltwater is so much faster than the melting process itself. If you wanted to increase the physical realism of this model, using a different model of melting and water transport would be a good place to start.
Expand Down Expand Up @@ -194,7 +194,7 @@ budyko_sellers_halfar_water_composition_diagram = @relation () begin
halfar(A, h, melt)
end
to_graphviz(budyko_sellers_halfar_water_composition_diagram)
draw_composition(budyko_sellers_halfar_water_composition_diagram)
```

``` @example DEC
Expand Down Expand Up @@ -256,7 +256,7 @@ u₀ = ComponentArray(
h = h₀,
melting_water = water)
# the underscore sparate words are the namespaces that were introduced with oapply.
# The underscore-separated words are the namespaces that were introduced by oapply.
constants_and_parameters = (
budyko_sellers_absorbed_radiation_α = α,
budyko_sellers_outgoing_radiation_A = A,
Expand All @@ -271,7 +271,6 @@ constants_and_parameters = (
melting_Dₕ₂ₒ = Dₕ₂ₒ)
# Define how symbols map to Julia functions
function generate(sd, my_symbol; hodge=GeometricHodge())
op = @match my_symbol begin
:♯ => begin
Expand Down

0 comments on commit a0a29fa

Please sign in to comment.