Changeset 120 for trunk/SRC/Documentation/xmldoc/firststeps.html
- Timestamp:
- 06/29/06 12:30:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/firststeps.html
r117 r120 3 3 <title> 4 4 First steps with SAXO 5 </title><link rel="stylesheet" href="saxo.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><meta name="keywords" content=" idl, SAXO"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e3"></a>5 </title><link rel="stylesheet" href="saxo.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><meta name="keywords" content="IDL, SAXO"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e3"></a> 6 6 First steps with <span class="application">SAXO</span> 7 </h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Sébastien</span> <span class="surname">Masson</span></h3><code class="email"><<a href="mailto:smasson_at_lo dyc.jussieu.fr">smasson_at_lodyc.jussieu.fr</a>></code></div><div class="author"><h3 class="author"><span class="firstname">Françoise</span> <span class="surname">Pinsard</span></h3><code class="email"><<a href="mailto:Francoise.Pinsard_at_lodyc.jussieu.fr">Francoise.Pinsard_at_lodyc.jussieu.fr</a>></code></div></div></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="2"><b>Revision History</b></th></tr><tr><td align="left">Revision 0.0</td><td align="left">29 July 2005</td></tr><tr><td align="left" colspan="2">First draft</td></tr><tr><td align="left">Revision 0.1</td><td align="left">29 August 2005</td></tr><tr><td align="left" colspan="2">last japanese version!</td></tr><tr><td align="left">Revision 0.2</td><td align="left">May 2006</td></tr><tr><td align="left" colspan="2">split with getsaxo</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#first_plots">1.7 </h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Sébastien</span> <span class="surname">Masson</span></h3><code class="email"><<a href="mailto:smasson_at_locean-ipsl.upmc.fr">smasson_at_locean-ipsl.upmc.fr</a>></code></div><div class="author"><h3 class="author"><span class="firstname">Françoise</span> <span class="surname">Pinsard</span></h3><code class="email"><<a href="mailto:Francoise.Pinsard_at_locean-ipsl.upmc.fr">Francoise.Pinsard_at_locean-ipsl.upmc.fr</a>></code></div></div></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="2"><b>Revision History</b></th></tr><tr><td align="left">Revision 0.0</td><td align="left">29 July 2005</td></tr><tr><td align="left" colspan="2">First draft</td></tr><tr><td align="left">Revision 0.1</td><td align="left">29 August 2005</td></tr><tr><td align="left" colspan="2">last Japanese version!</td></tr><tr><td align="left">Revision 0.2</td><td align="left">May 2006</td></tr><tr><td align="left" colspan="2">split with getsaxo</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#first_plots">1. 8 8 First plots... 9 9 </a></span></dt><dd><dl><dt><span class="sect2"><a href="#start_with_init">1.1. 10 Start idlsession: <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong>10 Start IDL session: <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong> 11 11 </a></span></dt><dt><span class="sect2"><a href="#basic_plots">1.2. 12 12 basic plots... … … 26 26 First plots... 27 27 </h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="start_with_init"></a>1.1. 28 Start idlsession: <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong>29 </h3></div></div></div><p> 30 Each idlsession using <span class="application">SAXO</span> must always start with: <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong>.28 Start IDL session: <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong> 29 </h3></div></div></div><p> 30 Each IDL session using <span class="application">SAXO</span> must always start with: <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong>. 31 31 </p><p> 32 32 <span class="emphasis"><em>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).</em></span> … … 54 54 <code class="prompt">idl></code> 55 55 </pre><p> 56 As an IDL session using <span class="application">SAXO</span> must always start with <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong>, it could be convenient to define the environment variable <code class="envar">IDL_STARTUP</code> to <code class="filename"><code class="envar">${HOME}</code>/My_IDL/init.pro</code>. In that way, <code class="filename">init.pro</code> will automatically been execu ded when starting IDL. This can be done with the following command:56 As an IDL session using <span class="application">SAXO</span> must always start with <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">@init</strong></span></code></strong>, it could be convenient to define the environment variable <code class="envar">IDL_STARTUP</code> to <code class="filename"><code class="envar">${HOME}</code>/My_IDL/init.pro</code>. In that way, <code class="filename">init.pro</code> will automatically been executed when starting IDL. This can be done with the following command: 57 57 </p><div class="variablelist"><dl><dt><span class="term"><span><strong class="command">csh</strong></span></span></dt><dd><pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">setenv</strong></span> <code class="envar">IDL_STARTUP</code> <code class="filename"><code class="envar">${HOME}</code>/My_IDL/init.pro</code></code></strong></pre></dd><dt><span class="term"><span><strong class="command">ksh</strong></span></span></dt><dd><pre class="screen"><code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">export</strong></span> <code class="envar">IDL_STARTUP</code>=<code class="filename"><code class="envar">${HOME}</code>/My_IDL/init.pro</code></code></strong></pre></dd></dl></div><p> 58 58 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="basic_plots"></a>1.2. … … 73 73 </p></td></tr></table></div></div><p> 74 74 </p><p> 75 Using IDL <span><strong class="command">plot</strong></span> command is quite unconvenient to save the figure as a postscript. In addition, positionning the figure on the window/page by using <code class="varname">!p.position</code>, <code class="varname">!p.region</code> and <code class="varname">!p.multi</code> is often a nightmare. That's why we developped <span><strong class="command">splot</strong></span> (like super-plot) which can be used in the same way as plot but is much more convenient to make postcript and position the figure.75 Using IDL <span><strong class="command">plot</strong></span> command is quite inconvenient to save the figure as a postscript. In addition, positioning the figure on the window/page by using <code class="varname">!p.position</code>, <code class="varname">!p.region</code> and <code class="varname">!p.multi</code> is often a nightmare. That's why we developed <span><strong class="command">splot</strong></span> (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. 76 76 </p><pre class="screen"> 77 77 <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">splot, y</strong></span></code></strong> <a href="figpng/basic_splot1.png?format=raw" target="_top"><span class="inlinemediaobject"><img src="images/showfig.png?format=raw" alt="show result"></span></a> … … 100 100 <code class="computeroutput">% Compiled module: XMANAGER.</code> 101 101 </pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><img src="images/callouts/1.png?format=raw" alt="1" border="0"></td><td valign="top" align="left"><p> 102 <em><span class="remark">If needed, the name of the postscript will automatically be completed with .ps. Just hit return, if you want to use the default post cript name: <code class="filename">idl.ps</code>.</span></em>102 <em><span class="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: <code class="filename">idl.ps</code>.</span></em> 103 103 </p></td></tr></table></div></div><p> 104 104 Check that the “<span class="quote"><code class="filename">first_ps.ps</code></span>” file is now existing... … … 151 151 <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command"> , small <span class="inlinemediaobject"><img src="images/callouts/1.png?format=raw" alt="1"></span> = [1, 2, 2], /noerase <span class="inlinemediaobject"><img src="images/callouts/2.png?format=raw" alt="2"></span></strong></span></code></strong> <a href="figpng/basic_splot3.png?format=raw" target="_top"><span class="inlinemediaobject"><img src="images/showfig.png?format=raw" alt="show result"></span></a> 152 152 </pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><img src="images/callouts/1.png?format=raw" alt="1" border="0"></td><td valign="top" align="left"><p> 153 the <code class="computeroutput">small</code> keyword is a 3 elements vector which defines how we d evide 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.153 the <code class="computeroutput">small</code> 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. 154 154 </p></td></tr><tr><td width="5%" valign="top" align="left"><img src="images/callouts/2.png?format=raw" alt="2" border="0"></td><td valign="top" align="left"> 155 you must put <code class="computeroutput">/no rease</code> otherwise the second plot will be done in a new window.155 you must put <code class="computeroutput">/noerase</code> otherwise the second plot will be done in a new window. 156 156 </td></tr></table></div></div><p> 157 157 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="basic_contour"></a>1.2.2. … … 172 172 <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command"> , xtitle = 'x index', charsize = 1.5</strong></span></code></strong> <a href="figpng/basic_scontour2.png?format=raw" target="_top"><span class="inlinemediaobject"><img src="images/showfig.png?format=raw" alt="show result"></span></a> 173 173 </pre><p> 174 It can be used in combina nson with contour to make more complex plots:174 It can be used in combinaison with contour to make more complex plots: 175 175 </p><div class="screenco"><pre class="screen"> 176 176 <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">ind = findgen(2*n)/(2.*n)</strong></span></code></strong> … … 210 210 Explore gridded data (model outputs and observations) 211 211 </h2></div></div></div><p> 212 This section briefly describes the main f onctionalities offered by SAXO to explore gridded data on regular or irregular grid.212 This section briefly describes the main functionalities offered by SAXO to explore gridded data on regular or irregular grid. 213 213 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="load_grid"></a>2.1. 214 214 Load the data grid … … 218 218 Easiest solution: load data grid (regular or not) directly from the data file. 219 219 </h4></div></div></div><p> 220 Example of Levitus temp rature on a regular 1x1 grid.220 Example of Levitus temperature on a regular 1x1 grid. 221 221 </p><pre class="screen"> 222 222 <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">@tst_initlev</strong></span></code></strong> … … 236 236 </pre><p> 237 237 This <a href="../../Tests/tst_initlev.pro?format=raw" target="_top"><span><strong class="command">@tst_initlev</strong></span></a> command allows us to define: 238 </p><div class="itemizedlist"><ul type="disc"><li>domain dimensions, stored in <code class="varname">jpi, jpj and jpk</code></li><li>points abscissa, stored in 2D array <code class="varname"></code>glamt</li><li>points ordinates, stored in 2D array <code class="varname"></code>gphit</li><li>points depths, stored in 1D array <code class="varname"></code>gdept</li><li>cells corners abscissa, stor de in 2D array <code class="varname"></code>glamf</li><li>cells corners ordinates, stored in 2D array <code class="varname"></code>gphif</li><li>cells upper bondary depth, stored in 1D array <code class="varname"></code>gdepw</li><li>land-sea mask, stored in <code class="varname"></code>tmask</li><li>the cells size in the longitudinal direction, stored in 2D array <code class="varname"></code>e1t</li><li>the cells size in the latitudinal direction, stored in 2D array <code class="varname"></code>e2t</li><li>the cells size in the vertical direction, stored in 1D array <code class="varname"></code>e3t</li><li>the triangulation used to fill the land points, stored in <code class="varname"></code>triangles_list</li></ul></div><p>238 </p><div class="itemizedlist"><ul type="disc"><li>domain dimensions, stored in <code class="varname">jpi, jpj and jpk</code></li><li>points abscissa, stored in 2D array <code class="varname"></code>glamt</li><li>points ordinates, stored in 2D array <code class="varname"></code>gphit</li><li>points depths, stored in 1D array <code class="varname"></code>gdept</li><li>cells corners abscissa, stored in 2D array <code class="varname"></code>glamf</li><li>cells corners ordinates, stored in 2D array <code class="varname"></code>gphif</li><li>cells upper boundary depth, stored in 1D array <code class="varname"></code>gdepw</li><li>land-sea mask, stored in <code class="varname"></code>tmask</li><li>the cells size in the longitudinal direction, stored in 2D array <code class="varname"></code>e1t</li><li>the cells size in the latitudinal direction, stored in 2D array <code class="varname"></code>e2t</li><li>the cells size in the vertical direction, stored in 1D array <code class="varname"></code>e3t</li><li>the triangulation used to fill the land points, stored in <code class="varname"></code>triangles_list</li></ul></div><p> 239 239 240 240 </p><pre class="screen"> … … 272 272 horizontal plots and maps 273 273 </h3></div></div></div><p> 274 A quick presentation of horizontal plots and maps is shown in <a href="../../Tests/tst_plt.pro?format=raw" target="_top">tst_plt</a>. After l aoding any of the grid (for example with one of the <a href="#load_grid" title="2.1. 
Load the data grid
 ">above examples</a>). Just try:274 A quick presentation of horizontal plots and maps is shown in <a href="../../Tests/tst_plt.pro?format=raw" target="_top">tst_plt</a>. After loading any of the grid (for example with one of the <a href="#load_grid" title="2.1. 
Load the data grid
 ">above examples</a>). Just try: 275 275 </p><pre class="screen"> 276 276 <code class="prompt">idl></code> <strong class="userinput"><code><span><strong class="command">tst_plt</strong></span></code></strong>
Note: See TracChangeset
for help on using the changeset viewer.