source: XIOS/dev/dev_trunk_omp/doc/XIOS_graph_user_guide.tex @ 1741

Last change on this file since 1741 was 1741, checked in by yushan, 5 years ago

GENERIC_TESTCASE : add doc for graph and testcase

File size: 10.0 KB
Line 
1% !TEX TS-program = pdflatex
2% !TEX encoding = UTF-8 Unicode
3% This is a simple template for a LaTeX document using the "article" class.
4% See "book", "report", "letter" for other types of document.
5
6\documentclass[11pt]{article} % use larger type; default would be 10pt
7
8\usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)
9
10%%% Examples of Article customizations
11% These packages are optional, depending whether you want the features they provide.
12% See the LaTeX Companion or other references for full information.
13
14%%% PAGE DIMENSIONS
15\usepackage{geometry} % to change the page dimensions
16\geometry{a4paper} % or letterpaper (US) or a5paper or....
17% \geometry{margin=2in} % for example, change the margins to 2 inches all round
18% \geometry{landscape} % set up the page for landscape
19%   read geometry.pdf for detailed page layout information
20
21\usepackage{graphicx} % support the \includegraphics command and options
22
23% \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
24
25%%% PACKAGES
26\usepackage{booktabs} % for much better looking tables
27\usepackage{array} % for better arrays (eg matrices) in maths
28\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
29\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
30\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
31% These packages are all incorporated in the memoir class to one degree or another...
32
33%%% HEADERS & FOOTERS
34\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
35\pagestyle{fancy} % options: empty , plain , fancy
36\renewcommand{\headrulewidth}{0pt} % customise the layout...
37\lhead{}\chead{}\rhead{}
38\lfoot{}\cfoot{\thepage}\rfoot{}
39
40%%% SECTION TITLE APPEARANCE
41\usepackage{sectsty}
42\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
43% (This matches ConTeXt defaults)
44
45%%% ToC (table of contents) APPEARANCE
46\usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
47\usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents
48\renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
49\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!
50
51\usepackage{listings}
52
53\usepackage{color}
54
55\definecolor{gray}{rgb}{0.4,0.4,0.4}
56\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
57\definecolor{cyan}{rgb}{0.0,0.6,0.6}
58
59\lstset{
60  basicstyle=\ttfamily,
61  columns=fullflexible,
62  showstringspaces=false,
63  commentstyle=\color{gray}\upshape
64}
65
66\lstdefinelanguage{XML}
67{
68  morestring=[b]",
69  moredelim=[s][\bfseries\color{Maroon}]{<}{\ },
70  moredelim=[s][\bfseries\color{Maroon}]{</}{>},
71  moredelim=[l][\bfseries\color{Maroon}]{/>},
72  moredelim=[l][\bfseries\color{Maroon}]{>},
73  morecomment=[s]{<?}{?>},
74  morecomment=[s]{<!--}{-->},
75  commentstyle=\color{DarkOliveGreen},
76  stringstyle=\color{blue},
77  identifierstyle=\color{red},
78  keywordstyle=\color{brown},
79  morekeywords={xmlns,version,type, grid, field_ref, grid_ref, id,
80  build_workflow_graph, build_workflow_graph_begin, build_workflow_graph_end}% list your attributes here
81  }
82\newcommand{\quotes}[1]{``#1''}
83\usepackage[dvipsnames]{xcolor}
84\newcommand{\visbutton}[1]{\colorbox[RGB]{92,184,92}{\color{white}{#1}}}
85%%% END Article customizations
86
87%%% The "real" document content comes below...
88
89\title{User Guide for XIOS workflow Graph}
90\author{Yushan Wang}
91%\date{} % Activate to display a given date or no date (if empty),
92         % otherwise the current date is printed
93\makeatletter         
94\def\@maketitle{
95\raggedright
96%\flushleft\includegraphics[height = 30mm]{inputs/images/logo_IPSL}
97%\flushright\includegraphics[height = 30mm]{inputs/images/logo_LSCE}\\[10ex]
98\begin{minipage}[l]{0.45\textwidth}
99\flushleft\includegraphics[height = 30mm]{inputs/images/logo_IPSL}
100\end{minipage}
101\begin{minipage}[r]{0.45\textwidth}
102\flushright\includegraphics[height = 30mm]{inputs/images/logo_LSCE}
103\end{minipage}
104\\[10ex]
105\begin{center}
106{\Huge \bfseries \sffamily \@title }\\[4ex] 
107{\Large  \@author}\\[4ex] 
108\@date\\[8ex]
109\end{center}}
110\makeatother
111
112
113\begin{document}
114\maketitle
115
116
117\section{What is the workflow graph}
118
119The workflow graph generated by XIOS shows the path of the data flux in the XIOS context. 
120It can give user an overall presentation of how the field is generated and which operations are applied.
121It is often not easy to track the data dependency from the \verb|xml| file. That's why a graphic representation is more user-friendly.
122
123\begin{figure}[ht]
124\centering
125\includegraphics[scale=0.2]{inputs/images/graph.png}
126\end{figure}
127\subsection{Node}
128In the workflow graph, a node represents a XIOS filter. We have 7 categories of filters:
129\begin{itemize}
130    \item source filter: when the field data is received from model or read from netcdf file
131    \item pass through filter: when having a field reference
132    \item arithmetic filter: when arithmetic operations are performed on the field
133    \item temporal filter: when the field has a temporal operation (\textit{e.g.} average, maximum, minimum, ...)
134    \item spatial transform filter: when the field has a spatial transform applied upon (\textit{e.g.} zoom, interpolate, ...)
135    \item file write filter: when the field data is written to a netcdf file
136    \item store filter: when the field data is send back to model
137\end{itemize}
138
139\subsection{Edge}
140Edge in the workflow graph represents the field after the filter is applied.
141
142
143
144\section{Enable the workflow graph}
145
146The field attribute \verb|build_workflow_graph| is used to control the workflow graph.
147
148\begin{lstlisting}[language=XML]
149    <field id="field" grid_ref="grid" build_workflow_graph="true" />
150\end{lstlisting}
151
152\subsection{Heritage by field referecing}
153
154\begin{lstlisting}[language=XML]
155    <field id="field_A" grid="grid" build_workflow_graph="true" />
156    <field id="field_B" field_ref="field_A" />
157\end{lstlisting}
158
159\subsection{Heritage by arithmetic operations}
160
161\begin{lstlisting}[language=XML]
162    <field id="field_A" grid="grid" build_workflow_graph="true" />
163    <field id="field_B" field_ref="field_A" > field_A*2 </field>
164\end{lstlisting}
165
166
167
168
169\section{Visualization of workflow graph}
170
171\begin{figure}[ht]
172\centering
173\includegraphics[scale=0.4]{inputs/images/graph_init}
174\caption{Start state of the Visualization}
175\end{figure}
176
177The workflow graph can be viewed through the \verb|graph.html| script located in the XIOS
178folder. The graph file \verb|graph_data.json| is stored in the same folder as the \verb|iodef.xml| file
179which is used for configure the simulation.
180Choose the graph file to start the Visualization by cliking the button \colorbox[RGB]{66,139,202}{\color{white}{Load a JSON XIOS file}}.
181Several buttons are set to allow user to visualize the graph interactively.
182
183\subsection{Enable/Disable all}
184The graph is hidden at the beginning. \visbutton{Enable all} will show the whole graph and \visbutton{Disable all} is used to hide the whole graph
185
186\subsection{Show/Hide node}
187The \visbutton{Hide node} buttons allow user to temporarily hide a node and its edges. The node's position is kept and user can still click on it
188to show the node and its edges by the \visbutton{Show node} button.
189
190\subsection{Enable parents/children}
191These buttons can show the direct parents or children of a given node.
192
193\subsection{Enable/Disable all parents}
194These buttons are used to show/hide all parent nodes and edges of a given node.
195
196\subsection{Enable/Disable all children}
197These buttons are used to show/hide all child nodes and edges of a given node.
198
199\subsection{Enable input}
200\visbutton{Enable input} shows all input nodes of the graph. The input nodes are
201often, if not always, the source filters: data received from the model or read
202from a netcdf file.
203
204\subsection{Enable output}
205\visbutton{Enable output} shows all output nodes of the graph. The output nodes
206are either the file writer filter: data written to a netcdf file; either the store
207filter: data send back to model.
208
209\subsection{Enable last temporal input}
210Very often, a field is generated after many iterations. Showing all these iterations
211can be redundant and slow down the browser. That's why the \visbutton{Enable last
212temporal input} button is useful because it can show us only the last iteration before
213the flux gets to the current filter node.
214
215\subsection{Show subgraph}
216\visbutton{Show subgraph} button is very useful because it can focus on a given node
217and show all its parents and children nodes and edges, and at the same time hide all
218irrelevant elements to the given node.
219
220
221\section{Hover message in the workflow graph}
222A hover message is shown for each filter and field. For example, the hover message for
223a file writer filter gives all attributes of the output file and the written field.
224
225
226\section{Time control of workflow graph}
227
228
229Attributes \verb|build_workflow_graph_start| and \verb|build_workflow_graph_end| are
230used to control the starting and end time of the workflow graph.
231
232\begin{lstlisting}[language=XML]
233    <field id="field" grid_ref="grid" build_workflow_graph="true"
234                                      build_workflow_graph_begin="3ts"
235                                      build_workflow_graph_end="5ts" />
236\end{lstlisting}
237
238In this example, the graph will only include information between the 3rd and 5th timestep.
239These attributes are not madatory. If \verb|build_workflow_graph_start| is not define, the graph will start to record from the first iteration.
240Similarly, the defualt value of \verb|build_workflow_graph_end| is the last iteration of the simulation.
241
242In case that two values of the same attribute are defined, we take the largest range.
243\begin{lstlisting}[language=XML]
244    <field id="field_A"  build_workflow_graph="true"
245                         build_workflow_graph_begin="3ts"
246                         build_workflow_graph_end="5ts" />
247
248    <field id="field_B"  field_ref="field_A" build_workflow_graph="true"
249                         build_workflow_graph_end="4ts" />
250\end{lstlisting} 
251
252In this example, \verb|field_B| will have attributes \verb|build_workflow_graph_start="1ts"| and \verb|build_workflow_graph_end="5ts"|
253\end{document}
Note: See TracBrowser for help on using the repository browser.