source: trunk/SRC/Documentation/xmldoc/firststeps.xml @ 176

Last change on this file since 176 was 176, checked in by smasson, 18 years ago

Update xml documentation files

  • Property svn:keywords set to Id
File size: 34.3 KB
Line 
1<?xml version='1.0' encoding='iso-8859-1'?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
4[
5<!ENTITY promptidl "idl&gt;">
6<!ENTITY numb1 '<inlinemediaobject><imageobject><imagedata fileref="images/callouts/1.png?format=raw" format="PNG"/></imageobject><textobject><phrase>1</phrase></textobject></inlinemediaobject>'>
7<!ENTITY numb2 '<inlinemediaobject><imageobject><imagedata fileref="images/callouts/2.png?format=raw" format="PNG"/></imageobject><textobject><phrase>2</phrase></textobject></inlinemediaobject>'>
8<!ENTITY showfig '<inlinemediaobject><imageobject><imagedata fileref="images/showfig.png?format=raw" format="PNG"/></imageobject><textobject><phrase>show result</phrase></textobject></inlinemediaobject>'>
9]>
10
11<!--
12instructions to create html file
13xsltproc ?-?-param  section.autolabel 1 -output firststep.html /sw/share/xml/xsl/docbook-xsl/xhtml/docbook.xsl firststep.xml
14xsltproc -output firststep.html /sw/share/xml/xsl/docbook-xsl/xhtml/docbook.xsl firststep.xml
15xsltproc  /sw/share/xml/xsl/docbook-xsl/xhtml/chunk.xsl  firststep.xml
16xsltproc ?-?-param  section.autolabel 1 /sw/share/xml/xsl/docbook-xsl/xhtml/chunk.xsl firststep.xml
17
18wget http://www.lodyc.jussieu.fr/~smasson/japon.html
19curl -O  http://www.lodyc.jussieu.fr/~smasson/japon.html
20-->
21
22<!--
23module :
24first steps with SAXO...
25
26source :
27./SRC/Documentation/xmldoc/firststeps.xml
28
29-->
30<article lang="en">
31  <title>
32    First steps with <application>SAXO</application>
33  </title>
34 
35  <articleinfo>
36    <authorgroup>
37      <author><firstname>Sébastien</firstname> <surname>Masson</surname> <email>Sebastien.Masson_at_locean-ipsl.upmc.fr</email></author>
38      <author><firstname>Françoise</firstname> <surname>Pinsard</surname> <email>Francoise.Pinsard_at_locean-ipsl.upmc.fr</email></author>
39    </authorgroup>
40    <keywordset>
41      <keyword>IDL</keyword>
42      <keyword>SAXO</keyword>
43    </keywordset>
44    <revhistory>
45      <revision>
46        <revnumber>0.0</revnumber>
47        <date>29 July 2005</date>
48        <revremark>First draft</revremark>
49      </revision>
50      <revision>
51        <revnumber>0.1</revnumber>
52        <date>29 August 2005</date>
53        <revremark>last Japanese version!</revremark>
54      </revision>
55      <revision>
56        <revnumber>0.2</revnumber>
57        <date>May 2006</date>
58        <revremark>split with getsaxo</revremark>
59      </revision>
60     </revhistory> 
61     <pubdate>$Id$</pubdate>
62  </articleinfo>
63 
64
65 
66<sect1 id="beforefirststeps">
67<title>Before this</title>
68<para>
69In this document, we supposed that you followed <ulink url="getsaxo.html">Get SAXO</ulink> recommandations.
70</para>
71</sect1>
72
73  <sect1 id="first_plots">
74    <title>
75      First plots...
76    </title>
77    <sect2 id="start_with_init">
78      <title>
79        Start IDL session: <userinput><command>@init</command></userinput>
80      </title>
81      <para>
82        Each IDL session using <application>SAXO</application> must always start with: <prompt>&promptidl;</prompt> <userinput><command>@init</command></userinput>.     
83      </para>
84      <para>
85        <emphasis>The @ is equivalent to an include. It is used to execute a set of IDL commands that will be directly executed without any compilation (as it is the case for a procedure or a function). All variables defined and used in the @... file will still be accessible after the execution of the @... is finished (which is not the case for procedures and functions that ends with the return instruction).</emphasis>
86        <screen format="linespecific">
87  <prompt>$</prompt> <userinput><command>cd</command> <filename class="directory"><envar>${HOME}</envar>/My_IDL/</filename></userinput>
88  <prompt>$</prompt> <userinput><command>idl</command></userinput>
89  <computeroutput>IDL Version 6.0, Mac OS X (darwin ppc m32). (c) 2003, Research Systems, Inc.</computeroutput>
90  <computeroutput>Installation number: 35411.</computeroutput>
91  <computeroutput>Licensed for personal use by Jean-Philippe BOULANGER only.</computeroutput>
92  <computeroutput>All other use is strictly prohibited.</computeroutput>
93  <prompt>&promptidl;</prompt> <userinput><command>@init</command></userinput>
94  <computeroutput>% Compiled module: KEEP_COMPATIBILITY.</computeroutput>
95  <computeroutput>% Compiled module: FIND.</computeroutput>
96  <computeroutput>% Compiled module: PATH_SEP.</computeroutput>
97  <computeroutput>% Compiled module: STRSPLIT.</computeroutput>
98  <computeroutput>% Compiled module: DEF_MYUNIQUETMPDIR.</computeroutput>
99  <computeroutput>We forget the compatibility with the old version</computeroutput>
100  <computeroutput>% Compiled module: DEMOMODE_COMPATIBILITY.</computeroutput>
101  <computeroutput>% Compiled module: ISADIRECTORY.</computeroutput>
102  <computeroutput>% Compiled module: LCT.</computeroutput>
103  <computeroutput>% Compiled module: RSTRPOS.</computeroutput>
104  <computeroutput>% Compiled module: REVERSE.</computeroutput>
105  <computeroutput>% Compiled module: STR_SEP.</computeroutput>
106  <computeroutput>% Compiled module: LOADCT.</computeroutput>
107  <prompt>&promptidl;</prompt>
108        </screen>
109        As an IDL session using <application>SAXO</application> must always start with <prompt>&promptidl;</prompt> <userinput><command>@init</command></userinput>, it could be convenient to define the environment variable <envar>IDL_STARTUP</envar> to <filename><envar>${HOME}</envar>/My_IDL/init.pro</filename>. In that way, <filename>init.pro</filename> will automatically been executed when starting IDL. This can be done with the following command:
110      <variablelist>
111        <varlistentry><term><command>csh</command></term>
112        <listitem><screen><prompt>$</prompt> <userinput><command>setenv</command> <envar>IDL_STARTUP</envar> <filename><envar>${HOME}</envar>/My_IDL/init.pro</filename></userinput></screen></listitem>
113        </varlistentry>
114        <varlistentry><term><command>ksh</command></term>
115        <listitem><screen><prompt>$</prompt> <userinput><command>export</command> <envar>IDL_STARTUP</envar>=<filename><envar>${HOME}</envar>/My_IDL/init.pro</filename></userinput></screen></listitem>
116        </varlistentry>
117      </variablelist>
118      </para>
119 
120     
121    </sect2>
122    <sect2 id="basic_plots">
123      <title>
124        basic plots...
125      </title>
126      <sect3 id="basic_splot">
127      <title>
128        splot
129      </title>
130
131      <para>
132        <screenco>
133          <areaspec>
134            <area id="findgen" coords='2'/>
135          </areaspec>
136        <screen format="linespecific">
137   <prompt>&promptidl;</prompt> <userinput><command>n = 10</command></userinput>
138   <prompt>&promptidl;</prompt> <userinput><command>y = findgen(n)</command></userinput> &numb1;
139   <prompt>&promptidl;</prompt> <userinput><command>plot, y</command></userinput> <ulink url="figpng/basic_plot.png?format=raw">&showfig;</ulink>
140        </screen>
141          <calloutlist>
142            <callout arearefs="findgen">
143              <para>
144                <command>findgen</command> stands for
145<emphasis role="bold">f</emphasis>loat <emphasis role="bold">ind</emphasis>ex <emphasis role="bold">gen</emphasis>erator.
146                <screen format="linespecific">
147  <prompt>&promptidl;</prompt> <userinput><command>print, findgen(6)</command></userinput>
148  <computeroutput>      0.00000      1.00000      2.00000      3.00000      4.00000      5.00000</computeroutput>
149                </screen>
150              </para> 
151            </callout>
152          </calloutlist>
153        </screenco>
154     </para>
155     
156      <para>
157        Using IDL <command>plot</command> command is quite inconvenient to save the figure as a postscript. In addition, positioning the figure on the window/page by using <varname>!p.position</varname>, <varname>!p.region</varname> and <varname>!p.multi</varname> is often a nightmare. That's why we developed <command>splot</command> (like super-plot) which can be used in the same way as plot but is much more convenient to make postscript and position the figure.
158        <screen format="linespecific">
159  <prompt>&promptidl;</prompt> <userinput><command>splot, y</command></userinput> <ulink url="figpng/basic_splot1.png?format=raw">&showfig;</ulink>
160  <computeroutput>% Compiled module: SPLOT.</computeroutput>
161  <computeroutput>% Compiled module: REINITPLT.</computeroutput>
162  <computeroutput>% Compiled module: PLACEDESSIN.</computeroutput>
163  <computeroutput>% Compiled module: CALIBRE.</computeroutput>
164  <computeroutput>% Compiled module: GIVEWINDOWSIZE.</computeroutput>
165  <computeroutput>% Compiled module: GET_SCREEN_SIZE.</computeroutput>
166  <computeroutput>% Compiled module: TERMINEDESSIN.</computeroutput>
167        </screen>
168        Save the figure seen on the screen as a (real, not a screen capture) postscript in only one command.
169        <screenco>
170          <areaspec>
171            <area id="make_ps" coords='6'/>
172          </areaspec>
173        <screen format="linespecific">
174  <prompt>&promptidl;</prompt> <userinput><command>@ps</command></userinput>
175  <computeroutput>% Compiled module: GETFILE.</computeroutput>
176  <computeroutput>% Compiled module: PUTFILE.</computeroutput>
177  <computeroutput>% Compiled module: OPENPS.</computeroutput>
178  <computeroutput>% Compiled module: XQUESTION.</computeroutput>
179  <computeroutput>Name of the postscript file? (default answer is idl.ps) </computeroutput><userinput>first_ps</userinput> &numb1;
180  <computeroutput>% Compiled module: ISAFILE.</computeroutput>
181  <computeroutput>% Compiled module: XNOTICE.</computeroutput>
182  <computeroutput>% Compiled module: CLOSEPS.</computeroutput>
183  <computeroutput>% Compiled module: PRINTPS.</computeroutput>
184  <computeroutput>% Compiled module: FILE_WHICH.</computeroutput>
185  <computeroutput>% Compiled module: CW_BGROUP.</computeroutput>
186  <computeroutput>% Compiled module: XMANAGER.</computeroutput>
187        </screen>
188          <calloutlist>
189            <callout arearefs="make_ps">
190              <para>
191                <remark>If needed, the name of the postscript will automatically be completed with .ps. Just hit return, if you want to use the default postscript name: <filename>idl.ps</filename>.</remark> 
192              </para>
193            </callout>
194          </calloutlist>
195        </screenco>
196        Check that the <quote><filename>first_ps.ps</filename></quote> file is now existing...
197        <screen format="linespecific">
198  <prompt>&promptidl;</prompt> <userinput><command>print, file_test(psdir + 'first_ps.ps')</command></userinput>
199  <computeroutput>           1</computeroutput>
200  <prompt>&promptidl;</prompt> <userinput><command>help, file_info(psdir + 'first_ps.ps'), /structure</command></userinput>
201  <computeroutput>** Structure FILE_INFO, 21 tags, length=64, data length=63:</computeroutput>
202  <computeroutput>   NAME            STRING    '/Users/sebastie/IDL/first_ps.ps'</computeroutput>
203  <computeroutput>   EXISTS          BYTE         1</computeroutput>
204  <computeroutput>   READ            BYTE         1</computeroutput>
205  <computeroutput>   WRITE           BYTE         1</computeroutput>
206  <computeroutput>   EXECUTE         BYTE         0</computeroutput>
207  <computeroutput>   REGULAR         BYTE         1</computeroutput>
208  <computeroutput>   DIRECTORY       BYTE         0</computeroutput>
209  <computeroutput>   BLOCK_SPECIAL   BYTE         0</computeroutput>
210  <computeroutput>   CHARACTER_SPECIAL</computeroutput>
211  <computeroutput>                   BYTE         0</computeroutput>
212  <computeroutput>   NAMED_PIPE      BYTE         0</computeroutput>
213  <computeroutput>   SETUID          BYTE         0</computeroutput>
214  <computeroutput>   SETGID          BYTE         0</computeroutput>
215  <computeroutput>   SOCKET          BYTE         0</computeroutput>
216  <computeroutput>   STICKY_BIT      BYTE         0</computeroutput>
217  <computeroutput>   SYMLINK         BYTE         0</computeroutput>
218  <computeroutput>   DANGLING_SYMLINK</computeroutput>
219  <computeroutput>                   BYTE         0</computeroutput>
220  <computeroutput>   MODE            LONG               420</computeroutput>
221  <computeroutput>   ATIME           LONG64                1122424373</computeroutput>
222  <computeroutput>   CTIME           LONG64                1122424373</computeroutput>       
223  <computeroutput>   MTIME           LONG64                1122424373</computeroutput>       
224  <computeroutput>   SIZE            LONG64                      4913</computeroutput>
225        </screen>
226      </para>
227      <para id="splot_description">
228        <command>splot</command> accepts the same keywords as <command>plot</command> (<computeroutput id="plot_kwd">/ISOTROPIC, MAX_VALUE=value, MIN_VALUE=value, NSUM=value, /POLAR, THICK=value, /XLOG, /YLOG, /YNOZERO</computeroutput>), including the graphics keywords (<computeroutput id="gr_kwd">BACKGROUND, CHARSIZE, CHARTHICK, CLIP, COLOR, DATA, DEVICE, FONT, LINESTYLE, NOCLIP, NODATA, NOERASE, NORMAL, POSITION, PSYM, SUBTITLE, SYMSIZE, T3D, THICK, TICKLEN, TITLE, [XYZ]CHARSIZE, [XYZ]GRIDSTYLE, [XYZ]MARGIN, [XYZ]MINOR, [XYZ]RANGE, [XYZ]STYLE, [XYZ]THICK, [XYZ]TICKFORMAT, [XYZ]TICKINTERVAL, [XYZ]TICKLAYOUT, [XYZ]TICKLEN, [XYZ]TICKNAME, [XYZ]TICKS, [XYZ]TICKUNITS, [XYZ]TICKV, [XYZ]TICK_GET, [XYZ]TITLE, ZVALUE</computeroutput>).
229      </para>
230      <simpara>
231        It can therefore be customized <emphasis>as much as you want</emphasis>. See this short example:
232      </simpara>
233      <para>
234        <screen format="linespecific">
235  <prompt>&promptidl;</prompt> <userinput><command>splot, y, y^2, linestyle = 2, thick = 2, title = 'y = x^2', /portrait</command></userinput> <ulink url="figpng/basic_splot2.png?format=raw">&showfig;</ulink>
236        </screen>
237        <command>splot</command> can be used to setup the graphic environment (<varname>!p</varname>, <varname>!x</varname>, <varname>!y</varname>, <varname>!z</varname> variables) needed by procedures like <command>oplot</command>
238        <screen format="linespecific">
239  <prompt>&promptidl;</prompt> <userinput><command>splot, y, yrange = [0, (n-1)^2], title = 'x and x^2'</command></userinput>
240  <prompt>&promptidl;</prompt> <userinput><command>oplot, y^2, color = 50, linestyle = 2</command></userinput> <ulink url="figpng/basic_splot4.png?format=raw">&showfig;</ulink>
241        </screen>
242        Use the keyword small to produce multi plots figures.
243        <screenco>
244          <areaspec>
245            <areaset id="small" coords="">
246              <area id="small.1" coords='1'/>
247              <area id="small.2" coords='2'/>
248            </areaset>
249            <area id="noerase" coords='2'/>
250          </areaspec>
251        <screen format="linespecific">
252  <prompt>&promptidl;</prompt> <userinput><command>splot, y, y^2, title = 'y = x^2', psym = 2, small &numb1; = [1, 2, 1]</command></userinput>
253  <prompt>&promptidl;</prompt> <userinput><command>splot, findgen(360)/36., findgen(360)*2.*!dtor, /polar $</command></userinput>
254  <prompt>&promptidl;</prompt> <userinput><command>    , small &numb1; = [1, 2, 2], /noerase &numb2;</command></userinput> <ulink url="figpng/basic_splot3.png?format=raw">&showfig;</ulink>
255        </screen>
256          <calloutlist>
257            <callout arearefs="small">
258              <para>
259                the <computeroutput>small</computeroutput> keyword is a 3 elements vector which defines how we divide the page and in which case we should make the plot: [number of columns, number of rows, case number]. The case numbering is starting at 1, from top to bottom and left to right.
260              </para>
261            </callout>
262            <callout arearefs="noerase">
263              <simpara>
264                you must put <computeroutput>/noerase</computeroutput> otherwise the second plot will be done in a new window.
265              </simpara>
266            </callout>
267          </calloutlist>
268        </screenco>
269      </para>
270     
271      </sect3>
272
273      <sect3 id="basic_contour">
274      <title>
275        scontour
276      </title>
277      <para>
278        Following <command><link linkend="basic_splot">splot</link></command> example, we provide <command>scontour</command> as a "super <command>contour</command>".
279        <screen format="linespecific">
280  <prompt>&promptidl;</prompt> <userinput><command>z = dist(n)</command></userinput>
281  <computeroutput>% Compiled module: DIST.</computeroutput>
282  <prompt>&promptidl;</prompt> <userinput><command>scontour, z</command></userinput> <ulink url="figpng/basic_scontour1.png?format=raw">&showfig;</ulink>
283  <computeroutput>% Compiled module: SCONTOUR.</computeroutput>
284  <computeroutput>% Compiled module: CHKSTRU.</computeroutput>
285        </screen>
286        <command>scontour</command> accepts the same keywords as <command>contour</command> (<computeroutput>C_ANNOTATION=vector_of_strings, C_CHARSIZE=value, C_CHARTHICK=integer, C_COLORS=vector, C_LABELS=vector{each element 0 or 1}, C_LINESTYLE=vector, { /FILL | /CELL_FILL | C_ORIENTATION=degrees}, C_SPACING=value, C_THICK=vector, /CLOSED, /DOWNHILL, /FOLLOW, /IRREGULAR, /ISOTROPIC, LEVELS=vector, NLEVELS=integer{1 to 60}, MAX_VALUE=value, MIN_VALUE=value, /OVERPLOT, {/PATH_DATA_COORDS, PATH_FILENAME=string, PATH_INFO=variable, PATH_XY=variable}, TRIANGULATION=variable, /PATH_DOUBLE, /XLOG, /YLOG, ZAXIS={0 | 1 | 2 | 3 | 4}</computeroutput>), including the <link linkend="gr_kwd">graphics keywords</link> (except <computeroutput>LINESTYLE, PSYM, SYMSIZE</computeroutput>).
287      </para>
288      <simpara>It can therefore be customized <emphasis>as much as you want</emphasis>. See these short examples:</simpara>
289      <para>
290        <screen format="linespecific">
291  <prompt>&promptidl;</prompt> <userinput><command>scontour, z, /fill, nlevels = 15, subtitle = 'nicer contour' $</command></userinput>
292  <prompt>&promptidl;</prompt> <userinput><command>    , xtitle = 'x index', charsize = 1.5</command></userinput> <ulink url="figpng/basic_scontour2.png?format=raw">&showfig;</ulink>
293        </screen>
294It can be used in combinaison with contour to make more complex plots:
295        <screenco>
296          <areaspec>
297            <area id="rebin" coords='1'/>
298          </areaspec>
299        <screen format="linespecific">
300  <prompt>&promptidl;</prompt> <userinput><command>ind = findgen(2*n)/(2.*n)</command></userinput>
301  <prompt>&promptidl;</prompt> <userinput><command>scontour, z, levels = n*ind, c_orientation = 180*ind, c_spacing = 0.4*ind</command></userinput>
302  <prompt>&promptidl;</prompt> <userinput><command>contour, z, /overplot, c_label = rebin([1, 0], 2, n) &numb1;, levels = n*ind $</command></userinput>
303  <prompt>&promptidl;</prompt> <userinput><command>    , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind</command></userinput> <ulink url="figpng/basic_scontour3.png?format=raw">&showfig;</ulink>
304        </screen>
305        <calloutlist>
306          <callout arearefs="rebin">
307            <para>
308              <command>rebin</command> is used to build an array containing an alternation of 1 and 0 in order to label one contour every two contours.
309                <screen format="linespecific">
310  <prompt>&promptidl;</prompt> <userinput><command>print, rebin([1, 0], 2, 3)</command></userinput>
311  <computeroutput>       1       0</computeroutput>
312  <computeroutput>       1       0</computeroutput>
313  <computeroutput>       1       0</computeroutput>
314                </screen>
315            </para>
316          </callout>
317        </calloutlist>
318        </screenco>
319        <command>scontour</command> is compatible with the positioning method associated with the <computeroutput>small</computeroutput> keyword. See for example the test file <ulink url="../../Tests/tst_basic.pro?format=raw"><filename>tst_basic.pro</filename></ulink>:
320        <screen format="linespecific">
321  <prompt>&promptidl;</prompt> <userinput><command>tst_basic</command></userinput> <ulink url="figpng/tst_basic.png?format=raw">&showfig;</ulink>
322        </screen>
323      </para>
324      </sect3>
325
326      <sect3 id="tvplus">
327        <title>
328          Quick look and explore 2D arrays: tvplus
329        </title>
330        <para>
331          <command>tvplus</command> is a enhanced version of tvscl and allow you to have a quick look and perform basic exploration of 2D arrays.
332          <screen format="linespecific">
333  <prompt>&promptidl;</prompt> <userinput><command>tvplus, dist(20)</command></userinput> <ulink url="figpng/tvplus.png?format=raw">&showfig;</ulink>
334  <computeroutput>left button  : mouse position and associated array value</computeroutput>
335  <computeroutput>middle button: use it twice to define a zoom box</computeroutput>
336  <computeroutput>right button : quit</computeroutput>
337  <computeroutput>(x, y) = (  5,   5), value = 7.07107</computeroutput>
338  <computeroutput>(x, y) = ( 12,   8), value = 11.3137</computeroutput>
339          </screen>
340          For more informations on <command>tvplus</command>, try:
341          <screen format="linespecific">
342  <prompt>&promptidl;</prompt> <userinput><command>xhelp, 'tvplus'</command></userinput>
343          </screen>
344          To sse the source code of <command>tvplus</command>, try:
345          <screen format="linespecific">
346  <prompt>&promptidl;</prompt> <userinput><command>xfile, 'tvplus'</command></userinput>
347          </screen>
348          <note><title>New Feature</title><para>
349          If you use an IDL 6.2 or later revision, you can simply get the help of any command by typing ?<replaceable>command_name</replaceable>, for example:
350          <screen format="linespecific">
351  <prompt>&promptidl;</prompt> <userinput><command>?tvplus</command></userinput>
352          </screen>
353          </para></note>
354        </para>
355      </sect3>
356
357      <sect3 id="pltv">
358        <title>
359          Formal quick look at 2D arrays: pltv
360        </title>
361        <para>
362          <command>pltv</command> is a mix between <link linkend="tvplus">tvplus</link> and <link linkend="plt">plt</link> and allow you to have formal quick look of 2D arrays.
363          <screen format="linespecific">
364  <prompt>&promptidl;</prompt> <userinput><command>pltv, dist(20)</command></userinput> <ulink url="figpng/pltv.png?format=raw">&showfig;</ulink>
365          </screen>
366        </para>
367      </sect3>
368    </sect2>
369  </sect1>
370
371  <sect1 id="gridded_data">
372    <title>
373      Explore gridded data (model outputs and observations)
374    </title>
375    <para>
376      This section briefly describes the main functionalities offered by SAXO to explore gridded data on regular or irregular grid.
377    </para>
378
379    <sect2 id="load_grid">
380      <title>
381        Load the data grid
382      </title>
383      <para>
384        As we focus in this section on the gridded data, we must first load the grid informations before reading and plotting the data. Loading the grid independently of the data allow you to reload the grid only when it is strictly necessary and not every time you access the data. In <filename class="directory"><envar>${HOME}</envar>/SAXO_DIR/Tests/</filename>, we provide several examples to load a grid.
385      </para>
386      <sect3 id="load_fromdata">
387        <title>
388          Easiest solution: load data grid (regular or not) directly from the data file.
389        </title>
390        <para>
391          Example of Levitus temperature on a regular 1x1 grid.
392          <screen format="linespecific">
393  <prompt>&promptidl;</prompt> <userinput><command>@tst_initlev</command></userinput>
394  <computeroutput>% Compiled module: INITNCDF.</computeroutput>
395  <computeroutput>% Compiled module: ISAFILE.</computeroutput>
396  <computeroutput>% Compiled module: UNIQ.</computeroutput>
397  <computeroutput>% Loaded DLM: NCDF.</computeroutput>
398  <computeroutput>% Compiled module: COMPUTEGRID.</computeroutput>
399  <computeroutput>% Compiled module: DOMDEF.</computeroutput>
400  <computeroutput>% Compiled module: INTER.</computeroutput>
401  <computeroutput>% Compiled module: TRIANGULE.</computeroutput>
402  <computeroutput>% Compiled module: TRIANGULE_C.</computeroutput>
403  <computeroutput>% Compiled module: UNDEFINE.</computeroutput>
404  <computeroutput>% Compiled module: TESTVAR.</computeroutput>
405  <computeroutput>% Compiled module: DIFFERENT.</computeroutput>
406  <computeroutput>% Compiled module: DEFINETRI.</computeroutput>
407          </screen>
408          This <ulink url="../../Tests/tst_initlev.pro?format=raw"><command>@tst_initlev</command></ulink> command allows us to define:
409          <itemizedlist>
410            <listitem><simpara>domain dimensions, stored in <varname>jpi, jpj and jpk</varname></simpara></listitem>
411            <listitem><simpara>points abscissa, stored in 2D array <varname></varname>glamt</simpara></listitem>
412            <listitem><simpara>points ordinates, stored in 2D array <varname></varname>gphit</simpara></listitem>
413            <listitem><simpara>points depths, stored in 1D array <varname></varname>gdept</simpara></listitem>
414            <listitem><simpara>cells corners abscissa, stored in 2D array <varname></varname>glamf</simpara></listitem>
415            <listitem><simpara>cells corners ordinates, stored in 2D array <varname></varname>gphif</simpara></listitem>
416            <listitem><simpara>cells upper boundary depth, stored in 1D array <varname></varname>gdepw</simpara></listitem>
417            <listitem><simpara>land-sea mask, stored in <varname></varname>tmask</simpara></listitem>
418            <listitem><simpara>the cells size in the longitudinal direction, stored in 2D array <varname></varname>e1t</simpara></listitem>
419            <listitem><simpara>the cells size in the latitudinal direction, stored in 2D array <varname></varname>e2t</simpara></listitem>
420            <listitem><simpara>the cells size in the vertical direction, stored in 1D array <varname></varname>e3t</simpara></listitem>
421            <listitem><simpara>the triangulation used to fill the land points, stored in <varname></varname>triangles_list</simpara></listitem>
422          </itemizedlist>
423
424          <screen format="linespecific">
425  <prompt>&promptidl;</prompt> <userinput><command>help, jpi,jpj,jpk</command></userinput>
426  <computeroutput>JPI (LOCAL_COORD)   LONG      =          360</computeroutput>
427  <computeroutput>JPJ (LOCAL_COORD)   LONG      =          180</computeroutput>
428  <computeroutput>JPK (LOCAL_COORD)   LONG      =           33</computeroutput>
429  <prompt>&promptidl;</prompt> <userinput><command>help, glamt, gphit,glamf, gphif</command></userinput>
430  <computeroutput>GLAMT (LONGITUDES)  FLOAT     = Array[360, 180]</computeroutput>
431  <computeroutput>GPHIT (LATITUDES)   FLOAT     = Array[360, 180]</computeroutput>
432  <computeroutput>GLAMF (LONGITUDES)  FLOAT     = Array[360, 180]</computeroutput>
433  <computeroutput>GPHIF (LATITUDES)   FLOAT     = Array[360, 180]</computeroutput>
434  <prompt>&promptidl;</prompt> <userinput><command>help, gdept, gdepw</command></userinput>
435  <computeroutput>GDEPT (VERTICAL)    FLOAT     = Array[33]</computeroutput>
436  <computeroutput>GDEPW (VERTICAL)    FLOAT     = Array[33]</computeroutput>
437  <prompt>&promptidl;</prompt> <userinput><command>help, e1t, e2t, e3t</command></userinput>
438  <computeroutput>E1T (SCALE_FACTORS) FLOAT     = Array[360, 180]</computeroutput>
439  <computeroutput>E2T (SCALE_FACTORS) FLOAT     = Array[360, 180]</computeroutput>
440  <computeroutput>E3T (VERTICAL)      FLOAT     = Array[33]</computeroutput>
441  <prompt>&promptidl;</prompt> <userinput><command>help, tmask</command></userinput>
442  <computeroutput>TMASK (MASKS)       BYTE      = Array[360, 180, 33]</computeroutput>
443  <prompt>&promptidl;</prompt> <userinput><command>help, triangles_list</command></userinput>
444  <computeroutput>TRIANGLES_LIST (LIEES_A_TRIANGULE) LONG      = Array[3, 128880]</computeroutput>
445  <prompt>&promptidl;</prompt> <userinput><command>tvplus, glamt*tmask[*,*,0]</command></userinput>
446  <prompt>&promptidl;</prompt> <userinput><command>tvplus, gphit*tmask[*,*,0]</command></userinput>
447          </screen>
448          We provide other initialization methods/examples
449          <itemizedlist>
450            <listitem><simpara><ulink url="../../Tests/tst_initorca2_short.pro?format=raw">@tst_initorca2_short</ulink> : ORCA2 example</simpara></listitem>
451            <listitem><simpara><ulink url="../../Tests/tst_initorca05_short.pro?format=raw">@tst_initorca05_short</ulink> : ORCA05 example</simpara></listitem>
452            <listitem><simpara><ulink url="../../Tests/tst_initlev_stride.pro?format=raw">@tst_initlev_stride</ulink> : same as @tst_initlev but we skip on point over 2 in x and y direction</simpara></listitem>
453            <listitem><simpara><ulink url="../../Tests/tst_initorca2_short_stride.pro?format=raw">@tst_initorca2_short_stride</ulink> : ORCA2 with stride</simpara></listitem>
454            <listitem><simpara><ulink url="../../Tests/tst_initorca05_short_stride.pro?format=raw">@tst_initorca05_short_stride</ulink> : ORCA05 with stride</simpara></listitem>
455            <listitem><simpara><ulink url="../../Tests/tst_initlev_index.pro?format=raw">@tst_initlev_index</ulink> : in that case we load the grid using points index as axis instead of the longitude/latitude position</simpara></listitem>
456            <listitem><simpara><ulink url="../../Tests/tst_initorca2_index.pro?format=raw">@tst_initorca2_index</ulink> : load ORCA2 as it see by the model</simpara></listitem>
457            <listitem><simpara><ulink url="../../Tests/tst_initorca05_index.pro?format=raw">@tst_initorca05_index</ulink> : load ORCA05 as it see by the model</simpara></listitem>
458            <listitem><simpara><ulink url="../../Tests/tst_initlev_index_stride.pro?format=raw">@tst_initlev_index_stride</ulink> : @tst_initlev_index with stride</simpara></listitem>
459            <listitem><simpara><ulink url="../../Tests/tst_initorca2_index_stride.pro?format=raw">@tst_initorca2_index_stride</ulink> : ORCA2 in index with stride</simpara></listitem>
460            <listitem><simpara><ulink url="../../Tests/tst_initorca05_index_stride.pro?format=raw">@tst_initorca05_index_stride</ulink> : ORCA05 in index with stride</simpara></listitem>
461          </itemizedlist>
462        </para>
463      </sect3>
464      <sect3 id="load_meshmask">
465        <title>
466          Load the grid from OPA <filename>meshmask</filename> file
467        </title>
468        <para>
469          When the grid is really irregular (its abscissa and ordinate cannot be descried by a vector), loading the grid directly from the data forces us to make an approximation when computing the grid corners position and the cells size. In that case, it can be preferable to load the grid from the meshmask file created by OPA. As OPA use a Arakawa-C discretization, loading the grid from the meshmask will also define all parameters related to the U, V and F grids (glam[uv],gphi[uv], e[12][uvf]). Note that, when using a simple <link linkend="load_fromdata">grid definition from the data itself</link> (with <filename>initncdf</filename> or <filename>computegrid</filename>), adding the keyword /FULLCGRID leads also to the definition of all U, V and F grids parameters. There is the examples to load ORCA grids from OPA meshmask.
470          <itemizedlist>
471            <listitem><simpara><ulink url="../../Tests/tst_initorca2.pro?format=raw">@tst_initorca2</ulink> : ORCA2</simpara></listitem>
472            <listitem><simpara><ulink url="../../Tests/tst_initorca05.pro?format=raw">@tst_initorca05</ulink> : ORCA05</simpara></listitem>
473            <listitem><simpara><ulink url="../../Tests/tst_initorca2_stride.pro?format=raw">@tst_initorca2_stride</ulink> : ORCA2 with stride</simpara></listitem>
474            <listitem><simpara><ulink url="../../Tests/tst_initorca05_stride.pro?format=raw">@tst_initorca05_stride</ulink> : ORCA05 with stride</simpara></listitem>
475            <listitem><simpara><ulink url="../../Tests/tst_initorca2_index.pro?format=raw">@tst_initorca2_index</ulink> : load ORCA2 as it see by the model</simpara></listitem>
476            <listitem><simpara><ulink url="../../Tests/tst_initorca05_index.pro?format=raw">@tst_initorca05_index</ulink> : load ORCA05 as it see by the model</simpara></listitem>
477            <listitem><simpara><ulink url="../../Tests/tst_initorca2_index_stride.pro?format=raw">@tst_initorca2_index_stride</ulink> : ORCA2 in index with stride</simpara></listitem>
478            <listitem><simpara><ulink url="../../Tests/tst_initorca05_index_stride.pro?format=raw">@tst_initorca05_index_stride</ulink> : ORCA05 in index with stride</simpara></listitem>
479          </itemizedlist>
480        </para>
481        </sect3>
482    </sect2>
483
484    <sect2 id="plt">
485      <title>
486        horizontal plots and maps
487      </title>
488        <para>
489          A quick presentation of horizontal plots and maps is shown in <ulink url="../../Tests/tst_plt.pro?format=raw">tst_plt</ulink>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try:
490          <screen format="linespecific">
491  <prompt>&promptidl;</prompt> <userinput><command>tst_plt</command></userinput>
492          </screen>
493        </para>
494        <simpara><emphasis>Beware, the command is <command>tst_plt</command> and not <command>@tst_plt</command> as <filename>tst_plt.pro</filename> is a procedure and not an include.</emphasis></simpara>
495        <para>
496          See the results with
497          <itemizedlist>
498          <listitem><simpara><command>@tst_initlev</command>&figsplt_lev;</simpara></listitem>
499          <listitem><simpara><command>@tst_initorca2</command>&figsplt_orca2;</simpara></listitem>
500          <listitem><simpara><command>@tst_initorca05</command>&figsplt_orca05;</simpara></listitem>
501          <listitem><simpara><command>@tst_initlev_stride</command>&figsplt_lev_stride;</simpara></listitem>
502          <listitem><simpara><command>@tst_initorca2_stride</command>&figsplt_orca2_stride;</simpara></listitem>
503          <listitem><simpara><command>@tst_initorca05_stride</command>&figsplt_orca05_stride;</simpara></listitem>
504          </itemizedlist>
505        </para>
506    </sect2>
507
508    <sect2 id="pltz">
509      <title>
510        vertical sections
511      </title>
512        <para>
513          A quick presentation of vertical sections is shown in <ulink url="../../Tests/tst_pltz.pro?format=raw">tst_pltz</ulink>. After laoding any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try:
514          <screen format="linespecific">
515  <prompt>&promptidl;</prompt> <userinput><command>tst_pltz</command></userinput>
516          </screen>
517        </para>
518          <simpara><emphasis>Beware, the command is <command>tst_pltz</command> and not <command>@tst_pltz</command> as <filename>tst_pltz.pro</filename> is a procedure and not an include.</emphasis></simpara>         
519        <para>
520          See the results with
521          <itemizedlist>
522          <listitem><simpara><command>@tst_initlev</command>&figspltz_lev;</simpara></listitem>
523          <listitem><simpara><command>@tst_initorca2</command>&figspltz_orca2;</simpara></listitem>
524          <listitem><simpara><command>@tst_initorca05</command>&figspltz_orca05;</simpara></listitem>
525          <listitem><simpara><command>@tst_initlev_stride</command>&figspltz_lev_stride;</simpara></listitem>
526          <listitem><simpara><command>@tst_initorca2_stride</command>&figspltz_orca2_stride;</simpara></listitem>
527          <listitem><simpara><command>@tst_initorca05_stride</command>&figspltz_orca05_stride;</simpara></listitem>
528          </itemizedlist>
529        </para>
530    </sect2>
531
532    <sect2 id="pltt">
533      <title>
534        hovmoellers and time series
535      </title>
536        <para>
537          A quick presentation of hovmoellers and time series is shown in <ulink url="../../Tests/tst_pltt.pro?format=raw">tst_pltt</ulink>. After laoding any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try:
538          <screen format="linespecific">
539  <prompt>&promptidl;</prompt> <userinput><command>tst_pltt</command></userinput>
540          </screen>
541        </para>
542          <simpara><emphasis>Beware, the command is <command>tst_pltt</command> and not <command>@tst_pltt</command> as <filename>tst_pltt.pro</filename> is a procedure and not an include.</emphasis></simpara>
543        <para>
544          See the results with
545          <itemizedlist>
546          <listitem><simpara><command>@tst_initlev</command>&figspltt_lev;</simpara></listitem>
547          <listitem><simpara><command>@tst_initorca2</command>&figspltt_orca2;</simpara></listitem>
548          <listitem><simpara><command>@tst_initorca05</command>&figspltt_orca05;</simpara></listitem>
549          <listitem><simpara><command>@tst_initlev_stride</command>&figspltt_lev_stride;</simpara></listitem>
550          <listitem><simpara><command>@tst_initorca2_stride</command>&figspltt_orca2_stride;</simpara></listitem>
551          <listitem><simpara><command>@tst_initorca05_stride</command>&figspltt_orca05_stride;</simpara></listitem>
552          </itemizedlist>
553        </para>
554    </sect2>
555
556    <sect2 id="plt1d">
557      <title>
558        1D plots
559      </title>
560        <para>
561          To be continued...
562        </para>
563   </sect2>
564
565
566  </sect1>
567 
568</article>
Note: See TracBrowser for help on using the repository browser.