Changeset 115
- Timestamp:
- 06/21/06 10:33:35 (18 years ago)
- Location:
- trunk/SRC
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/getsaxo.html
r114 r115 80 80 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">cd</strong></span> <em class="parameter"><code>SAXO_DIR</code></em></code></strong> 81 81 </pre><p> 82 ... and download it the latest version of the sources tar file: <a href="http://forge.ipsl.jussieu.fr/saxo/download/SAXO_SRC_200606 19.tar.gz" target="_top">SAXO_SRC_20060619.tar.gz</a> (4.8M Mb). This tar.gz file could also be downloaded with82 ... and download it the latest version of the sources tar file: <a href="http://forge.ipsl.jussieu.fr/saxo/download/SAXO_SRC_20060621.tar.gz" target="_top">SAXO_SRC_20060621.tar.gz</a> (4.8M Mb). This tar.gz file could also be downloaded with 83 83 </p><div class="variablelist"><dl><dt><span class="term"><span><strong class="command">wget</strong></span></span></dt><dd><pre class="screen"> 84 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">wget</strong></span> <em class="parameter"><code>http://forge.ipsl.jussieu.fr/saxo/download/SAXO_SRC_200606 19.tar.gz</code></em></code></strong>84 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">wget</strong></span> <em class="parameter"><code>http://forge.ipsl.jussieu.fr/saxo/download/SAXO_SRC_20060621.tar.gz</code></em></code></strong> 85 85 </pre></dd><dt><span class="term"><span><strong class="command">curl</strong></span></span></dt><dd><pre class="screen"> 86 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">curl</strong></span> <code class="option">-O</code> <em class="parameter"><code>http://forge.ipsl.jussieu.fr/saxo/download/SAXO_SRC_200606 19.tar.gz</code></em></code></strong>86 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">curl</strong></span> <code class="option">-O</code> <em class="parameter"><code>http://forge.ipsl.jussieu.fr/saxo/download/SAXO_SRC_20060621.tar.gz</code></em></code></strong> 87 87 </pre></dd></dl></div><p> 88 88 Untar the file 89 89 </p><pre class="screen"> 90 90 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">cd</strong></span> <em class="parameter"><code><code class="envar">${HOME}</code>/SAXO_DIR</code></em></code></strong> 91 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">tar</strong></span> <code class="option">xvfz</code> <em class="parameter"><code>SAXO_SRC_200606 19.tar.gz</code></em></code></strong>92 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">rm</strong></span> <em class="parameter"><code>SAXO_SRC_200606 19.tar.gz</code></em></code></strong>91 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">tar</strong></span> <code class="option">xvfz</code> <em class="parameter"><code>SAXO_SRC_20060621.tar.gz</code></em></code></strong> 92 <code class="prompt">$</code> <strong class="userinput"><code><span><strong class="command">rm</strong></span> <em class="parameter"><code>SAXO_SRC_20060621.tar.gz</code></em></code></strong> 93 93 </pre><p> 94 94 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="saxo_data_tar"></a>2.3.2. -
trunk/SRC/Documentation/xmldoc/savesaxo.sh
r114 r115 32 32 set -u 33 33 # 34 docompileall= 134 docompileall=0 35 35 dohtml=0 36 36 dooldtest=0 … … 38 38 doidldoc_html=0 39 39 doidldoc_assistant=0 40 doTARsrc= 040 doTARsrc=1 41 41 doTARdata=0 42 doforge= 042 doforge=1 43 43 doSRClodyc=0 44 44 doDTAlodyc=0 … … 83 83 ; 84 84 !path = expand_path('+' + '../..') + ':' + expand_path('+' + !dir) 85 resolve_all, resolve_either='def_myuniquetmpdir' 86 resolve_all, resolve_either = 'find' 85 resolve_all, resolve_either='def_myuniquetmpdir', skip_routines = ['xxx2ps','trends', 'label_gmt'] 86 resolve_all, resolve_either = 'find', skip_routines = ['xxx2ps','trends', 'label_gmt'] 87 87 def_myuniquetmpdir 88 88 oldcm = find('oldcm_empty') … … 95 95 journal 96 96 ; 97 resolve_all, resolve_either='keep_compatibility' 97 resolve_all, resolve_either='keep_compatibility', skip_routines = ['xxx2ps','trends', 'label_gmt'] 98 98 ; 99 99 EOF 100 100 # 101 for i in $( find ${memopwd}/../.. / -name "*.pro")101 for i in $( find ${memopwd}/../.. -name "*.pro" | grep -iv label_gmt ) 102 102 do 103 # does it contains return ?104 grep -iq '^ *return' $i103 # does it contains pro or function ? 104 egrep -iq '^ * *(pro|function)' $i 105 105 if [ $? -eq 0 ] 106 106 then 107 # does it contains pro or function ? 108 egrep -iq '^ *(pro|function)' $i 109 if [ $? -eq 0 ] 110 then 111 echo "resolve_all, resolve_either = '$( basename $i .pro )', skip_routines = ['xxx2ps','trends']" >> /tmp/compileall${$}.pro 112 fi 107 echo "print, '$( basename $i .pro ) :'" >> /tmp/compileall${$}.pro 108 echo "resolve_all, resolve_either = '$( basename $i .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt']" >> /tmp/compileall${$}.pro 113 109 fi 114 110 done … … 127 123 grep "Compilation error(s)" /tmp/compileallerr_${$} 128 124 echo "eee : see /tmp/compileallerr_${$}" 125 more /tmp/compileallerr_${$} 129 126 exit 1 130 127 fi … … 286 283 fi 287 284 #------------------------------------------------------------------ 288 if [ [ ($doSRClodyc -eq 1) || ($doSRCipsl -eq 1) ]]285 if [ $doSRCipsl -eq 1 ] 289 286 then 290 287 echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" … … 336 333 # 337 334 echo "iii : update src on cerbere" 338 scp job_src_$$ smasson@cerbere.lodyc.jussieu.fr:. 339 ssh smasson@cerbere.lodyc.jussieu.fr "chmod 755 job_src_$$ ; ./job_src_$$ ; rm -f job_src_$$" 335 ssh smasson@cerbere.lodyc.jussieu.fr "svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR" 340 336 fi 341 337 #------------------------------------------------------------------ … … 369 365 # update src on rhodes 370 366 echo "iii : update src to rhodes" 371 ssh reee217@rhodes.idris.fr " svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR"367 ssh reee217@rhodes.idris.fr "/usr/local/pub/svn/svn-1.3.1/bin/svn update SAXO_DIR/SRC ; chmod -R 755 SAXO_DIR" 372 368 fi 373 369 #------------------------------------------------------------------ -
trunk/SRC/Documentation/xmldoc/whatissaxo.html
r84 r115 1 1 <html><head> 2 2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 3 <title>What is SAXO</title><link rel="stylesheet" href="saxo.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.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="d0e1"></a>What is SAXO</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_lodyc.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">May 2006</td></tr><tr><td align="left" colspan="2">First draft</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="#d0e3 8">1. Prerequistes</a></span></dt><dt><span class="sect1"><a href="#d0e58">2. Include</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e38"></a>1. Prerequistes</h2></div></div></div><p>3 <title>What is SAXO</title><link rel="stylesheet" href="saxo.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.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="d0e1"></a>What is SAXO</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_lodyc.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">May 2006</td></tr><tr><td align="left" colspan="2">First draft</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="#d0e37">1. Prerequistes</a></span></dt><dt><span class="sect1"><a href="#d0e57">2. Include</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e37"></a>1. Prerequistes</h2></div></div></div><p> 4 4 <span class="application">SAXO</span> needs at least <a href="http://www.ittvis.com/idl/" target="_top"><span class="trademark">IDL</span>™</a> 6.0. 5 5 </p><p> 6 6 <em><span class="remark"><span class="application">SAXO</span> can be used with the 7 minutes demo-mode (within the limitations of this mode: impossible to save data and create a file).</span></em> 7 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5 8"></a>2. Include</h2></div></div></div><p>7 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e57"></a>2. Include</h2></div></div></div><p> 8 8 </p><div class="itemizedlist"><ul type="disc"><li> 9 9 <span class="application">idl-NetCDF</span> written and maintained by Alan Iwi … … 15 15 <span class="application">color24</span>, <span class="application">colorbar</span>, <span class="application">getcolor</span>, <span class="application">binary</span>, <span class="application">different</span>, <span class="application">inter</span>, <span class="application">union</span>, <span class="application">str_size</span> and <span class="application">undefine</span> written and maintained by David Fanning 16 16 <a href="http://www.dfanning.com" target="_top">http://www.dfanning.com</a> 17 </li><li> 18 <span class="application">delchr</span>, <span class="application">getfile</span>, <span class="application">getwrd</span>, <span class="application">isnumber</span>, <span class="application">nwrds</span> and <span class="application">putfile</span> written and maintained by R. Sterner in JHU/APL/S1R IDL Library 19 <a href="http://fermi.jhuapl.edu/s1r/idl/s1rlib/local_idl.html" target="_top">http://fermi.jhuapl.edu/s1r/idl/s1rlib/local_idl.html</a> 17 20 </li><li> 18 21 <span class="application">cmapply</span> and <span class="application">cmset_op</span> written and maintained by Craig Markwardt -
trunk/SRC/Documentation/xmldoc/whatissaxo.xml
r100 r115 54 54 </simpara></listitem> 55 55 <listitem><simpara> 56 <application>delchr</application>, <application>getfile</application>, <application>getwrd</application>, <application>isnumber</application>, <application>nwrds</application> and <application>putfile</application> written and maintained by R. Sterner in JHU/APL/S1R IDL Library 57 <ulink url="http://fermi.jhuapl.edu/s1r/idl/s1rlib/local_idl.html"/> 58 </simpara></listitem> 59 <listitem><simpara> 56 60 <application>cmapply</application> and <application>cmset_op</application> written and maintained by Craig Markwardt 57 61 <ulink url="http://cow.physics.wisc.edu/~craigm/idl"/> -
trunk/SRC/Documentation/xmldoc/whatsnew.html
r114 r115 1 1 <html><head> 2 2 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 3 <title>What's new in SAXO</title><link rel="stylesheet" href="saxo.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.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="d0e1"></a>What's new in SAXO</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_lodyc.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">May 2006</td></tr><tr><td align="left" colspan="2">First draft</td></tr><tr><td align="left">Revision 0.1</td><td align="left">June 2006</td></tr><tr><td align="left" colspan="2">add date according to output of svn log</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="#d0e45">1. Introduction</a></span></dt><dt><span class="sect1"><a href="#d0e52">2. Changeset 114 (2006-06-19)</a></span></dt><dt><span class="sect1"><a href="#d0e6 2">3. Changeset 73 (2006-05-22)</a></span></dt><dt><span class="sect1"><a href="#d0e78">4. Changeset 69 (2006-05-11)</a></span></dt><dt><span class="sect1"><a href="#d0e88">5. Changeset 68 (2006-05-09)</a></span></dt><dt><span class="sect1"><a href="#d0e103">6. Changeset 7 (2006-04-24)</a></span></dt><dt><span class="sect1"><a href="#d0e113">7. Changeset 2 (revision date=2002-09-11 actually done 2006-04-13)</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e45"></a>1. Introduction</h2></div></div></div><p>3 <title>What's new in SAXO</title><link rel="stylesheet" href="saxo.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.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="d0e1"></a>What's new in SAXO</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_lodyc.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">May 2006</td></tr><tr><td align="left" colspan="2">First draft</td></tr><tr><td align="left">Revision 0.1</td><td align="left">June 2006</td></tr><tr><td align="left" colspan="2">add date according to output of svn log</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="#d0e45">1. Introduction</a></span></dt><dt><span class="sect1"><a href="#d0e52">2. Changeset 114 (2006-06-19)</a></span></dt><dt><span class="sect1"><a href="#d0e65">3. Changeset 73 (2006-05-22)</a></span></dt><dt><span class="sect1"><a href="#d0e81">4. Changeset 69 (2006-05-11)</a></span></dt><dt><span class="sect1"><a href="#d0e91">5. Changeset 68 (2006-05-09)</a></span></dt><dt><span class="sect1"><a href="#d0e106">6. Changeset 7 (2006-04-24)</a></span></dt><dt><span class="sect1"><a href="#d0e116">7. Changeset 2 (revision date=2002-09-11 actually done 2006-04-13)</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e45"></a>1. Introduction</h2></div></div></div><p> 4 4 Here are listed major revisions. 5 5 </p><p> 6 6 SAXO team should provide instructions to prevent from side effects of upgrade. 7 7 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e52"></a>2. Changeset 114 (2006-06-19)</h2></div></div></div><p> 8 This revision includes new compilation options (compile_opt idl2, strictarrsubs) in each routine .8 This revision includes new compilation options (compile_opt idl2, strictarrsubs) in each routine and new interpolation routine from irregular grid (originaly introduced in <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/110" target="_top">Changeset 110</a>). 9 9 </p><p> 10 10 Details can be seen in <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/114" target="_top">Changeset 114</a>. 11 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e6 2"></a>3. Changeset 73 (2006-05-22)</h2></div></div></div><p>11 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e65"></a>3. Changeset 73 (2006-05-22)</h2></div></div></div><p> 12 12 This revision is the last one made to split svn repository in two parts : SRC and DATA. 13 13 </p><p> 14 14 Details can be seen in <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/71" target="_top">Changeset 71</a>, <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/72" target="_top">Changeset 72</a> and <a href="http://forge.ipsl.jussieu.fr/saxo/changset/73" target="_top">Changeset 73</a>. 15 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e 78"></a>4. Changeset 69 (2006-05-11)</h2></div></div></div><p>15 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e81"></a>4. Changeset 69 (2006-05-11)</h2></div></div></div><p> 16 16 This revision includes new XXX features. 17 17 </p><p> 18 18 Details can be seen in <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/69" target="_top">Changeset 69</a>. 19 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e 88"></a>5. Changeset 68 (2006-05-09)</h2></div></div></div><p>19 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e91"></a>5. Changeset 68 (2006-05-09)</h2></div></div></div><p> 20 20 This revision is equivalent to SAXO_RD 20060124. 21 21 </p><p> … … 23 23 </p><p> 24 24 Details can be seen in <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/68" target="_top">Changeset 68</a>. 25 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e10 3"></a>6. Changeset 7 (2006-04-24)</h2></div></div></div><p>25 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e106"></a>6. Changeset 7 (2006-04-24)</h2></div></div></div><p> 26 26 This revision is equivalent to IDL_RD. 27 27 </p><p> 28 28 Details can be seen in <a href="http://forge.ipsl.jussieu.fr/saxo/changeset/7" target="_top">Changeset 7</a>. 29 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e11 3"></a>7. Changeset 2 (revision date=2002-09-11 actually done 2006-04-13)</h2></div></div></div><p>29 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e116"></a>7. Changeset 2 (revision date=2002-09-11 actually done 2006-04-13)</h2></div></div></div><p> 30 30 This revision is equivalent to <span class="bold"><strong>obsolete</strong></span> CVS repository. 31 31 </p><p> -
trunk/SRC/Documentation/xmldoc/whatsnew.xml
r114 r115 42 42 <title>Changeset 114 (2006-06-19)</title> 43 43 <para> 44 This revision includes new compilation options (compile_opt idl2, strictarrsubs) in each routine .44 This revision includes new compilation options (compile_opt idl2, strictarrsubs) in each routine and new interpolation routine from irregular grid (originaly introduced in <ulink url="http://forge.ipsl.jussieu.fr/saxo/changeset/110">Changeset 110</ulink>). 45 45 </para> 46 46 <para> -
trunk/SRC/ToBeReviewed/STRING/.idlwave_catalog
r114 r115 8 8 '(("chkeywd" fun nil (lib "chkeywd.pro" nil "saxo") "Result = %s(stringin, keywdname, keywdvalue)" (nil ("AFTER") ("SEPARATOR"))) 9 9 ("DELCHR" fun nil (lib "delchr.pro" nil "saxo") "Result = %s(OLD, C)" (nil ("help"))) 10 ("getfile" fun nil (lib "getfile.pro" nil "saxo") "Result = %s(filein)" (nil ("error") ("find") ("help") (" quiet")))10 ("getfile" fun nil (lib "getfile.pro" nil "saxo") "Result = %s(filein)" (nil ("error") ("find") ("help") ("lines") ("quiet"))) 11 11 ("GETWRD" fun nil (lib "getwrd.pro" nil "saxo") "Result = %s(TXTSTR, NTH, MTH)" (nil ("delimiter") ("help") ("last") ("location") ("notrim") ("nwords"))) 12 (" ISNUMBER" fun nil (lib "isnumber.pro" nil "saxo") "Result = %s(TXT0, X)" (nil ("help")))12 ("isnumber" fun nil (lib "isnumber.pro" nil "saxo") "Result = %s(txt0, x)" (nil ("help"))) 13 13 ("lenstr" fun nil (lib "lenstr.pro" nil "saxo") "Result = %s(str)" (nil)) 14 14 ("nwrds" fun nil (lib "nwrds.pro" nil "saxo") "Result = %s(txtstr)" (nil ("delimiter") ("help"))) -
trunk/SRC/ToBeReviewed/STRING/delchr.pro
r18 r115 31 31 32 32 FUNCTION DELCHR, OLD, C, help=hlp 33 ; 34 compile_opt idl2, strictarrsubs 35 ; 33 36 34 37 if (n_params(0) lt 2) or keyword_set(hlp) then begin … … 43 46 B = BYTE(OLD) ; convert string to a byte array. 44 47 CB = BYTE(C) ; convert char to byte. 45 w = where(b ne cb (0))46 if w (0)eq -1 then return, '' ; Nothing left.47 return, string(b (w)) ; Return new string.48 w = where(b ne cb[0]) 49 if w[0] eq -1 then return, '' ; Nothing left. 50 return, string(b[w]) ; Return new string. 48 51 END -
trunk/SRC/ToBeReviewed/STRING/getfile.pro
r18 r115 15 15 ; 2=no lines in file. 16 16 ; /QUIET means give no error message. 17 ; 17 ; LINES=n Number of lines to read (def=all). 18 ; Much faster if number of lines is known. 19 ; Automatic for IDL 5.6 or later. 18 20 ; /FIND search te file in the all !path directories (use 19 21 ; find.pro) 20 ;21 22 ; OUTPUTS: 22 23 ; s = string array. out … … 25 26 ; MODIFICATION HISTORY: 26 27 ; R. Sterner, 20 Mar, 1990 28 ; R. Sterner, 1999 Apr 14 --- Added LINES=n keyword. 29 ; R. Sterner, 2003 Aug 29 --- Automatic lines if IDL 5.6+. 30 ; R. Sterner, 2003 Sep 02 --- Check if file exists first. 31 ; R. Sterner, 2003 Sep 04 --- Fixed error in number of lines in file. 32 ; R. Sterner, 2003 Oct 10 --- Fixed error when no lines. 33 ; R. Sterner, 2004 Jan 27 --- Fixed to work in IDL as old as vers 4. 27 34 ; 28 35 ; S. Masson (smasson@lodyc.jussieu.fr) 4 Feb 2002 … … 38 45 ;------------------------------------------------------------- 39 46 40 function getfile, filein, error=err, help=hlp, quiet=quiet, find = find 41 42 if (n_params(0) lt 1) or keyword_set(hlp) then begin 43 print,' Read a text file into a string array.' 44 print,' s = getfile(f)' 45 print,' f = text file name. in' 46 print,' s = string array. out' 47 print,' Keywords:' 48 print,' ERROR=err error flag: 0=ok, 1=file not opened,' 49 print,' 2=no lines in file.' 50 print,' /QUIET means give no error message.' 51 return, -1 52 endif 47 function getfile, filein, error=err, help=hlp, quiet=quiet, lines=lines, find = find 53 48 ; 54 if keyword_set(find) then begin 55 file = find(filein) 56 file = file[0] 57 if file EQ 'NOT FOUND' then begin 58 print, ' Error in getfile: File '+filein+' not fouond.' 59 return, -1 60 endif 61 ENDIF ELSE file = filein 62 if !version.os_family EQ 'unix' then begin 63 spawn, 'cat '+file, res 64 if res[0] NE '' then return, res ELSE return, '' 65 endif 66 ; 67 get_lun, lun 68 on_ioerror, err 69 openr, lun, file 70 71 s = [' '] 72 t = '' 73 74 while not eof(lun) do begin 75 readf, lun, t 76 s = [s,t] 77 endwhile 78 79 close, lun 80 free_lun, lun 81 if n_elements(s) eq 1 then begin 82 if not keyword_set(quiet) then print,' No lines in file.' 83 err = 2 84 return,-1 85 endif 86 87 err = 0 88 return, s(1:*) 89 90 err: if !err eq -168 then begin 91 if not keyword_set(quiet) then print,' Non-standard text file format.' 92 free_lun, lun 93 return, s(1:*) 94 endif 95 if not keyword_set(quiet) then print,$ 96 ' Error in getfile: File '+file+' not opened.' 97 free_lun, lun 98 err = 1 99 return, -1 100 101 end 49 compile_opt idl2, strictarrsubs 50 ; 51 52 if (n_params(0) lt 1) or keyword_set(hlp) then begin 53 print,' Read a text file into a string array.' 54 print,' s = getfile(f)' 55 print,' f = text file name. in' 56 print,' s = string array. out' 57 print,' Keywords:' 58 print,' ERROR=err error flag: 0=ok, 1=file not opened,' 59 print,' 2=no lines in file.' 60 print,' /QUIET means give no error message.' 61 print,' LINES=n Number of lines to read (def=all).' 62 print,' Much faster if number of lines is known.' 63 print,' Automatic for IDL 5.6 or later.' 64 return, -1 65 endif 66 ; 67 if keyword_set(find) then begin 68 file = find(filein) 69 file = file[0] 70 if file EQ 'NOT FOUND' then begin 71 print, ' Error in getfile: File '+filein+' not fouond.' 72 return, -1 73 endif 74 ENDIF ELSE file = filein 75 if !version.os_family EQ 'unix' then begin 76 spawn, 'cat '+file, res 77 if res[0] NE '' then return, res ELSE return, '' 78 endif 79 80 if (!version.release+0. ge 5.5) then begin 81 f = call_function('file_search', file, count = c) 82 endif else begin 83 f = findfile(file,count=c) 84 endelse 85 if c eq 0 then begin 86 err = 1 87 return,'' 88 endif 89 90 if n_elements(line) eq 0 and (!version.release+0. ge 5.6) then begin 91 lines = file_lines(file) 92 if lines eq 0 then begin 93 if not keyword_set(quiet) then print,' No lines in file.' 94 err = 2 95 return,-1 96 endif 97 minlines = 0 98 endif else minlines=1 99 100 get_lun, lun 101 on_ioerror, err 102 openr, lun, file 103 104 if n_elements(lines) ne 0 then begin 105 s = strarr(lines) 106 readf,lun,s 107 endif else begin 108 s = [' '] 109 t = '' 110 while not eof(lun) do begin 111 readf, lun, t 112 s = [s,t] 113 endwhile 114 endelse 115 116 close, lun 117 free_lun, lun 118 if n_elements(s) eq minlines then begin 119 if not keyword_set(quiet) then print,' No lines in file.' 120 err = 2 121 return,-1 122 endif 123 if minlines eq 1 then s=s[1:*] 124 125 err = 0 126 return, s 127 128 err: if !err eq -168 then begin 129 if not keyword_set(quiet) then print,' Non-standard text file format.' 130 free_lun, lun 131 return, s 132 endif 133 if not keyword_set(quiet) then print,$ 134 ' Error in getfile: File '+file+' not opened.' 135 free_lun, lun 136 err = 1 137 return, -1 138 139 end -
trunk/SRC/ToBeReviewed/STRING/getwrd.pro
r18 r115 10 10 ; INPUTS: 11 11 ; txt = text string to extract from. in 12 ; The first element is used if txt is an array. 12 13 ; n = word number to get (first = 0 = def). in 13 14 ; m = optional last word number to get. in … … 42 43 ; R. Sterner, 13 Dec, 1992 --- Made tabs equivalent to spaces. 43 44 ; R. Sterner, 4 Jan, 1993 --- Added NWORDS keyword. 45 ; R. Sterner, 2001 Jan 15 --- Fixed to use first element if not a scalar. 44 46 ; Johns Hopkins University Applied Physics Laboratory. 45 47 ; … … 62 64 print,' wrd = getwrd(txt, n, [m])' 63 65 print,' txt = text string to extract from. in' 66 print,' The first element is used if txt is an array.' 64 67 print,' n = word number to get (first = 0 = def). in' 65 68 print,' m = optional last word number to get. in' … … 86 89 IF N_PARAMS(0) LT 3 THEN MTH = NTH ; Def is one word. 87 90 88 if strlen(txtstr ) gt 0 then begin91 if strlen(txtstr[0]) gt 0 then begin 89 92 ddel = ' ' ; Def del is a space. 90 93 if n_elements(delim) ne 0 then ddel = delim ; Use given delimiter. 91 TST = (byte(ddel)) (0); Del to byte value.92 tb = byte(txtstr ) ; String to bytes.94 TST = (byte(ddel))[0] ; Del to byte value. 95 tb = byte(txtstr[0]) ; String to bytes. 93 96 if ddel eq ' ' then begin ; Check for tabs? 94 97 w = where(tb eq 9B, cnt) ; Yes. 95 if cnt gt 0 then tb (w)= 32B ; Convert any to space.98 if cnt gt 0 then tb[w] = 32B ; Convert any to space. 96 99 endif 97 100 X = tb NE TST ; Non-delchar (=words). … … 103 106 Z2 = WHERE(SHIFT(Y2,1) EQ 1) ; Word end locations. 104 107 105 txtstr0 = txtstr ; Move string to common.108 txtstr0 = txtstr[0] ; Move string to common. 106 109 NWDS = long(TOTAL(Y)) ; Number of words. 107 110 LOC = Z ; Word start locations. … … 127 130 in = in < lst ; Larger of in and im 128 131 im = im < lst ; to be last. 129 ll = loc (in); Nth word start.130 return, strtrim(strmid(txtstr0,ll,loc (im)-loc(in)+len(im)), 2)132 ll = loc[in] ; Nth word start. 133 return, strtrim(strmid(txtstr0,ll,loc[im]-loc[in]+len[im]), 2) 131 134 endif 132 135 133 136 N = ABS(NTH) ; Allow nth<0. 134 137 IF N GT NWDS-1 THEN RETURN,'' ; out of range, null. 135 ll = loc (n); N'th word position.138 ll = loc[n] ; N'th word position. 136 139 IF NTH LT 0 THEN GOTO, NEG ; Handle nth<0. 137 140 IF MTH GT NWDS-1 THEN MTH = NWDS-1 ; Words to end. 138 141 139 142 if keyword_set(notrim) then begin 140 RETURN, STRMID(TXTSTR0,ll,LOC (MTH)-LOC(NTH)+LEN(MTH))143 RETURN, STRMID(TXTSTR0,ll,LOC[MTH]-LOC[NTH]+LEN[MTH]) 141 144 endif else begin 142 RETURN, strtrim(STRMID(TXTSTR0,ll,LOC (MTH)-LOC(NTH)+LEN(MTH)), 2)145 RETURN, strtrim(STRMID(TXTSTR0,ll,LOC[MTH]-LOC[NTH]+LEN[MTH]), 2) 143 146 endelse 144 147 -
trunk/SRC/ToBeReviewed/STRING/isnumber.pro
r18 r115 25 25 ; Johns Hopkins Applied Physics Lab. 26 26 ; R. Sterner, 12 Mar, 1990 --- upgraded. 27 ; Richard Garrett, 14 June, 1992 --- fixed bug in returned float value. 27 ; Richard Garrett, 14 June, 1992 --- fixed bug in returned float value. 28 ; R. Sterner, 1999 Nov 30 --- Fixed a bug found by Kristian Kjaer, Denmark 28 29 ; 29 30 ; Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory … … 35 36 ;------------------------------------------------------------- 36 37 37 FUNCTION ISNUMBER, TXT0, X, help=hlp 38 39 if (n_params(0) lt 1) or keyword_set(hlp) then begin 38 function isnumber, txt0, x, help=hlp 39 ; 40 compile_opt idl2, strictarrsubs 41 ; 42 if (n_params(0) lt 1) or keyword_set(hlp) then begin 40 43 print,' Determine if a text string is a valid number.' 41 44 print,' i = isnumber(txt, [x])' … … 51 54 endif 52 55 53 TXT = STRTRIM(TXT0,2) ; trim blanks.54 X= 0 ; define X.56 txt = strtrim(txt0,2) ; trim blanks. 57 x = 0 ; define X. 55 58 56 IF TXT EQ '' THEN RETURN, 0 ; null string not a number.59 if txt eq '' then return, 0 ; null string not a number. 57 60 58 SN= 159 IF NWRDS(TXT) GT 1 THEN BEGIN; get first word if more than one.60 SN= -161 TXT = GETWRD(TXT,0)62 ENDIF61 sn = 1 62 if nwrds(txt) gt 1 then begin ; get first word if more than one. 63 sn = -1 64 txt = getwrd(txt,0) 65 endif 63 66 64 f_flag = 0 ; Floating flag. 65 b = byte(txt) 66 w = where(b eq 43, cnt) 67 if cnt gt 1 then return, 0 68 t = delchr(txt,'+') 69 w = where(b eq 45, cnt) 70 if cnt gt 1 then return, 0 71 t = delchr(t,'-') 72 w = where(b eq 46, cnt) ; '.' 73 if cnt gt 1 then return, 0 ; May only be 1. 74 if cnt eq 1 then f_flag = 1 ; If one then floating. 75 t = delchr(t,'.') 76 w = where(b eq 101, cnt) ; 'e' 77 if cnt gt 1 then return, 0 78 if cnt eq 1 then f_flag = 1 79 t = delchr(t,'e') 80 w = where(b eq 69, cnt) ; 'E' 81 if cnt gt 1 then return, 0 82 if cnt eq 1 then f_flag = 1 83 t = delchr(t,'E') 84 w = where(b eq 100, cnt) ; 'd' 85 if cnt gt 1 then return, 0 86 if cnt eq 1 then f_flag = 1 87 t = delchr(t,'d') 88 w = where(b eq 68, cnt) ; 'D' 89 if cnt gt 1 then return, 0 90 if cnt eq 1 then f_flag = 1 91 t = delchr(t,'D') 67 f_flag = 0 ; Floating flag. 68 b = byte(txt) ; Convert to byte array. 69 if b[0] eq 45 then b=b[1:*] ; Drop leading '-'. ; Kristian Kjaer 70 if b[0] eq 43 then b=b[1:*] ; Drop leading '+'. ; bug fix. 71 w = where(b eq 43, cnt) ; Look for '+' 72 if cnt gt 1 then return, 0 ; Alow only 1. 73 t = delchr(txt,'+') ; Drop it. 74 w = where(b eq 45, cnt) ; Look for '-' 75 if cnt gt 1 then return, 0 ; Allow only 1. 76 t = delchr(t,'-') ; Drop it. 77 w = where(b eq 46, cnt) ; Look for '.' 78 if cnt gt 1 then return, 0 ; Allow only 1. 79 if cnt eq 1 then f_flag = 1 ; If one then floating. 80 t = delchr(t,'.') ; Drop it. 81 w = where(b eq 101, cnt) ; Look for 'e' 82 if cnt gt 1 then return, 0 ; Allow only 1. 83 if cnt eq 1 then f_flag = 1 ; If 1 then assume float. 84 t = delchr(t,'e') ; Drop it. 85 w = where(b eq 69, cnt) ; Look for 'E' 86 if cnt gt 1 then return, 0 ; Allow only 1. 87 if cnt eq 1 then f_flag = 1 ; If 1 then assume float. 88 t = delchr(t,'E') ; Drop it. 89 w = where(b eq 100, cnt) ; Look for 'd' 90 if cnt gt 1 then return, 0 ; Allow only 1. 91 if cnt eq 1 then f_flag = 1 ; If 1 then assume float. 92 t = delchr(t,'d') ; Drop it. 93 w = where(b eq 68, cnt) ; Look for 'D' 94 if cnt gt 1 then return, 0 ; Allow only 1. 95 if cnt eq 1 then f_flag = 1 ; If 1 then assume float. 96 t = delchr(t,'D') ; Drop it. 97 ;----- Allow only one 'e', 'E', 'd', or 'D' -------- 92 98 if total((b eq 101)+(b eq 69)+(b eq 100)+(b eq 68)) gt 1 then return,0 93 99 b = byte(t) 100 ;----- Allow no alphabetic characters ----------- 94 101 if total((b ge 65) and (b le 122)) ne 0 then return, 0 95 102 … … 106 113 endelse 107 114 108 END115 end -
trunk/SRC/ToBeReviewed/STRING/nwrds.pro
r18 r115 33 33 34 34 function nwrds,txtstr, help=hlp, delimiter=delim 35 ; 36 compile_opt idl2, strictarrsubs 37 ; 35 38 36 39 if (n_params(0) lt 1) or keyword_set(hlp) then begin … … 48 51 ddel = ' ' ; Default word delimiter is a space. 49 52 if n_elements(delim) ne 0 then ddel = delim ; Use given word delimiter. 50 tst = (byte(ddel)) (0); Delimiter as a byte value.53 tst = (byte(ddel))[0] ; Delimiter as a byte value. 51 54 tb = byte(txtstr) ; String to bytes. 52 55 if ddel eq ' ' then begin ; Check for tabs? 53 56 w = where(tb eq 9B, cnt) ; Yes. 54 if cnt gt 0 then tb (w)= 32B ; Convert any to space.57 if cnt gt 0 then tb[w] = 32B ; Convert any to space. 55 58 endif 56 59 x = tb ne tst ; Locate words. -
trunk/SRC/ToBeReviewed/STRING/putfile.pro
r18 r115 30 30 31 31 pro putfile, file, s, error=err, help=hlp 32 ; 33 compile_opt idl2, strictarrsubs 34 ; 32 35 33 36 if (n_params(0) lt 1) or keyword_set(hlp) then begin … … 56 59 57 60 for i = 0, n_elements(s)-1 do begin 58 t = s (i)61 t = s[i] 59 62 if t eq '' then t = ' ' 60 63 printf, lun, t
Note: See TracChangeset
for help on using the changeset viewer.