tpdd-model-flowchart.tex - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
(HTM) git clone git://src.adamsgaard.dk/pism
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tpdd-model-flowchart.tex (3021B)
---
1 \documentclass{standalone}
2 \usepackage{amsmath}
3 \usepackage{tikz}
4 \usetikzlibrary{chains,arrows,shapes}
5
6 \newcommand{\PDD}{\ensuremath{\text{PDD}}}
7 \newcommand{\Hs}{\ensuremath{H_{\text{snow}}}}
8 \newcommand{\Ms}{\ensuremath{\text{Melt}_{\text{snow}}}}
9 \newcommand{\Mi}{\ensuremath{\text{Melt}_{\text{ice}}}}
10
11 % compile with pdflatex, then run
12 % convert -density 300 pdd-model-flowchart.pdf -quality 90 pdd-model-flowchart.png
13
14 \begin{document}
15 \begin{tikzpicture}[ auto, thick, font=\small, node distance=3mm,
16 block/.style={rectangle, rounded corners, draw, fill=gray!5, text width=2in, text centered,
17 minimum width=2in, minimum height=1cm},
18 big block/.style={block, text width=3in},
19 decision/.style={diamond, draw, fill=gray!5},
20 line/.style={draw, -latex'},
21 start chain=1 going below, every node/.style={on chain},
22 every join/.style={-latex'},
23 ]
24
25 \node [big block] {Compute snow accumulation \mbox{``Accumulation''}, discarding rain};
26 \node [big block, join] {Compute the number of \mbox{positive} degree days (\PDD) };
27 \node [big block, join] {Update snow depth \mbox{$\Hs \gets \Hs + \text{Accumulation}$}};
28 \node [big block, join] {Compute maximum possible snow melt \mbox{$\Ms^{\text{max}} := \PDD\times F_{s}$}};
29 \node (melt all snow) [decision, join] {$\Ms^{\text{max}} > \Hs?$};
30
31 \begin{scope}[start branch=yes, node distance=4em]
32 \node (ice melt case) [block, on chain=going right] {\mbox{Melt all available snow:} $\Ms := \Hs$};
33 \end{scope}
34 \begin{scope}[start branch=no, node distance=4em]
35 \node (no ice melt case) [block, on chain=going left] {Melt some of the snow: \mbox{$\Ms := \Ms^{\text{max}}$}};
36 \end{scope}
37
38 \node (excess pdds) [big block] {$\PDD_{\text{excess}} := \PDD - \Ms / F_{s}$};
39 \node [big block, join] {Melt some ice: \mbox{$\Mi := \PDD_{\text{excess}} \times F_{i}$}};
40 \node (refreeze ice) [decision, join] {Refreeze melted ice?};
41
42 \begin{scope}[start branch=yes, node distance=4em]
43 \node (refreeze both) [block, on chain=going right] {Refreeze is \mbox{$(\Ms + \Mi) \times \theta_{\text{refreeze}}$}};
44 \end{scope}
45
46 \begin{scope}[start branch=no, node distance=4em]
47 \node (refreeze snow) [block, on chain=going left] {Refreeze is $\Ms \times \theta_{\text{refreeze}}$};
48 \end{scope}
49
50 \node (runoff) [big block] {$\text{Runoff} := \Ms + \Mi - \text{Refreeze}$};
51 \node [big block, join] {Compute surface mass balance: $\text{SMB} := \text{Accumulation} - \text{Runoff}$};
52 \node [big block, join] {Update snow depth: $\Hs \gets \Hs - \Ms$};
53 % special edges:
54 \path[line] (melt all snow) -- node {Yes} (ice melt case);
55 \path[line] (melt all snow) -- node {No} (no ice melt case);
56 \path[line] (ice melt case) |- (excess pdds);
57 \path[line] (no ice melt case) |- (excess pdds);
58 \path[line] (refreeze ice) -- node {Yes} (refreeze both);
59 \path[line] (refreeze ice) -- node {No} (refreeze snow);
60 \path[line] (refreeze both) |- (runoff);
61 \path[line] (refreeze snow) |- (runoff);
62 \end{tikzpicture}
63 \end{document}