Changeset 345 for trunk/SRC/Documentation/xmldoc/firststeps.xml
- Timestamp:
- 04/16/08 11:15:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/firststeps.xml
r291 r345 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 hellip "…"> 1 <?xml version="1.0" encoding="iso-8859-1"?> 2 <!DOCTYPE article [ 3 <!ENTITY % isolat1 SYSTEM "http://www.w3.org/2003/entities/iso8879/isolat1.ent"> 4 %isolat1; 5 <!ENTITY % isolat2 SYSTEM "http://www.w3.org/2003/entities/iso8879/isolat2.ent"> 6 %isolat2; 7 <!ENTITY % isogrk3 SYSTEM "http://www.w3.org/2003/entities/iso8879/isogrk3.ent"> 8 %isogrk3; 9 <!ENTITY % isopub SYSTEM "http://www.w3.org/2003/entities/iso8879/isopub.ent"> 10 %isopub; 11 <!ENTITY % isotech SYSTEM "http://www.w3.org/2003/entities/iso8879/isotech.ent"> 12 %isotech; 13 <!ENTITY % isonum SYSTEM "http://www.w3.org/2003/entities/iso8879/isonum.ent"> 14 %isonum; 6 15 <!ENTITY promptidl "idl>"> 7 16 <!ENTITY numb1 '<inlinemediaobject><imageobject><imagedata fileref="images/callouts/1.png" format="PNG"/></imageobject><textobject><phrase>1</phrase></textobject></inlinemediaobject>'> … … 9 18 <!ENTITY showfig '<inlinemediaobject><imageobject><imagedata fileref="images/showfig.png" format="PNG"/></imageobject><textobject><phrase>show result</phrase></textobject></inlinemediaobject>'> 10 19 ]> 20 21 <article version="5.0" 22 xmlns="http://docbook.org/ns/docbook" 23 xmlns:xl="http://www.w3.org/1999/xlink" 24 xmlns:xi="http://www.w3.org/2001/XInclude" 25 xml:lang="en" 26 xml:id="firststeps"> 11 27 12 28 <!-- … … 27 43 28 44 --> 29 <article lang="en"> 30 <title> 31 First steps with <application>SAXO</application> 32 </title> 33 34 <articleinfo> 45 <title> First steps with <application>SAXO</application> </title> 46 47 <info> 35 48 <authorgroup> 36 <author>< firstname>Sébastien</firstname> <surname>Masson</surname> <email>Sebastien.Masson_at_locean-ipsl.upmc.fr</email></author>37 <author>< firstname>Françoise</firstname> <surname>Pinsard</surname> <email>Francoise.Pinsard_at_locean-ipsl.upmc.fr</email></author>49 <author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname> <email>Sebastien.Masson_at_locean-ipsl.upmc.fr</email></author> 50 <author><personname><firstname>Françoise</firstname> <surname>Pinsard</surname></personname> <email>Francoise.Pinsard_at_locean-ipsl.upmc.fr</email></author> 38 51 </authorgroup> 39 52 <keywordset> … … 43 56 <revhistory> 44 57 <revision> 45 46 47 58 <revnumber>0.0</revnumber> 59 <date>29 July 2005</date> 60 <revremark>First draft</revremark> 48 61 </revision> 49 62 <revision> 50 51 52 63 <revnumber>0.1</revnumber> 64 <date>29 August 2005</date> 65 <revremark>last Japanese version!</revremark> 53 66 </revision> 54 67 <revision> 55 56 57 68 <revnumber>0.2</revnumber> 69 <date>May 2006</date> 70 <revremark>split with getsaxo</revremark> 58 71 </revision> 72 <revision> 73 <revnumber>0.3</revnumber> 74 <date>April 2008</date> 75 <revremark>migration from DocBook 4.2 to Docbook 5.0</revremark> 76 </revision> 77 59 78 </revhistory> 60 79 <pubdate>$Id$</pubdate> 61 </ articleinfo>62 <sect1 id="beforefirststeps">80 </info> 81 <sect1 xml:id="beforefirststeps"> 63 82 <title>Before this</title> 64 83 <para> 65 In this document, we supposed that you followed < ulink url="./getsaxo.html">Get SAXO</ulink> recommendations.84 In this document, we supposed that you followed <link xl:href="./getsaxo.html">Get SAXO</link> recommendations. 66 85 </para> 67 86 </sect1> 68 87 69 <sect1 id="first_plots"> 70 <title> 71 First plots … 72 </title> 73 <sect2 id="start_with_init"> 74 <title> 75 Start IDL session: <userinput><command>@init</command></userinput> 76 </title> 77 <para> 78 Each IDL session using <application>SAXO</application> must always start with: <prompt>&promptidl;</prompt> <userinput><command>@init</command></userinput>. 79 </para> 80 <para> 81 <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> 82 <screen format="linespecific"> 83 <prompt>$</prompt> <userinput><command>cd</command> <filename class="directory"><envar>${HOME}</envar>/My_IDL/</filename></userinput> 88 <sect1 xml:id="first_plots"> 89 <title> First plots … </title> 90 <sect2 xml:id="start_with_init"> 91 <title> Start IDL session: <userinput><command>@init</command></userinput> </title> 92 <para> 93 Each IDL session using <application>SAXO</application> must always start with: <prompt>&promptidl;</prompt> <userinput><command>@init</command></userinput>. 94 </para> 95 <para> 96 <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> 97 <screen> 98 <prompt>$</prompt> <userinput><command>cd</command> <filename class="directory">${HOME}/My_IDL/</filename></userinput> 84 99 <prompt>$</prompt> <userinput><command>idl</command></userinput> 85 100 <computeroutput>IDL Version 6.0, Mac OS X (darwin ppc m32). (c) 2003, Research Systems, Inc.</computeroutput> … … 102 117 <computeroutput>% Compiled module: LOADCT.</computeroutput> 103 118 <prompt>&promptidl;</prompt> 104 105 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:119 </screen> 120 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>${HOME}/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: 106 121 <variablelist> 107 108 <listitem><screen><prompt>$</prompt> <userinput><command>setenv</command> <envar>IDL_STARTUP</envar> <filename><envar>${HOME}</envar>/My_IDL/init.pro</filename></userinput></screen></listitem>109 110 111 <listitem><screen><prompt>$</prompt> <userinput><command>export</command> <envar>IDL_STARTUP</envar>=<filename><envar>${HOME}</envar>/My_IDL/init.pro</filename></userinput></screen></listitem>112 122 <varlistentry><term><command>csh</command></term> 123 <listitem><screen><prompt>$</prompt> <userinput><command>setenv</command> <envar>IDL_STARTUP</envar> <filename>${HOME}/My_IDL/init.pro</filename></userinput></screen></listitem> 124 </varlistentry> 125 <varlistentry><term><command>ksh</command></term> 126 <listitem><screen><prompt>$</prompt> <userinput><command>export</command> <envar>IDL_STARTUP</envar>=<filename>${HOME}/My_IDL/init.pro</filename></userinput></screen></listitem> 127 </varlistentry> 113 128 </variablelist> 114 129 </para> 115 130 </sect2> 116 <sect2 id="basic_plots"> 117 <title> 118 Basic plots … 119 </title> 120 <sect3 id="basic_splot"> 121 <title> 122 splot 123 </title> 124 125 <para> 126 <screenco> 127 <areaspec> 128 <area id="findgen" coords='2'/> 129 </areaspec> 130 <screen format="linespecific"> 131 <sect2 xml:id="basic_plots"> 132 <title> Basic plots … </title> 133 <sect3 xml:id="basic_splot"> 134 <title> splot </title> 135 136 <para> 137 <screenco> 138 <areaspec> 139 <area xml:id="findgen" coords="2"/> 140 </areaspec> 141 <screen> 131 142 <prompt>&promptidl;</prompt> <userinput><command>n = 10</command></userinput> 132 143 <prompt>&promptidl;</prompt> <userinput><command>y = findgen(n)</command></userinput> &numb1; 133 <prompt>&promptidl;</prompt> <userinput><command>plot, y</command></userinput> < ulink url="./figpng/basic_plot.png">&showfig;</ulink>134 144 <prompt>&promptidl;</prompt> <userinput><command>plot, y</command></userinput> <link xl:href="./figpng/basic_plot.png">&showfig;</link> 145 </screen> 135 146 <calloutlist> 136 137 138 147 <callout arearefs="findgen"> 148 <para> 149 <command>findgen</command> stands for 139 150 <emphasis role="bold">f</emphasis>loat <emphasis role="bold">ind</emphasis>ex <emphasis role="bold">gen</emphasis>erator. 140 <screen format="linespecific">151 <screen> 141 152 <prompt>&promptidl;</prompt> <userinput><command>print, findgen(6)</command></userinput> 142 153 <computeroutput> 0.00000 1.00000 2.00000 3.00000 4.00000 5.00000</computeroutput> 143 144 145 146 147 154 </screen> 155 </para> 156 </callout> 157 </calloutlist> 158 </screenco> 148 159 </para> 149 160 <para> 150 151 <screen format="linespecific">152 <prompt>&promptidl;</prompt> <userinput><command>splot, y</command></userinput> < ulink url="./figpng/basic_splot1.png">&showfig;</ulink>161 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. 162 <screen> 163 <prompt>&promptidl;</prompt> <userinput><command>splot, y</command></userinput> <link xl:href="./figpng/basic_splot1.png">&showfig;</link> 153 164 <computeroutput>% Compiled module: SPLOT.</computeroutput> 154 165 <computeroutput>% Compiled module: REINITPLT.</computeroutput> … … 158 169 <computeroutput>% Compiled module: GET_SCREEN_SIZE.</computeroutput> 159 170 <computeroutput>% Compiled module: TERMINEDESSIN.</computeroutput> 160 161 162 163 164 <area id="make_ps" coords='6'/>165 166 <screen format="linespecific">171 </screen> 172 Save the figure seen on the screen as a (real, not a screen capture) postscript in only one command. 173 <screenco> 174 <areaspec> 175 <area xml:id="make_ps" coords="6"/> 176 </areaspec> 177 <screen> 167 178 <prompt>&promptidl;</prompt> <userinput><command>@ps</command></userinput> 168 179 <computeroutput>% Compiled module: GETFILE.</computeroutput> … … 178 189 <computeroutput>% Compiled module: CW_BGROUP.</computeroutput> 179 190 <computeroutput>% Compiled module: XMANAGER.</computeroutput> 180 181 182 183 <para>184 <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> 185 </para>186 187 188 189 190 <screen format="linespecific">191 </screen> 192 <calloutlist> 193 <callout arearefs="make_ps"> 194 <simpara> 195 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>. 196 </simpara> 197 </callout> 198 </calloutlist> 199 </screenco> 200 Check that the <quote><filename>first_ps.ps</filename></quote> file is now existing … 201 <screen> 191 202 <prompt>&promptidl;</prompt> <userinput><command>print, file_test(psdir + 'first_ps.ps')</command></userinput> 192 203 <computeroutput> 1</computeroutput> … … 216 227 <computeroutput> MTIME LONG64 1122424373</computeroutput> 217 228 <computeroutput> SIZE LONG64 4913</computeroutput> 218 219 </para> 220 <para id="splot_description">221 <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 (<computeroutputid="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 </screen> 230 </para> 231 <para xml:id="splot_description"> 232 <command>splot</command> accepts the same keywords as <command>plot</command> (<computeroutput xml:id="plot_kwd">/ISOTROPIC, MAX_VALUE=value, MIN_VALUE=value, NSUM=value, /POLAR, THICK=value, /XLOG, /YLOG, /YNOZERO</computeroutput>), including the graphics keywords (<computeroutput xml: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>). 222 233 </para> 223 234 <simpara> 224 235 It can therefore be customized <emphasis>as much as you want</emphasis>. See this short example: 225 236 </simpara> 226 237 <para> 227 <screen format="linespecific">228 <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">&showfig;</ulink>229 230 231 <screen format="linespecific">238 <screen> 239 <prompt>&promptidl;</prompt> <userinput><command>splot, y, y^2, linestyle = 2, thick = 2, title = 'y = x^2', /portrait</command></userinput> <link xl:href="./figpng/basic_splot2.png">&showfig;</link> 240 </screen> 241 <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> 242 <screen> 232 243 <prompt>&promptidl;</prompt> <userinput><command>splot, y, yrange = [0, (n-1)^2], title = 'x and x^2'</command></userinput> 233 <prompt>&promptidl;</prompt> <userinput><command>oplot, y^2, color = 50, linestyle = 2</command></userinput> < ulink url="./figpng/basic_splot4.png">&showfig;</ulink>234 235 236 237 238 <areaset id="small" coords="">239 <area id="small.1" coords='1'/>240 <area id="small.2" coords='2'/>241 242 <area id="noerase" coords='2'/>243 244 <screen format="linespecific">244 <prompt>&promptidl;</prompt> <userinput><command>oplot, y^2, color = 50, linestyle = 2</command></userinput> <link xl:href="./figpng/basic_splot4.png">&showfig;</link> 245 </screen> 246 Use the keyword small to produce multi plots figures. 247 <screenco> 248 <areaspec> 249 <areaset xml:id="small"> 250 <area xml:id="small.1" coords="1"/> 251 <area xml:id="small.2" coords="2"/> 252 </areaset> 253 <area xml:id="noerase" coords="2"/> 254 </areaspec> 255 <screen> 245 256 <prompt>&promptidl;</prompt> <userinput><command>splot, y, y^2, title = 'y = x^2', psym = 2, small &numb1; = [1, 2, 1]</command></userinput> 246 257 <prompt>&promptidl;</prompt> <userinput><command>splot, findgen(360)/36., findgen(360)*2.*!dtor, /polar $</command></userinput> 247 <prompt>&promptidl;</prompt> <userinput><command> , small &numb1; = [1, 2, 2], /noerase &numb2;</command></userinput> < ulink url="./figpng/basic_splot3.png">&showfig;</ulink>248 249 250 251 <para>252 253 </para>254 255 256 257 258 259 260 261 258 <prompt>&promptidl;</prompt> <userinput><command> , small &numb1; = [1, 2, 2], /noerase &numb2;</command></userinput> <link xl:href="./figpng/basic_splot3.png">&showfig;</link> 259 </screen> 260 <calloutlist> 261 <callout arearefs="small"> 262 <simpara> 263 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. 264 </simpara> 265 </callout> 266 <callout arearefs="noerase"> 267 <simpara> 268 you must put <computeroutput>/noerase</computeroutput> otherwise the second plot will be done in a new window. 269 </simpara> 270 </callout> 271 </calloutlist> 272 </screenco> 262 273 </para> 263 274 </sect3> 264 275 265 <sect3 id="basic_contour"> 266 <title> 267 scontour 268 </title> 269 <para> 270 Following <command><link linkend="basic_splot">splot</link></command> example, we provide <command>scontour</command> as a "super <command>contour</command>". 271 <screen format="linespecific"> 276 <sect3 xml:id="basic_contour"> 277 <title> scontour </title> 278 <para> 279 Following <command><link linkend="basic_splot">splot</link></command> example, we provide <command>scontour</command> as a "super <command>contour</command>". 280 <screen> 272 281 <prompt>&promptidl;</prompt> <userinput><command>z = dist(n)</command></userinput> 273 282 <computeroutput>% Compiled module: DIST.</computeroutput> 274 <prompt>&promptidl;</prompt> <userinput><command>scontour, z</command></userinput> < ulink url="./figpng/basic_scontour1.png">&showfig;</ulink>283 <prompt>&promptidl;</prompt> <userinput><command>scontour, z</command></userinput> <link xl:href="./figpng/basic_scontour1.png">&showfig;</link> 275 284 <computeroutput>% Compiled module: SCONTOUR.</computeroutput> 276 285 <computeroutput>% Compiled module: CHKSTRU.</computeroutput> 277 278 286 </screen> 287 <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>). 279 288 </para> 280 289 <simpara>It can therefore be customized <emphasis>as much as you want</emphasis>. See these short examples:</simpara> 281 290 <para> 282 <screen format="linespecific">291 <screen> 283 292 <prompt>&promptidl;</prompt> <userinput><command>scontour, z, /fill, nlevels = 15, subtitle = 'nicer contour' $</command></userinput> 284 <prompt>&promptidl;</prompt> <userinput><command> , xtitle = 'x index', charsize = 1.5</command></userinput> < ulink url="./figpng/basic_scontour2.png">&showfig;</ulink>285 293 <prompt>&promptidl;</prompt> <userinput><command> , xtitle = 'x index', charsize = 1.5</command></userinput> <link xl:href="./figpng/basic_scontour2.png">&showfig;</link> 294 </screen> 286 295 It can be used in combination with contour to make more complex plots: 287 288 289 <area id="rebin" coords='1'/>290 291 <screen format="linespecific">296 <screenco> 297 <areaspec> 298 <area xml:id="rebin" coords="1"/> 299 </areaspec> 300 <screen> 292 301 <prompt>&promptidl;</prompt> <userinput><command>ind = findgen(2*n)/(2.*n)</command></userinput> 293 302 <prompt>&promptidl;</prompt> <userinput><command>scontour, z, levels = n*ind, c_orientation = 180*ind, c_spacing = 0.4*ind</command></userinput> 294 303 <prompt>&promptidl;</prompt> <userinput><command>contour, z, /overplot, c_label = rebin([1, 0], 2, n) &numb1;, levels = n*ind $</command></userinput> 295 <prompt>&promptidl;</prompt> <userinput><command> , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind</command></userinput> < ulink url="./figpng/basic_scontour3.png">&showfig;</ulink>296 297 298 299 300 301 <screen format="linespecific">304 <prompt>&promptidl;</prompt> <userinput><command> , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind</command></userinput> <link xl:href="./figpng/basic_scontour3.png">&showfig;</link> 305 </screen> 306 <calloutlist> 307 <callout arearefs="rebin"> 308 <para> 309 <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. 310 <screen> 302 311 <prompt>&promptidl;</prompt> <userinput><command>print, rebin([1, 0], 2, 3)</command></userinput> 303 312 <computeroutput> 1 0</computeroutput> 304 313 <computeroutput> 1 0</computeroutput> 305 314 <computeroutput> 1 0</computeroutput> 306 307 308 309 310 311 <command>scontour</command> is compatible with the positioning method associated with the <computeroutput>small</computeroutput> keyword. See for example the test file <ulink type="text" url="../../Tests/tst_basic.pro"><filename>tst_basic.pro</filename></ulink>:312 <screen format="linespecific">313 <prompt>&promptidl;</prompt> <userinput><command>tst_basic</command></userinput> < ulink url="./figpng/tst_basic.png">&showfig;</ulink>314 315 </screen> 316 </para> 317 </callout> 318 </calloutlist> 319 </screenco> 320 <command>scontour</command> is compatible with the positioning method associated with the <computeroutput>small</computeroutput> keyword. See for example the test file <link xl:href="../../Tests/tst_basic.pro"><filename>tst_basic.pro</filename></link>: 321 <screen> 322 <prompt>&promptidl;</prompt> <userinput><command>tst_basic</command></userinput> <link xl:href="./figpng/tst_basic.png">&showfig;</link> 323 </screen> 315 324 </para> 316 325 </sect3> 317 326 318 <sect3 id="tvplus"> 319 <title> 320 Quick look and explore 2D arrays: tvplus 321 </title> 322 <para> 323 <command>tvplus</command> is a enhanced version of <command>tvscl</command> and allow you to have a quick look and perform basic exploration of 2D arrays. 324 <screen format="linespecific"> 325 <prompt>&promptidl;</prompt> <userinput><command>tvplus, dist(20)</command></userinput> <ulink url="./figpng/tvplus.png">&showfig;</ulink> 327 <sect3 xml:id="tvplus"> 328 <title> Quick look and explore 2D arrays: tvplus </title> 329 <para> 330 <command>tvplus</command> is a enhanced version of <command>tvscl</command> and allow you to have a quick look and perform basic exploration of 2D arrays. 331 <screen> 332 <prompt>&promptidl;</prompt> <userinput><command>tvplus, dist(20)</command></userinput> <link xl:href="./figpng/tvplus.png">&showfig;</link> 326 333 <computeroutput>left button : mouse position and associated array value</computeroutput> 327 334 <computeroutput>middle button: use it twice to define a zoom box</computeroutput> … … 329 336 <computeroutput>(x, y) = ( 5, 5), value = 7.07107</computeroutput> 330 337 <computeroutput>(x, y) = ( 12, 8), value = 11.3137</computeroutput> 331 332 333 <screen format="linespecific">338 </screen> 339 For more informations on <command>tvplus</command>, try: 340 <screen> 334 341 <prompt>&promptidl;</prompt> <userinput><command>xhelp, 'tvplus'</command></userinput> 335 336 337 <screen format="linespecific">342 </screen> 343 To see the source code of <command>tvplus</command>, try: 344 <screen> 338 345 <prompt>&promptidl;</prompt> <userinput><command>xfile, 'tvplus'</command></userinput> 339 340 341 342 <screen format="linespecific">346 </screen> 347 <note><title>New Feature</title><para> 348 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: 349 <screen> 343 350 <prompt>&promptidl;</prompt> <userinput><command>?tvplus</command></userinput> 344 345 346 351 </screen> 352 </para></note> 353 </para> 347 354 </sect3> 348 355 349 <sect3 id="pltv"> 350 <title> 351 Formal quick look at 2D arrays: pltv 352 </title> 353 <para> 354 <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. 355 <screen format="linespecific"> 356 <prompt>&promptidl;</prompt> <userinput><command>pltv, dist(20)</command></userinput> <ulink url="./figpng/pltv.png">&showfig;</ulink> 357 </screen> 358 </para> 356 <sect3 xml:id="pltv"> 357 <title> Formal quick look at 2D arrays: pltv </title> 358 <para> 359 <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. 360 <screen> 361 <prompt>&promptidl;</prompt> <userinput><command>pltv, dist(20)</command></userinput> <link xl:href="./figpng/pltv.png">&showfig;</link> 362 </screen> 363 </para> 359 364 </sect3> 360 365 </sect2> 361 366 </sect1> 362 367 363 <sect1 id="gridded_data"> 364 <title> 365 Explore gridded data (model outputs and observations) 366 </title> 368 <sect1 xml:id="gridded_data"> 369 <title> Explore gridded data (model outputs and observations) </title> 367 370 <para> 368 371 This section briefly describes the main functionalities offered by SAXO to explore gridded data on regular or irregular grid. 369 372 </para> 370 373 371 <sect2 id="load_grid"> 372 <title> 373 Load the data grid 374 </title> 375 <para> 376 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. 377 </para> 378 <sect3 id="load_fromdata"> 379 <title> 380 Easiest solution: load data grid (regular or not) directly from the data file 381 </title> 382 <para> 383 Example of Levitus temperature on a regular 1x1 grid. 384 <screen format="linespecific"> 374 <sect2 xml:id="load_grid"> 375 <title> Load the data grid </title> 376 <para> 377 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">${HOME}/SAXO_DIR/Tests/</filename>, we provide several examples to load a grid. 378 </para> 379 <sect3 xml:id="load_fromdata"> 380 <title> Easiest solution: load data grid (regular or not) directly from the data file </title> 381 <para> 382 Example of Levitus temperature on a regular 1x1 grid. 383 <screen> 385 384 <prompt>&promptidl;</prompt> <userinput><command>@tst_initlev</command></userinput> 386 385 <computeroutput>% Compiled module: INITNCDF.</computeroutput> … … 397 396 <computeroutput>% Compiled module: DIFFERENT.</computeroutput> 398 397 <computeroutput>% Compiled module: DEFINETRI.</computeroutput> 399 400 This <ulink type="text" url="../../Tests/tst_initlev.pro"><command>@tst_initlev</command></ulink> command allows us to define:401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 <screen format="linespecific">398 </screen> 399 This <link xl:href="../../Tests/tst_initlev.pro"><command>@tst_initlev</command></link> command allows us to define: 400 <itemizedlist> 401 <listitem><simpara>domain dimensions, stored in <varname>jpi, jpj and jpk</varname></simpara></listitem> 402 <listitem><simpara>points abscissa, stored in 2D array <varname></varname>glamt</simpara></listitem> 403 <listitem><simpara>points ordinates, stored in 2D array <varname></varname>gphit</simpara></listitem> 404 <listitem><simpara>points depths, stored in 1D array <varname></varname>gdept</simpara></listitem> 405 <listitem><simpara>cells corners abscissa, stored in 2D array <varname></varname>glamf</simpara></listitem> 406 <listitem><simpara>cells corners ordinates, stored in 2D array <varname></varname>gphif</simpara></listitem> 407 <listitem><simpara>cells upper boundary depth, stored in 1D array <varname></varname>gdepw</simpara></listitem> 408 <listitem><simpara>land-sea mask, stored in <varname>tmask</varname></simpara></listitem> 409 <listitem><simpara>the cells size in the longitudinal direction, stored in 2D array <varname></varname>e1t</simpara></listitem> 410 <listitem><simpara>the cells size in the latitudinal direction, stored in 2D array <varname></varname>e2t</simpara></listitem> 411 <listitem><simpara>the cells size in the vertical direction, stored in 1D array <varname></varname>e3t</simpara></listitem> 412 <listitem><simpara>the triangulation used to fill the land points, stored in <varname></varname>triangles_list</simpara></listitem> 413 </itemizedlist> 414 415 <screen> 417 416 <prompt>&promptidl;</prompt> <userinput><command>help, jpi,jpj,jpk</command></userinput> 418 417 <computeroutput>JPI (LOCAL_COORD) LONG = 360</computeroutput> … … 437 436 <prompt>&promptidl;</prompt> <userinput><command>tvplus, glamt*tmask[*,*,0]</command></userinput> 438 437 <prompt>&promptidl;</prompt> <userinput><command>tvplus, gphit*tmask[*,*,0]</command></userinput> 439 440 441 442 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_short.pro">@tst_initorca2_short</ulink> : ORCA2 example</simpara></listitem>443 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_short.pro">@tst_initorca05_short</ulink> : ORCA05 example</simpara></listitem>444 <listitem><simpara><ulink type="text" url="../../Tests/tst_initlev_stride.pro">@tst_initlev_stride</ulink> : same as @tst_initlev but we skip on point over 2 in x and y direction</simpara></listitem>445 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_short_stride.pro">@tst_initorca2_short_stride</ulink> : ORCA2 with stride</simpara></listitem>446 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_short_stride.pro">@tst_initorca05_short_stride</ulink> : ORCA05 with stride</simpara></listitem>447 <listitem><simpara><ulink type="text" url="../../Tests/tst_initlev_index.pro">@tst_initlev_index</ulink> : in that case we load the grid using points index as axis instead of the longitude/latitude position</simpara></listitem>448 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_index.pro">@tst_initorca2_index</ulink> : load ORCA2 as it see by the model</simpara></listitem>449 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_index.pro">@tst_initorca05_index</ulink> : load ORCA05 as it see by the model</simpara></listitem>450 <listitem><simpara><ulink type="text" url="../../Tests/tst_initlev_index_stride.pro">@tst_initlev_index_stride</ulink> : @tst_initlev_index with stride</simpara></listitem>451 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_index_stride.pro">@tst_initorca2_index_stride</ulink> : ORCA2 in index with stride</simpara></listitem>452 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_index_stride.pro">@tst_initorca05_index_stride</ulink> : ORCA05 in index with stride</simpara></listitem>453 454 438 </screen> 439 We provide other initialization methods/examples 440 <itemizedlist> 441 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_short.pro">@tst_initorca2_short</link> : ORCA2 example</simpara></listitem> 442 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_short.pro">@tst_initorca05_short</link> : ORCA05 example</simpara></listitem> 443 <listitem><simpara><link xl:href="../../Tests/tst_initlev_stride.pro">@tst_initlev_stride</link> : same as @tst_initlev but we skip on point over 2 in x and y direction</simpara></listitem> 444 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_short_stride.pro">@tst_initorca2_short_stride</link> : ORCA2 with stride</simpara></listitem> 445 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_short_stride.pro">@tst_initorca05_short_stride</link> : ORCA05 with stride</simpara></listitem> 446 <listitem><simpara><link xl:href="../../Tests/tst_initlev_index.pro">@tst_initlev_index</link> : in that case we load the grid using points index as axis instead of the longitude/latitude position</simpara></listitem> 447 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_index.pro">@tst_initorca2_index</link> : load ORCA2 as it see by the model</simpara></listitem> 448 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_index.pro">@tst_initorca05_index</link> : load ORCA05 as it see by the model</simpara></listitem> 449 <listitem><simpara><link xl:href="../../Tests/tst_initlev_index_stride.pro">@tst_initlev_index_stride</link> : @tst_initlev_index with stride</simpara></listitem> 450 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_index_stride.pro">@tst_initorca2_index_stride</link> : ORCA2 in index with stride</simpara></listitem> 451 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_index_stride.pro">@tst_initorca05_index_stride</link> : ORCA05 in index with stride</simpara></listitem> 452 </itemizedlist> 453 </para> 455 454 </sect3> 456 <sect3 id="load_meshmask"> 457 <title> 458 Load the grid from OPA <filename>meshmask</filename> file 459 </title> 460 <para> 461 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. 462 <itemizedlist> 463 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2.pro">@tst_initorca2</ulink> : ORCA2</simpara></listitem> 464 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05.pro">@tst_initorca05</ulink> : ORCA05</simpara></listitem> 465 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_stride.pro">@tst_initorca2_stride</ulink> : ORCA2 with stride</simpara></listitem> 466 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_stride.pro">@tst_initorca05_stride</ulink> : ORCA05 with stride</simpara></listitem> 467 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_index.pro">@tst_initorca2_index</ulink> : load ORCA2 as it see by the model</simpara></listitem> 468 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_index.pro">@tst_initorca05_index</ulink> : load ORCA05 as it see by the model</simpara></listitem> 469 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca2_index_stride.pro">@tst_initorca2_index_stride</ulink> : ORCA2 in index with stride</simpara></listitem> 470 <listitem><simpara><ulink type="text" url="../../Tests/tst_initorca05_index_stride.pro">@tst_initorca05_index_stride</ulink> : ORCA05 in index with stride</simpara></listitem> 471 </itemizedlist> 472 </para> 455 <sect3 xml:id="load_meshmask"> 456 <title> Load the grid from OPA <filename>meshmask</filename> file </title> 457 <para> 458 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. 459 <itemizedlist> 460 <listitem><simpara><link xl:href="../../Tests/tst_initorca2.pro">@tst_initorca2</link> : ORCA2</simpara></listitem> 461 <listitem><simpara><link xl:href="../../Tests/tst_initorca05.pro">@tst_initorca05</link> : ORCA05</simpara></listitem> 462 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_stride.pro">@tst_initorca2_stride</link> : ORCA2 with stride</simpara></listitem> 463 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_stride.pro">@tst_initorca05_stride</link> : ORCA05 with stride</simpara></listitem> 464 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_index.pro">@tst_initorca2_index</link> : load ORCA2 as it see by the model</simpara></listitem> 465 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_index.pro">@tst_initorca05_index</link> : load ORCA05 as it see by the model</simpara></listitem> 466 <listitem><simpara><link xl:href="../../Tests/tst_initorca2_index_stride.pro">@tst_initorca2_index_stride</link> : ORCA2 in index with stride</simpara></listitem> 467 <listitem><simpara><link xl:href="../../Tests/tst_initorca05_index_stride.pro">@tst_initorca05_index_stride</link> : ORCA05 in index with stride</simpara></listitem> 468 </itemizedlist> 469 </para> 473 470 </sect3> 474 471 </sect2> 475 472 476 <sect2 id="plt"> 477 <title> 478 Horizontal plots and maps 479 </title> 480 <para> 481 A quick presentation of horizontal plots and maps is shown in <ulink type="text" url="../../Tests/tst_plt.pro">tst_plt</ulink>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try: 482 <screen format="linespecific"> 473 <sect2 xml:id="plt"> 474 <title> Horizontal plots and maps </title> 475 <para> 476 A quick presentation of horizontal plots and maps is shown in <link xl:href="../../Tests/tst_plt.pro">tst_plt</link>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try: 477 <screen> 483 478 <prompt>&promptidl;</prompt> <userinput><command>tst_plt</command></userinput> 484 485 486 487 488 489 490 491 492 493 494 495 496 497 479 </screen> 480 </para> 481 <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> 482 <para> 483 See the results with 484 <itemizedlist> 485 <listitem><simpara><command>@tst_initlev</command>&figsplt_lev;</simpara></listitem> 486 <listitem><simpara><command>@tst_initorca2</command>&figsplt_orca2;</simpara></listitem> 487 <listitem><simpara><command>@tst_initorca05</command>&figsplt_orca05;</simpara></listitem> 488 <listitem><simpara><command>@tst_initlev_stride</command>&figsplt_lev_stride;</simpara></listitem> 489 <listitem><simpara><command>@tst_initorca2_stride</command>&figsplt_orca2_stride;</simpara></listitem> 490 <listitem><simpara><command>@tst_initorca05_stride</command>&figsplt_orca05_stride;</simpara></listitem> 491 </itemizedlist> 492 </para> 498 493 </sect2> 499 494 500 <sect2 id="pltz"> 501 <title> 502 Vertical sections 503 </title> 504 <para> 505 A quick presentation of vertical sections is shown in <ulink type="text" url="../../Tests/tst_pltz.pro">tst_pltz</ulink>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try: 506 <screen format="linespecific"> 495 <sect2 xml:id="pltz"> 496 <title> Vertical sections </title> 497 <para> 498 A quick presentation of vertical sections is shown in <link xl:href="../../Tests/tst_pltz.pro">tst_pltz</link>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try: 499 <screen> 507 500 <prompt>&promptidl;</prompt> <userinput><command>tst_pltz</command></userinput> 508 509 510 511 512 513 514 515 516 517 518 519 520 521 501 </screen> 502 </para> 503 <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> 504 <para> 505 See the results with 506 <itemizedlist> 507 <listitem><simpara><command>@tst_initlev</command>&figspltz_lev;</simpara></listitem> 508 <listitem><simpara><command>@tst_initorca2</command>&figspltz_orca2;</simpara></listitem> 509 <listitem><simpara><command>@tst_initorca05</command>&figspltz_orca05;</simpara></listitem> 510 <listitem><simpara><command>@tst_initlev_stride</command>&figspltz_lev_stride;</simpara></listitem> 511 <listitem><simpara><command>@tst_initorca2_stride</command>&figspltz_orca2_stride;</simpara></listitem> 512 <listitem><simpara><command>@tst_initorca05_stride</command>&figspltz_orca05_stride;</simpara></listitem> 513 </itemizedlist> 514 </para> 522 515 </sect2> 523 516 524 <sect2 id="pltt"> 525 <title> 526 Hovmoellers and time series 527 </title> 528 <para> 529 A quick presentation of hovmoellers and time series is shown in <ulink type="text" url="../../Tests/tst_pltt.pro">tst_pltt</ulink>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try: 530 <screen format="linespecific"> 517 <sect2 xml:id="pltt"> 518 <title> Hovmoellers and time series </title> 519 <para> 520 A quick presentation of hovmoellers and time series is shown in <link xl:href="../../Tests/tst_pltt.pro">tst_pltt</link>. After loading any of the grid (for example with one of the <link linkend="load_grid">above examples</link>). Just try: 521 <screen> 531 522 <prompt>&promptidl;</prompt> <userinput><command>tst_pltt</command></userinput> 532 533 534 535 536 537 538 539 540 541 542 543 544 545 523 </screen> 524 </para> 525 <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> 526 <para> 527 See the results with 528 <itemizedlist> 529 <listitem><simpara><command>@tst_initlev</command>&figspltt_lev;</simpara></listitem> 530 <listitem><simpara><command>@tst_initorca2</command>&figspltt_orca2;</simpara></listitem> 531 <listitem><simpara><command>@tst_initorca05</command>&figspltt_orca05;</simpara></listitem> 532 <listitem><simpara><command>@tst_initlev_stride</command>&figspltt_lev_stride;</simpara></listitem> 533 <listitem><simpara><command>@tst_initorca2_stride</command>&figspltt_orca2_stride;</simpara></listitem> 534 <listitem><simpara><command>@tst_initorca05_stride</command>&figspltt_orca05_stride;</simpara></listitem> 535 </itemizedlist> 536 </para> 546 537 </sect2> 547 538 548 <sect2 id="plt1d"> 549 <title> 550 1D plots 551 </title> 539 <sect2 xml:id="plt1d"> 540 <title> 1D plots </title> 552 541 <para> 553 554 542 To be continued … 543 </para> 555 544 </sect2> 556 545
Note: See TracChangeset
for help on using the changeset viewer.