Hello Charles<div>Thank you for the script. Script for individual data file runs fine. But I am not able to run <a href="http://maxwind2.gs">maxwind2.gs</a> using two separate data files <a href="http://uwind05.nc">uwind05.nc</a> and <a href="http://vwind05.nc">vwind05.nc</a> (which are attached here with this mail). </div>
<div><br></div><div>One thing can we check maximum wind at low level. I want to check maximum wind from 1000 upto 600 or 500hPa only. My study is related with low level jet for that purpose i need maximum wind at low level only.<br>
</div><div><br></div><div><br></div><div>Thank you again</div><div><br><div class="gmail_quote">On Wed, May 4, 2011 at 1:17 AM, Charles Seman <span dir="ltr">&lt;<a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Sushant,<br>
<br>
Glad to hear the script was helpful.<br>
<br>
An updated script &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a>&quot; (attached) for a single wind file and wind variable (e.g. ucomp or vcomp) is now able to search over a user-specified domain.<br>
<br>
Another script &quot;<a href="http://maxwind2.gs" target="_blank">maxwind2.gs</a>&quot; (attached) has been coded based on &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a>&quot; to find the max wind magnitude of 2 wind variables (e.g. ucomp, vcomp) over a user-specified domain (although the wind magnitude is defined over all (x,y,z) points at each time level).<br>

<br>
The scripts were run over a subset of the total (x,y,z,t) domain to verify they work for a limited domain (note, you can set these in the scripts yourself):<br>
  x1 = 2 ; x2 = nx-1<br>
  y1 = 2 ; y2 = ny-1<br>
  z1 = 2 ; z2 = nz-1<br>
  t1 = 2 ; t2 = nt-1<br>
<br>
Run commands:<br>
cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; set wind_file = ( <a href="http://ucomp.1981-2000.climatology.nc" target="_blank">ucomp.1981-2000.climatology.nc</a> <a href="http://vcomp.1981-2000.climatology.nc" target="_blank">vcomp.1981-2000.climatology.nc</a> )<br>

cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; set wind_var = ( ucomp vcomp )<br>
cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; set wind_units = m/s<br>
cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; set lev_units = hPa<br>
cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; grads -lcx &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a> $wind_nc_file[1] $wind_var[1] $wind_units $lev_units&quot;<br>
...<br>
cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; grads -lcx &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a> $wind_nc_file[2] $wind_var[2] $wind_units $lev_units&quot;<br>
...<br>
cjs: /home/cjs/grads/Sushant_Puranik/ --&gt; grads -lcx &quot;<a href="http://maxwind2.gs" target="_blank">maxwind2.gs</a> $wind_nc_file[1] $wind_var[1] $wind_nc_file[2] $wind_var[2] $wind_units $lev_units&quot;<br>
...<br>
<br>
Please find attached sample plot files: maxwind_ucomp.pdf, maxwind_vcomp.pdf, maxwind2.pdf<br>
<br>
The scripts were tested and appear to be working OK.  Please let me know if you find any problems and/or have any questions.<br>
<br>
Thanks,<br>
Chuck<br>
<br>
sushant puranik wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks again It works fine. Since i am interested in low level wind so can you please tell me how to make it to check for low levels only(i have data at 17 pressure levels). Also i have uwind and vwind data in separate files, how to run script with two files?<br>

<br>
<br>
thank you <br>
On Mon, May 2, 2011 at 11:04 PM, Charles Seman &lt;<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt; wrote:<br>

<br>
    Sushant,<br>
<br>
    Following Kun-Hsuan Chou in the &quot;hurricane_tracking.txt&quot; file (or<br>
    <a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a> &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;),<br>
    please find attached a revised version &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a><br>
    &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;&quot; which plots the wind and its max for each time<br>
    level.<br>
<br>
    To run:<br>
<br>
    % grads -lcx &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; nc_file wind wind_units&quot;<br>
<br>
    or<br>
<br>
    ga-&gt; run <a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; nc_file wind wind_units<br>
<br>
    Where a new argument &quot;wind_units&quot; has been added which is plotted in<br>
    a title.  Be sure there are no blank spaces in the &quot;wind_units&quot; so<br>
    that GrADS gets the correct string to plot (e.g. m/s or knots,<br>
    etc.).  Note, the script as it is clears the screen before each time<br>
    level (it plots the wind field itself at the level of maximum wind<br>
    and an &quot;x&quot; at the location of the max wind).  I&#39;m not sure if this<br>
    is what you want?  If not, I would suggest adapting the code from<br>
    <a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; into a modified version of<br>
    <a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a> &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt; (and<br>
    rename it to something more appropriate like <a href="http://plot_maxwind.gs" target="_blank">plot_maxwind.gs</a><br>
    &lt;<a href="http://plot_maxwind.gs" target="_blank">http://plot_maxwind.gs</a>&gt; or whatever you choose).  One thing I found<br>
    when running the script several times on the GrADS command line is<br>
    that at some point the script exits with a &quot;Memory allocation<br>
    error!&quot; condition.  I&#39;m not sure why this happens.  In an attempt to<br>
    prevent this, &#39;c events&#39; and &#39;close 1&#39; statements were added in<br>
    addition to the previous &#39;reinit&#39; command, but this did not prevent<br>
    the problem.<br>
<br>
    I hope this helps,<br>
    Chuck<br>
<br>
    sushant puranik wrote:<br>
<br>
        Hello Charles<br>
        I tried <a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; it<br>

        works fine as per your suggestion. But i want to know at which<br>
        lat lon maximum value is instead of x and y location. So can you<br>
        please tell me how to convert x y in lat lon.<br>
<br>
        Thanks<br>
<br>
        Sushant<br>
        On Sat, Apr 30, 2011 at 11:43 AM, sushant puranik<br>
        &lt;<a href="mailto:sushantpuranik@gmail.com" target="_blank">sushantpuranik@gmail.com</a> &lt;mailto:<a href="mailto:sushantpuranik@gmail.com" target="_blank">sushantpuranik@gmail.com</a>&gt;<br>
        &lt;mailto:<a href="mailto:sushantpuranik@gmail.com" target="_blank">sushantpuranik@gmail.com</a><br>
        &lt;mailto:<a href="mailto:sushantpuranik@gmail.com" target="_blank">sushantpuranik@gmail.com</a>&gt;&gt;&gt; wrote:<br>
<br>
           Thank you for help i will try it. Please don&#39;t mind if error<br>
        occurs<br>
           i&#39;ll mail you.     Thanks again<br>
<br>
<br>
           On Sat, Apr 30, 2011 at 1:32 AM, Charles Seman<br>
           &lt;<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;&gt;<br>
        wrote:<br>
<br>
               Hello Sushant,<br>
<br>
               I think it should be possible.  Please find attached an email<br>
               exchange to this List from several years ago<br>
               &quot;hurricane_tracking.txt&quot; in which Kun-Hsuan Chou gave a<br>
        method<br>
               to track the maximum wind speed using maxloc and max.  This<br>
               technique works on a 2D field.  To find the location of<br>
        the max<br>
               wind in 4D wind dataset, a short script &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a><br>
        &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;<br>
               &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;&quot; was coded that blends the technique<br>
        used in<br>
<br>
               a local script &quot;<a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a><br>
        &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
               &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;&quot; and the technique in<br>
<br>
               Kun-Hsuan Chou&#39;s &quot;hurricane_tracking.txt&quot;.<br>
               (&quot;<a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a><br>
        &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
        &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;&quot;<br>
<br>
               itself was developed using Joe Covert&#39;s script<br>
        &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
               &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot; and Kun-Hsuan Chou&#39;s<br>
               &quot;hurricane_tracking.txt&quot;.)  &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a><br>
        &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;&quot;<br>
<br>
               loops over the time levels and finds the value of the max<br>
        wind<br>
               and its (x,y,z) location for each time level.  These<br>
        values are<br>
               printed out to the screen.  Here is a copy of what the<br>
               &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;&quot;<br>

        script printed out using GrADS<br>
<br>
               1.9b4 for a local model &quot;ucomp&quot; climatology dataset:<br>
               ---<br>
               ...<br>
               (nx,ny,nz,nt) = (144,90,23,12)<br>
               tt = 1<br>
                max ucomp = 81.833<br>
                xc = 137<br>
                yc = 71<br>
                zc = 23<br>
                ucomp(x=137,y=71,z=23) = 81.833<br>
               tt = 2<br>
                max ucomp = 68.9826<br>
                xc = 57<br>
                yc = 61<br>
                zc = 10<br>
                ucomp(x=57,y=61,z=10) = 68.9826<br>
               tt = 3<br>
                max ucomp = 62.7262<br>
                xc = 56<br>
                yc = 60<br>
                zc = 11<br>
                ucomp(x=56,y=60,z=11) = 62.7262<br>
               tt = 4<br>
                max ucomp = 61.6225<br>
                xc = 10<br>
                yc = 15<br>
                zc = 23<br>
                ucomp(x=10,y=15,z=23) = 61.6225<br>
               tt = 5<br>
                max ucomp = 85.5501<br>
                xc = 4<br>
                yc = 18<br>
                zc = 23<br>
                ucomp(x=4,y=18,z=23) = 85.5501<br>
               tt = 6<br>
                max ucomp = 109.233<br>
                xc = 4<br>
                yc = 19<br>
                zc = 23<br>
                ucomp(x=4,y=19,z=23) = 109.233<br>
               tt = 7<br>
                max ucomp = 119.698<br>
                xc = 143<br>
                yc = 17<br>
                zc = 23<br>
                ucomp(x=143,y=17,z=23) = 119.698<br>
               tt = 8<br>
                max ucomp = 117.018<br>
                xc = 2<br>
                yc = 16<br>
                zc = 22<br>
                ucomp(x=2,y=16,z=22) = 117.018<br>
               tt = 9<br>
                max ucomp = 98.7713<br>
                xc = 63<br>
                yc = 9<br>
                zc = 20<br>
                ucomp(x=63,y=9,z=20) = 98.7713<br>
               tt = 10<br>
                max ucomp = 74.1137<br>
                xc = 65<br>
                yc = 7<br>
                zc = 19<br>
                ucomp(x=65,y=7,z=19) = 74.1137<br>
               tt = 11<br>
                max ucomp = 77.7408<br>
                xc = 137<br>
                yc = 67<br>
                zc = 23<br>
                ucomp(x=137,y=67,z=23) = 77.7408<br>
               tt = 12<br>
                max ucomp = 84.3092<br>
                xc = 16<br>
                yc = 70<br>
                zc = 23<br>
                ucomp(x=16,y=70,z=23) = 84.3092<br>
               ...finished.<br>
               ---<br>
<br>
               It seems the script is working OK.  You can give it a try for<br>
               one of your datasets.  To run the script as it is coded,<br>
        run it<br>
               in batch mode as follows:<br>
               % grads -blcx &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;<br>
        &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; nc_file wind&quot;<br>
<br>
               or on the GrADS command line<br>
               <a href="http://grads.iges.org/grads/gadoc/gradcomdrun.html" target="_blank">http://grads.iges.org/grads/gadoc/gradcomdrun.html</a> as (no<br>
        quotes<br>
               as with the batch command):<br>
               ga-&gt; run <a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;<br>
        &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; nc_file wind<br>
<br>
               where &quot;nc_file&quot; is the netCDF file containing the &quot;wind&quot;<br>
               variable name (the &quot;nc_file&quot; and &quot;wind&quot; are generic names;<br>
               please replace them with the actual netCDF file and wind<br>
               variable in the netCDF file).  Note, please also include the<br>
               quotes surrounding &quot;<a href="http://maxwind.gs" target="_blank">maxwind.gs</a> &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt;<br>
        &lt;<a href="http://maxwind.gs" target="_blank">http://maxwind.gs</a>&gt; nc_file wind&quot;<br>
<br>
               for the batch command or else the batch command won&#39;t work.<br>
<br>
               I hope this helps.  Please let me know if you have any<br>
        questions.<br>
<br>
               Thanks,<br>
               Chuck<br>
<br>
               sushant puranik wrote:<br>
<br>
                   Hello Charles<br>
                   I want to make a jet stream plot. Can i make it with the<br>
                   help of hurricane center script by changing minloc<br>
        and min<br>
                   to maxloc and max.<br>
                   any suggestion?<br>
<br>
                   thanks<br>
<br>
                   Sushant<br>
                   On Wed, Jan 5, 2011 at 1:01 AM, Charles Seman<br>
                   &lt;<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt; &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;<br>
                   &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;&gt;&gt; wrote:<br>
<br>
                      Jie,<br>
<br>
                      Attached is a file<br>
        File_Error_1_Grads_1.9-Plot_tc_shi.gs.txt<br>
                      containing the text from an email exchange to the<br>
        GrADS<br>
                   Listserv<br>
                      between Joe Covert and Diane Stokes on 9/13/2004 -- on<br>
                   4/27/06,<br>
                      found via a Google search for &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a><br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                   &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                      &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot;:<br>
                   <a href="http://caos.iisc.ernet.in/gslib/plot_tc_shi.gs" target="_blank">http://caos.iisc.ernet.in/gslib/plot_tc_shi.gs</a><br>
<br>
<br>
                      The attached GrADS script<br>
        <a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a> &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
                   &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
                      &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt; (along with<br>
        pause.gsf,<br>
                   aGrADS<br>
<br>
                      script function used by the plot script) is a locally<br>
                   modified<br>
                      version derived from Joe Covert&#39;s script<br>
        &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                   &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                      &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot; (<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a> &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;&gt;<br>
                      &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;&gt;&gt;) which was posted to the GrADS<br>
                   Listserv<br>
<br>
                      on 9/13/2004 (his script was named <a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a><br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                   &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                      &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;) and code from<br>
                   hurricane_tracking.txt (taken<br>
<br>
                      from an email exchange posted to the GrADS Listserv by<br>
                   Kun-Hsuan<br>
                      Chou and Arturo Caracas Uribe in Oct, 2004)...<br>
<br>
                      Please find below code from hurricane_tracking.txt<br>
        (taken<br>
                   from an<br>
                      email exchange posted to the GrADS Listserv by<br>
        Kun-Hsuan<br>
                   Chou and<br>
                      Arturo Caracas Uribe in Oct, 2004) illustrating a<br>
                   technique for<br>
                      finding max wind in a 2D field... and below that some<br>
                   code from<br>
                      attached script <a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a><br>
        &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
                   &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
                      &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt; to find the min<br>
        sea-level<br>
<br>
                      pressure in a 2D field...<br>
<br>
                      code from Kun-Hsuan Chou to find maximum wind<br>
        speed from<br>
                      hurricane_tracking.txt:<br>
                      ---<br>
                      &#39;d<br>
        maxloc(max(mag(u,v),lon=120,lon=130),lat=15,lat=25)&#39;<br>
                       line=sublin(result,2)<br>
                       ygrd=subwrd(line,4)<br>
                      &#39;d<br>
        maxloc(max(mag(u,v),lat=15,lat=25),lon=120,lon=130)&#39;<br>
                       line=sublin(result,2)<br>
                       xgrd=subwrd(line,4)<br>
                      &#39;set x &#39;xgrd<br>
                      lonval = subwrd(result,4)<br>
                      &#39;set y &#39;ygrd<br>
                      latval = subwrd(result,4)<br>
                      &#39;q w2xy &#39;lonval&#39; &#39;latval<br>
                      xpos = subwrd(result,3)<br>
                      ypos = subwrd(result,6)<br>
                      &#39;draw mark 1 &#39;xpos&#39; &#39;ypos&#39; .2&#39;<br>
                      ---<br>
<br>
                      sample code from <a href="http://plot_hurricane_center3.gs" target="_blank">plot_hurricane_center3.gs</a><br>
        &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
                   &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt;<br>
                      &lt;<a href="http://plot_hurricane_center3.gs" target="_blank">http://plot_hurricane_center3.gs</a>&gt; to find hurricane<br>
                   center (see<br>
<br>
                      script for supporting code):<br>
                      ---<br>
                      *<br>
                      * find minimum &quot;pressure&quot; within box area (x1,x2),<br>
        (y1,y2)...<br>
                      *<br>
                          &#39;set x &#39;x1<br>
                          &#39;set y &#39;y1<br>
                          &#39;set z 1&#39;<br>
                          &#39;set t &#39;tt<br>
                          &#39;set gxout print&#39;<br>
                          nxp = x2-x1+1<br>
                      *      say &#39;    nxp = &#39;nxp<br>
                          nyp = y2-y1+1<br>
                      *      say &#39;    nyp = &#39;nyp<br>
                          &#39;d minloc(min(psl,y=&#39;y1&#39;,y=&#39;y2&#39;),x=&#39;x1&#39;,x=&#39;x2&#39;)&#39;<br>
                            rec=sublin(result,nxp+3)<br>
                            xc=subwrd(rec,1)<br>
                          &#39;d minloc(min(psl,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;)&#39;<br>
                            rec=sublin(result,nyp+3)<br>
                            yc=subwrd(rec,1)<br>
                          say<br>
                          say &#39;location of minimum &quot;pressure&quot;...&#39;<br>
                          say<br>
                          say &#39; (xc,yc) = (&#39;xc&#39;,&#39;yc&#39;)&#39;<br>
                      *<br>
                      * find &quot;world&quot; coordinates of (xc,yc) and convert<br>
        &quot;world&quot;<br>
                   coordinates<br>
                      * to &quot;xy&quot; coordinates for plotting track of hurricane<br>
                   center...<br>
                      *<br>
                          &#39;set x &#39;xc<br>
                          lonval = subwrd(result,4)<br>
                          &#39;set y &#39;yc<br>
                          latval = subwrd(result,4)<br>
                          say &#39; (lonval,latval) = (&#39;lonval&#39;,&#39;latval&#39;)&#39;<br>
                          &#39;q w2xy &#39;lonval&#39; &#39;latval<br>
                          xpos = subwrd(result,3)<br>
                          ypos = subwrd(result,6)<br>
                          say &#39; (xpos,ypos) = (&#39;xpos&#39;,&#39;ypos&#39;)&#39;<br>
                      *<br>
                      * write (xpos,ypos) to output file...<br>
                      *<br>
                          res = write (&#39;&#39;<a href="http://hurricane.nf" target="_blank">hurricane.nf</a><br>
        &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt; &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
                   &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;&#39;&#39;,&#39;t = &#39;tt&#39;<br>
<br>
                      xpos = &#39;xpos&#39; ypos = &#39;ypos&#39;&#39;)<br>
<br>
                          pause()<br>
                      ---<br>
<br>
                      Please let me know if you have any questions.<br>
<br>
                      Hope this helps,<br>
                      Chuck<br>
<br>
                      Jie TANG wrote:<br>
<br>
<br>
                          hi,grads folks ,<br>
                           I am using grads v1.9, trying to find the<br>
        center of<br>
                   typhoon via<br>
                          minloc function.<br>
                          the key script is shown as below:<br>
                          slplat=min(slp,lat=19,lat=26)                                                  tclon=minloc(slplat,lon=119,lon=126)                                                   slplon=min(slp,lon=119,lon=126)                                                 tclat=minloc(slplon,lat=19,lat=26)<br>

<br>
                          but grads tell me that &quot;function not found min<br>
        &quot; and<br>
                   when i<br>
                          changed my script to be :<br>
                          tclat=min(minloc(slpt,lon=119,lon=126),<br>
        lat=19,lat=26)<br>
                          tclon=min(minloc(slpt, lat=19,lat=26<br>
        )lon=119,lon=126)<br>
<br>
<br>
                          how can i finx my scrpit ? thank you .:)<br>
                          --<br>
                          TANG Jie<br>
                          Email: <a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;<br>
                   &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;&gt; &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;<br>
                   &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;&gt;&gt;<br>
                          &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;<br>
                   &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;&gt; &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;<br>
                   &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a><br>
        &lt;mailto:<a href="mailto:totangjie@gmail.com" target="_blank">totangjie@gmail.com</a>&gt;&gt;&gt;&gt;<br>
<br>
<br>
                          Tel: 0086-2154896104<br>
                          Shanghai Typhoon Institute,China<br>
                                            ------------------------------------------------------------------------<br>
<br>
                          _______________________________________________<br>
                          gradsusr mailing list<br>
                          <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt; &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;&gt;<br>
                   &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt; &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;&gt;&gt;<br>
<br>
<br>
                          <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
                                               --<br>
                      Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;<br>
                      &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;&gt; should be considered my NOAA<br>
                      email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a><br>
        &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a> &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;&gt;<br>
        &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a> &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;<br>
<br>
                   &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a> &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;&gt;&gt;.<br>
<br>
<br>
                                        ********************************************************************<br>
                      Charles Seman                                                  <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>

        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;<br>
                      &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;&gt;<br>
<br>
                      U.S. Department of Commerce / NOAA / OAR<br>
                      Geophysical Fluid Dynamics Laboratory         voice:<br>
                   (609) 452-6547<br>
                      201 Forrestal Road                              fax:<br>
                   (609) 987-5063<br>
                      Princeton, NJ  08540-6649                              <a href="http://www.gfdl.noaa.gov/~cjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
                                        ********************************************************************<br>
<br>
                      &quot;The contents of this message are mine personally<br>
        and do<br>
                   not reflect any<br>
                      official or unofficial position of the United States<br>
                   Federal Government,<br>
                      the United States Department of Commerce, or NOAA.&quot;<br>
<br>
<br>
<br>
                      worked great ... thanks.  joe<br>
<br>
                      Diane Stokes wrote:<br>
<br>
                       &gt; Joe,<br>
                       &gt;<br>
                       &gt; Read works fine for me in 1.9.<br>
                       &gt;<br>
                       &gt; I think this is the issue where &#39;pull&#39; in 1.9<br>
        throws<br>
                   in a carriage<br>
                       &gt; return.  The read statement is not getting the<br>
        exact<br>
                   filename.<br>
                       &gt;<br>
                       &gt; Try adding:<br>
                       &gt;   file=sublin(file,1)<br>
                       &gt; after each:<br>
                       &gt;   pull file<br>
                       &gt;<br>
                       &gt; Diane<br>
                       &gt;<br>
                       &gt; Joe Covert wrote:<br>
                       &gt;<br>
                       &gt;&gt; There appears to be a problem with version 1.9 of<br>
                   GrADS &quot;read&quot;<br>
                      function.<br>
                       &gt;&gt;<br>
                       &gt;&gt; The <a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                   &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt; script (see below)<br>
<br>
                      uses the read function to open the<br>
                       &gt;&gt; track data file and the program gives the subject<br>
                   error message<br>
                      &quot;File<br>
                       &gt;&gt; Error 1&quot;.<br>
                       &gt;&gt;<br>
                       &gt;&gt; jc<br>
                       &gt;&gt;<br>
                       &gt;&gt;<br>
                       &gt;&gt; *  Script to draw an hurricane-track plot.<br>
                       &gt;&gt; *  Does little error checking on the input file.<br>
                       &gt;&gt; *  Assumes the input file is set up as follows:<br>
                       &gt;&gt; *<br>
                       &gt;&gt; *    Line 1:  Title<br>
                       &gt;&gt; *    Line 2:  Drawing primitives for marks:<br>
        marktype size<br>
                       &gt;&gt; *    Line 3:  Drawing primitives for lines: color<br>
                   style thickness<br>
                       &gt;&gt; *    Line 4:  Starting hour and the interval of<br>
                   plotting points<br>
                       &gt;&gt; *             e.g., 0 6 means that track<br>
        starts at 0<br>
                   hour and mark<br>
                       &gt;&gt; *                   will be plotted every 6 hours.<br>
                       &gt;&gt; *    Rest of lines:  hour  long.  lat.<br>
                       &gt;&gt; *             e.g.,   0    -70.5  25.0<br>
                       &gt;&gt; *                     6    -71.8  25.2<br>
                       &gt;&gt; *                            :<br>
                       &gt;&gt; *                            :<br>
                       &gt;&gt; *<br>
                       &gt;&gt; *  Also assumes that a file has been opened (any<br>
                   file, doesn&#39;t<br>
                       &gt;&gt; *  matter -- the set command doesn&#39;t work until a<br>
                   file has been<br>
                       &gt;&gt; *  opened).<br>
                       &gt;&gt; *<br>
                       &gt;&gt;<br>
                       &gt;&gt; function main()<br>
                       &gt;&gt;<br>
                       &gt;&gt; *  &#39;clear&#39;<br>
                       &gt;&gt;<br>
                       &gt;&gt;   &#39;open dummy.ctl&#39;<br>
                       &gt;&gt;   &#39;set lat 20 50&#39;<br>
                       &gt;&gt;   &#39;set lon -90 -30&#39;<br>
                       &gt;&gt;   &#39;set mpdset hires&#39;<br>
                       &gt;&gt;   &#39;set poli on&#39;<br>
                       &gt;&gt;   &#39;draw map&#39;<br>
                       &gt;&gt;<br>
                       &gt;&gt;<br>
                       &gt;&gt; say &#39;Enter File Name: (type q to stop)&#39;<br>
                       &gt;&gt; pull fname<br>
                       &gt;&gt;<br>
                       &gt;&gt; while (fname != &#39;q&#39;)<br>
                       &gt;&gt;<br>
                       &gt;&gt; *  Read the 1st record: Title<br>
                       &gt;&gt;<br>
                       &gt;&gt;   ret = read(fname)<br>
                       &gt;&gt;   rc = sublin(ret,1)<br>
                       &gt;&gt;   if (rc&gt;0)<br>
                       &gt;&gt;       say &#39;File Error 1&#39;<br>
                       &gt;&gt;       return<br>
                       &gt;&gt;   endif<br>
                       &gt;&gt;   title = sublin(ret,2)<br>
                       &gt;&gt;   say title<br>
                       &gt;&gt;<br>
                       &gt;&gt; *  Read the drawing primitives<br>
                       &gt;&gt;<br>
                       &gt;&gt;   ret = read(fname)<br>
                       &gt;&gt;   rc = sublin(ret,1)<br>
                       &gt;&gt;   if (rc&gt;0)<br>
                       &gt;&gt;      say &#39;File Error 2&#39;<br>
                       &gt;&gt;      return<br>
                       &gt;&gt;   endif<br>
                       &gt;&gt;   dpline = sublin(ret,2)<br>
                       &gt;&gt;   marktype = subwrd(dpline,1)<br>
                       &gt;&gt;   marksize = subwrd(dpline,2)<br>
                       &gt;&gt;   ret = read(fname)<br>
                       &gt;&gt;   rc = sublin(ret,1)<br>
                       &gt;&gt;   if (rc&gt;0)<br>
                       &gt;&gt;      say &#39;File Error 3&#39;<br>
                       &gt;&gt;      return<br>
                       &gt;&gt;   endif<br>
                       &gt;&gt;   dpline = sublin(ret,2)<br>
                       &gt;&gt;   lcolor = subwrd(dpline,1)<br>
                       &gt;&gt;   lstyle = subwrd(dpline,2)<br>
                       &gt;&gt;   lthick = subwrd(dpline,3)<br>
                       &gt;&gt;   say &#39; marktype, marksize, lcolor, lstyle and<br>
        lthick:&#39;<br>
                       &gt;&gt;   say &#39; &#39;marktype &#39; &#39; marksize &#39; &#39; lcolor &#39; &#39;<br>
        lstyle<br>
                   &#39; &#39; lthick<br>
                       &gt;&gt;<br>
                       &gt;&gt; * Read starting hour and the interval hours of<br>
                   plotting points<br>
                       &gt;&gt;<br>
                       &gt;&gt;   ret = read(fname)<br>
                       &gt;&gt;   rc = sublin(ret,1)<br>
                       &gt;&gt;   if (rc&gt;0)<br>
                       &gt;&gt;      say &#39;File Error 4&#39;<br>
                       &gt;&gt;      return<br>
                       &gt;&gt;   endif<br>
                       &gt;&gt;   dhour = sublin(ret,2)<br>
                       &gt;&gt;   start = subwrd(dhour,1)<br>
                       &gt;&gt;   jump = subwrd(dhour,2)<br>
                       &gt;&gt;   say &#39; starting hour and the interval hours of<br>
                   plotting points:&#39;<br>
                       &gt;&gt;   say &#39;  &#39;start&#39; &#39;jump<br>
                       &gt;&gt;<br>
                       &gt;&gt; *  Read all data points<br>
                       &gt;&gt;<br>
                       &gt;&gt;   ret = read(fname)<br>
                       &gt;&gt;   rc = sublin(ret,1)<br>
                       &gt;&gt;   while (rc = 0)<br>
                       &gt;&gt;       loc = sublin(ret,2)<br>
                       &gt;&gt;       hour = subwrd(loc,1)<br>
                       &gt;&gt;       dlong.hour = subwrd(loc,2)<br>
                       &gt;&gt;       dlat.hour = subwrd(loc,3)<br>
                       &gt;&gt; *      prompt &#39; hour &#39; hour &#39; are read,&#39;<br>
                       &gt;&gt; *      say &#39; long=&#39; dlong.hour &#39;    lat=&#39;<br>
        dlat.hour<br>
                       &gt;&gt;       ret = read(fname)<br>
                       &gt;&gt;       rc = sublin(ret,1)<br>
                       &gt;&gt;   endwhile<br>
                       &gt;&gt;<br>
                       &gt;&gt;   if (rc!=2 &amp; rc!=0)<br>
                       &gt;&gt;          say &#39;File Error 5, rc=&#39; rc<br>
                       &gt;&gt;          return<br>
                       &gt;&gt;   endif<br>
                       &gt;&gt;<br>
                       &gt;&gt;   endhour = hour<br>
                       &gt;&gt;   say &#39; endhour=&#39; endhour<br>
                       &gt;&gt;<br>
                       &gt;&gt; * Plotting<br>
                       &gt;&gt;<br>
                       &gt;&gt;   &#39;set line &#39;lcolor&#39; &#39;lstyle&#39; &#39;lthick<br>
                       &gt;&gt;   &#39;query w2xy &#39;dlong.start&#39; &#39;dlat.start<br>
                       &gt;&gt;   xprev = subwrd(result,3)<br>
                       &gt;&gt;   yprev = subwrd(result,6)<br>
                       &gt;&gt;   &#39;draw mark &#39;marktype&#39; &#39;xprev&#39; &#39;yprev&#39; &#39;marksize<br>
                       &gt;&gt;   next = start+jump<br>
                       &gt;&gt;   while (next &lt;= endhour)<br>
                       &gt;&gt; *      say &#39; &#39;dlong.start&#39; &#39;dlat.start<br>
                       &gt;&gt;       &#39;query w2xy &#39;dlong.next&#39; &#39;dlat.next<br>
                       &gt;&gt;       xnext = subwrd(result,3)<br>
                       &gt;&gt;       ynext = subwrd(result,6)<br>
                       &gt;&gt;       &#39;draw line &#39;xprev&#39; &#39;yprev&#39; &#39;xnext&#39; &#39;ynext<br>
                       &gt;&gt; *      say &#39; &#39;xprev&#39; &#39;yprev&#39; &#39;xnext&#39; &#39;ynext<br>
                       &gt;&gt;       &#39;draw mark &#39;marktype&#39; &#39;xnext&#39; &#39;ynext&#39;<br>
        &#39;marksize<br>
                       &gt;&gt;       next = next+jump<br>
                       &gt;&gt;       xprev = xnext<br>
                       &gt;&gt;       yprev = ynext<br>
                       &gt;&gt;   endwhile<br>
                       &gt;&gt;<br>
                       &gt;&gt;   say fname &#39; is working fine.&#39;<br>
                       &gt;&gt;<br>
                       &gt;&gt; * read in the filename to be plotted next<br>
                       &gt;&gt;<br>
                       &gt;&gt;   say &#39;Enter File Name: (type q to stop)&#39;<br>
                       &gt;&gt;   pull fname<br>
                       &gt;&gt;<br>
                       &gt;&gt; endwhile<br>
                       &gt;&gt;<br>
<br>
<br>
                                        *----------------------------------------------------------------------<br>
                      *<br>
                      *  Adapted from <a href="http://plot_hurricane_center2c.gs" target="_blank">plot_hurricane_center2c.gs</a><br>
        &lt;<a href="http://plot_hurricane_center2c.gs" target="_blank">http://plot_hurricane_center2c.gs</a>&gt;<br>
                   &lt;<a href="http://plot_hurricane_center2c.gs" target="_blank">http://plot_hurricane_center2c.gs</a>&gt;<br>
                      &lt;<a href="http://plot_hurricane_center2c.gs" target="_blank">http://plot_hurricane_center2c.gs</a>&gt;, which was<br>
        adapted from:<br>
<br>
                      *<br>
                      *  (1) &quot;plot_hurricane_center2[a][b].gs&quot; (from<br>
                      &quot;<a href="http://plot_hurricane_center.gs" target="_blank">plot_hurricane_center.gs</a><br>
        &lt;<a href="http://plot_hurricane_center.gs" target="_blank">http://plot_hurricane_center.gs</a>&gt;<br>
                   &lt;<a href="http://plot_hurricane_center.gs" target="_blank">http://plot_hurricane_center.gs</a>&gt;<br>
                   &lt;<a href="http://plot_hurricane_center.gs" target="_blank">http://plot_hurricane_center.gs</a>&gt;&quot;),<br>
<br>
                      *      locally modified versions derived from Joe<br>
                   Covert&#39;s script<br>
                      *      &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                   &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot; (<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a> &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;&gt;<br>
                      &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;<br>
                   &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;&gt;&gt;), which was posted to the<br>
<br>
                      *      GrADS Listserv on 9/13/2004 (his script was<br>
        named<br>
                      <a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                   &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;)<br>
<br>
                      *      on 4/27/06, found via a Google search for<br>
                   &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
                      &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot;:<br>
<br>
                      *      <a href="http://caos.iisc.ernet.in/gslib/plot_tc_shi.gs" target="_blank">http://caos.iisc.ernet.in/gslib/plot_tc_shi.gs</a><br>
                      *<br>
                      *  (2) code in &quot;hurricane_tracking.txt&quot; (taken from an<br>
                   email exchange<br>
                      *      posted to the GrADS Listserv by Kun-Hsuan<br>
        Chou and<br>
                      *      Arturo Caracas Uribe in Oct, 2004)<br>
                      *<br>
                      *<br>
                      *  To use: grads -l<br>
                      *<br>
                                        *----------------------------------------------------------------------<br>
<br>
                      function main()<br>
<br>
                       &#39;reinit&#39;<br>
<br>
                                        ************************************************************************<br>
                      *  Allow external GrADS functions<br>
                                        ************************************************************************<br>
<br>
                       rc = gsfallow(&quot;on&quot;)<br>
<br>
                                        ************************************************************************<br>
                      *  Define dataset file information and plotting limits<br>
                   for base map...<br>
                                        ************************************************************************<br>
<br>
                      **  nc_file1 = &#39;&#39;<br>
                      **  nc_file2 = &#39;&#39;<br>
                      **  nc_file3 = &#39;&#39;<br>
                      **  nc_file = &#39;&#39;nc_file1&#39; &#39;nc_file2&#39; &#39;nc_file3&#39;&#39;<br>
                       nc_file = &#39;your_netCDF_file&#39;<br>
<br>
                       lon1 = 298 ; lon2 = 308<br>
                       lat1 =  20 ; lat2 =  25<br>
<br>
                                        ************************************************************************<br>
                      *  Legend captions, colors, and marks for the plots<br>
                                        ************************************************************************<br>
<br>
                      **  nmodels = 1<br>
                      **  model.1 = &#39;isabel_ras&#39;<br>
                      **  model.2 = &#39;isabel_isotke&#39;<br>
                      **  model.3 = &#39;isabel_my25&#39;<br>
<br>
                      **  titles.1 = model.1 ; colors.1 = 2 ; marks.1 = 2<br>
                      **  titles.2 = model.2 ; colors.2 = 3 ; marks.2 = 2<br>
                      **  titles.3 = model.3 ; colors.3 = 4 ; marks.3 = 2<br>
                      ***<br>
                      ***  Define the legend plotter input...<br>
                      ***<br>
                      **  titles = &#39;-t&#39; ; colors = &#39;-c&#39; ; marks = &#39;-m&#39; ;<br>
        lines<br>
                   = &#39;-l&#39;<br>
                      **  n=1<br>
                      **  while ( n &lt;= nmodels )<br>
                      **    titles = &#39;&#39;titles&#39; &quot;&#39;titles.n&#39;&quot;&#39;<br>
                      **    colors = &#39;&#39;colors&#39; &#39;colors.n<br>
                      **    marks = &#39;&#39;marks&#39; &quot;&#39;marks.n&#39;&quot;&#39;<br>
                      **    lines = &#39;&#39;lines&#39; 1&#39;<br>
                      **    n=n+1<br>
                      **  endwhile<br>
<br>
                      **  legend_info = &#39;&#39;colors&#39; &#39;lines&#39; &#39;marks&#39;<br>
        &#39;titles&#39; -p&#39;<br>
<br>
                       nmodels = 1<br>
                       model.1 = &#39;title_name_for_your_netCDF_dataset&#39;<br>
<br>
                       titles.1 = model.1 ; colors.1 = 2 ; marks.1 = 2<br>
                      *<br>
                      *  Define the legend plotter input...<br>
                      *<br>
                       titles = &#39;-t&#39; ; colors = &#39;-c&#39; ; marks = &#39;-m&#39; ;<br>
        lines = &#39;-l&#39;<br>
                       n=1<br>
                       while ( n &lt;= nmodels )<br>
                         titles = &#39;&#39;titles&#39; &quot;&#39;titles.n&#39;&quot;&#39;<br>
                         colors = &#39;&#39;colors&#39; &#39;colors.n<br>
                         marks = &#39;&#39;marks&#39; &quot;&#39;marks.n&#39;&quot;&#39;<br>
                         lines = &#39;&#39;lines&#39; 1&#39;<br>
                         n=n+1<br>
                       endwhile<br>
<br>
                       legend_info = &#39;&#39;colors&#39; &#39;lines&#39; &#39;marks&#39; &#39;titles&#39; -p&#39;<br>
<br>
                      *  ...other drawing primitives<br>
<br>
                       marksize = 0.1<br>
<br>
                       lstyle = 1 ; lthick = 5<br>
<br>
                                        ************************************************************************<br>
                      *  Use &quot;cbar_line&quot; or &quot;cbar_line_box&quot;?<br>
                                        ************************************************************************<br>
<br>
                       legend_plotter = &#39;cbar_line&#39;<br>
                      *  legend_plotter = &#39;cbar_line_box&#39;<br>
<br>
                                        ************************************************************************<br>
                      *  Plot page limits<br>
                                        ************************************************************************<br>
<br>
                       plot_vpage = &#39;0 11 0 8.5&#39;<br>
                       plot_area  = &#39;1 10 1 7.5&#39;<br>
<br>
                       xl = subwrd(plot_area,1) ; xr = subwrd(plot_area,2)<br>
                       yb = subwrd(plot_area,3) ; yt = subwrd(plot_area,4)<br>
<br>
                       xc = xl + (xr-xl)/2<br>
<br>
                                        ************************************************************************<br>
                      *  GrADS metafile output...<br>
                                        ************************************************************************<br>
<br>
                       &#39;enable print hurricane_track.gx&#39;<br>
<br>
                                        *-----------------------------------------------------------------------<br>
                      *  Define and plot track of minimum surface<br>
        pressure for<br>
                   each dataset...<br>
                                        *-----------------------------------------------------------------------<br>
<br>
                       nf=1<br>
                       while ( nf &lt;= nmodels )<br>
<br>
                      * Open dataset file and define parameters...<br>
<br>
                         fname = subwrd(nc_file,nf)<br>
                         &#39;sdfopen &#39;fname<br>
                         &#39;set dfile &#39;nf<br>
                         &#39;q file&#39;<br>
                         rec3 = sublin(result,3) ; binary_file =<br>
        subwrd(rec3,2)<br>
                         say<br>
                         say<br>
                         say &#39;*** &#39;binary_file&#39; ***&#39;<br>
                         say<br>
                         rec5 = sublin(result,5)<br>
                         nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz =<br>
                   subwrd(rec5,9) ;<br>
                      nt = subwrd(rec5,12)<br>
<br>
                         if( nf = 1 )<br>
<br>
                      * Plot base map...<br>
<br>
                                  plot_base_map(plot_vpage,plot_area,lon1,lon2,lat1,lat2)<br>
<br>
                         endif<br>
<br>
                      * Define locations of &quot;hurricane center&quot; for plotting<br>
                   points, and write<br>
                      * locations out to ASCII text file for read-in for<br>
                   plotting track<br>
                      later...<br>
<br>
                         <a href="http://hurricane.nf" target="_blank">hurricane.nf</a> &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
        &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
                   &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt; = &#39;hurricane_&#39;nf&#39;.txt&#39;<br>
<br>
<br>
                         ts=2<br>
                         tt=ts<br>
                         while ( tt &lt;= nt )<br>
                           &#39;set t &#39;tt<br>
                           say<br>
                           say &#39;---------&#39;<br>
                           say &#39; tt = &#39;tt<br>
                           say &#39;---------&#39;<br>
                           say<br>
                           &#39;set lon &#39;lon1&#39; &#39;lon2<br>
                           &#39;set lat &#39;lat1&#39; &#39;lat2<br>
                           &#39;set z 1&#39;<br>
                      *<br>
                      * here is where you put in the name of your sea-level<br>
                   pressure variable:<br>
                      *<br>
                           &#39;define psl =<br>
        name_of_your_sea_level_pressure_variable&#39;<br>
                           &#39;set gxout shaded&#39;<br>
                           &#39;d psl&#39;<br>
                      *<br>
                      * following interactive &quot;box location&quot; code<br>
        adapted from<br>
                      &quot;<a href="http://cbar_line_box.gs" target="_blank">cbar_line_box.gs</a> &lt;<a href="http://cbar_line_box.gs" target="_blank">http://cbar_line_box.gs</a>&gt;<br>
        &lt;<a href="http://cbar_line_box.gs" target="_blank">http://cbar_line_box.gs</a>&gt;<br>
                   &lt;<a href="http://cbar_line_box.gs" target="_blank">http://cbar_line_box.gs</a>&gt;&quot;...<br>
<br>
                      *<br>
                           say &#39;Click where you want the left upper<br>
        corner of<br>
                   the box&#39;<br>
                           &#39;query bpos&#39;<br>
                           xb1o = subwrd(result,3)<br>
                           yb2o = subwrd(result,4)<br>
                           say &#39;Click where you want the right lower<br>
        corner of<br>
                   the box&#39;<br>
                           &#39;query bpos&#39;<br>
                           xb2o = subwrd(result,3)<br>
                           yb1o = subwrd(result,4)<br>
<br>
                           say<br>
                           say &#39;...left upper corner of the box at X Y:<br>
        &#39;xb1o&#39;<br>
                   &#39;yb2o<br>
                           say &#39;...right lower corner of the box at X Y:<br>
        &#39;xb2o&#39;<br>
                   &#39;yb1o<br>
                      *<br>
                      * draw box to show specified area for defining<br>
        hurricane<br>
                   center...<br>
                      *<br>
                           &#39;set line 1 1&#39;<br>
                           &#39;draw rec &#39;xb1o&#39; &#39;yb1o&#39; &#39;xb2o&#39; &#39;yb2o<br>
                      *<br>
                      * convert box &quot;xy&quot; coordinates to &quot;grid&quot; coordinates<br>
                      * for finding minimum &quot;pressure&quot; (hurricane center)...<br>
                      *<br>
                           &#39;q xy2gr &#39;xb1o&#39; &#39;yb2o<br>
                           x1o = subwrd(result,3) ; x1 = math_int(x1o+0.5)<br>
                           y2o = subwrd(result,6) ; y2 = math_int(y2o+0.5)<br>
                           &#39;q xy2gr &#39;xb2o&#39; &#39;yb1o<br>
                           x2o = subwrd(result,3) ; x2 = math_int(x2o+0.5)<br>
                           y1o = subwrd(result,6) ; y1 = math_int(y1o+0.5)<br>
                           say<br>
                           say &#39;Specified grid coordinates (x1o,x2o),<br>
        (y1o,y2o)<br>
                   from box,&#39;<br>
                           say &#39;rounded to (x1,x2), (y1,y2) for finding<br>
        minimum<br>
                   &quot;pressure&quot;...&#39;<br>
                           say<br>
                           say &#39; (x1o,x2o) = (&#39;x1o&#39;,&#39;x2o&#39;)  --&gt;  (x1,x2) =<br>
                   (&#39;x1&#39;,&#39;x2&#39;)&#39;<br>
                           say &#39; (y1o,y2o) = (&#39;y1o&#39;,&#39;y2o&#39;)  --&gt;  (y1,y2) =<br>
                   (&#39;y1&#39;,&#39;y2&#39;)&#39;<br>
                      *<br>
                      * find minimum &quot;pressure&quot; within box area (x1,x2),<br>
        (y1,y2)...<br>
                      *<br>
                           &#39;set x &#39;x1<br>
                           &#39;set y &#39;y1<br>
                           &#39;set z 1&#39;<br>
                           &#39;set t &#39;tt<br>
                           &#39;set gxout print&#39;<br>
                           nxp = x2-x1+1<br>
                      *      say &#39;    nxp = &#39;nxp<br>
                           nyp = y2-y1+1<br>
                      *      say &#39;    nyp = &#39;nyp<br>
                           &#39;d minloc(min(psl,y=&#39;y1&#39;,y=&#39;y2&#39;),x=&#39;x1&#39;,x=&#39;x2&#39;)&#39;<br>
                             rec=sublin(result,nxp+3)<br>
                             xc=subwrd(rec,1)<br>
                           &#39;d minloc(min(psl,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;)&#39;<br>
                             rec=sublin(result,nyp+3)<br>
                             yc=subwrd(rec,1)<br>
                           say<br>
                           say &#39;location of minimum &quot;pressure&quot;...&#39;<br>
                           say<br>
                           say &#39; (xc,yc) = (&#39;xc&#39;,&#39;yc&#39;)&#39;<br>
                      *<br>
                      * find &quot;world&quot; coordinates of (xc,yc) and convert<br>
        &quot;world&quot;<br>
                   coordinates<br>
                      * to &quot;xy&quot; coordinates for plotting track of hurricane<br>
                   center...<br>
                      *<br>
                           &#39;set x &#39;xc<br>
                           lonval = subwrd(result,4)<br>
                           &#39;set y &#39;yc<br>
                           latval = subwrd(result,4)<br>
                           say &#39; (lonval,latval) = (&#39;lonval&#39;,&#39;latval&#39;)&#39;<br>
                           &#39;q w2xy &#39;lonval&#39; &#39;latval<br>
                           xpos = subwrd(result,3)<br>
                           ypos = subwrd(result,6)<br>
                           say &#39; (xpos,ypos) = (&#39;xpos&#39;,&#39;ypos&#39;)&#39;<br>
                      *<br>
                      * write (xpos,ypos) to output file...<br>
                      *<br>
                           res = write (&#39;&#39;<a href="http://hurricane.nf" target="_blank">hurricane.nf</a><br>
        &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt; &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
                   &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;&#39;&#39;,&#39;t = &#39;tt&#39;<br>
<br>
                      xpos = &#39;xpos&#39; ypos = &#39;ypos&#39;&#39;)<br>
<br>
                           pause()<br>
                      *<br>
                      * erase box showing area for defining hurricane<br>
        center...<br>
                      *<br>
                      *      &#39;set line 0 1&#39;<br>
                      *      &#39;draw rec &#39;xb1o&#39; &#39;yb1o&#39; &#39;xb2o&#39; &#39;yb2o<br>
                           tt=tt+1<br>
                         endwhile<br>
<br>
                         res = close (&#39;&#39;<a href="http://hurricane.nf" target="_blank">hurricane.nf</a><br>
        &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt; &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
                   &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;&#39;&#39;)<br>
<br>
<br>
                         nf=nf+1<br>
                       endwhile<br>
<br>
                      *  Clear frame and re-plot base map...<br>
<br>
                              plot_base_map(plot_vpage,plot_area,lon1,lon2,lat1,lat2)<br>
<br>
                      *  Plot track(s)...<br>
<br>
                       nf=1<br>
                       while ( nf &lt;= nmodels )<br>
<br>
                      *  Specify drawing primitives<br>
<br>
                         marktype = <a href="http://marks.nf" target="_blank">marks.nf</a> &lt;<a href="http://marks.nf" target="_blank">http://marks.nf</a>&gt;<br>
        &lt;<a href="http://marks.nf" target="_blank">http://marks.nf</a>&gt; &lt;<a href="http://marks.nf" target="_blank">http://marks.nf</a>&gt;<br>
                         lcolor = <a href="http://colors.nf" target="_blank">colors.nf</a> &lt;<a href="http://colors.nf" target="_blank">http://colors.nf</a>&gt;<br>
        &lt;<a href="http://colors.nf" target="_blank">http://colors.nf</a>&gt; &lt;<a href="http://colors.nf" target="_blank">http://colors.nf</a>&gt;<br>
<br>
<br>
<br>
                         say &#39; marktype, marksize, lcolor, lstyle and<br>
        lthick:&#39;<br>
                         say &#39; &#39;marktype &#39; &#39; marksize &#39; &#39; lcolor &#39; &#39;<br>
        lstyle &#39; &#39;<br>
                   lthick<br>
<br>
                         tt=ts<br>
                      *<br>
                      *  read (xpos,ypos) from ASCII text input file...<br>
                      *<br>
                         res = read(&#39;&#39;<a href="http://hurricane.nf" target="_blank">hurricane.nf</a> &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
        &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
                   &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;&#39;&#39;) ; rc =<br>
<br>
                      sublin(res,1)<br>
                         if( rc != 0 )<br>
                           say &#39;&quot;read&quot; status = &#39;rc<br>
                           exit<br>
                         endif<br>
                         rec = sublin(res,2) ; say &#39;&quot;hurricane.&#39;nf&#39;&quot;<br>
        record: &#39;rec<br>
                         xc = subwrd(rec,6) ; yc = subwrd(rec,9)<br>
<br>
                         &#39;set line &#39;lcolor&#39; &#39;lstyle&#39; &#39;lthick<br>
                         &#39;draw mark &#39;marktype&#39; &#39;xc&#39; &#39;yc&#39; &#39;marksize<br>
                         tt = tt+1<br>
                         while ( tt &lt;= nt )<br>
                           res = read(&#39;&#39;<a href="http://hurricane.nf" target="_blank">hurricane.nf</a><br>
        &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt; &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;<br>
                   &lt;<a href="http://hurricane.nf" target="_blank">http://hurricane.nf</a>&gt;&#39;&#39;) ; rc =<br>
<br>
                      sublin(res,1)<br>
                           if( rc != 0 )<br>
                             say &#39;&quot;read&quot; status = &#39;rc<br>
                             exit<br>
                           endif<br>
                           rec = sublin(res,2) ; say &#39;&quot;hurricane.&#39;nf&#39;&quot;<br>
        record: &#39;rec<br>
                           xn = subwrd(rec,6) ; yn = subwrd(rec,9)<br>
                           say &#39; &#39;xc&#39; &#39;yc&#39; &#39;xn&#39; &#39;yn<br>
                           &#39;draw line &#39;xc&#39; &#39;yc&#39; &#39;xn&#39; &#39;yn<br>
                           &#39;draw mark &#39;marktype&#39; &#39;xn&#39; &#39;yn&#39; &#39;marksize<br>
                           tt=tt+1<br>
                           xc = xn<br>
                           yc = yn<br>
                         endwhile<br>
<br>
                         nf=nf+1<br>
                       endwhile<br>
<br>
                       say<br>
                       say &#39;...plot legend&#39;<br>
                       &#39;&#39;legend_plotter&#39; -x 3 -y 6 &#39;legend_info<br>
                       say<br>
<br>
                       &#39;print&#39;<br>
                       &#39;disable print&#39;<br>
<br>
                       say<br>
                       say<br>
        &#39;************************************************&#39;<br>
                       say &#39; Finished with this script.&#39;<br>
                       say<br>
        &#39;************************************************&#39;<br>
                       say<br>
<br>
                      return<br>
<br>
                      function<br>
                   plot_base_map(plot_vpage,plot_area,lon1,lon2,lat1,lat2)<br>
<br>
                      *  Plots base map...<br>
<br>
                       &#39;c&#39;<br>
                       &#39;set vpage &#39;plot_vpage<br>
                       &#39;set parea &#39;plot_area<br>
                       &#39;set lon &#39;lon1&#39; &#39;lon2<br>
                       &#39;set lat &#39;lat1&#39; &#39;lat2<br>
                       &#39;set mproj latlon&#39;<br>
                       &#39;set mpt * 1 1 5&#39;<br>
                       &#39;set mpdset hires&#39;<br>
                       &#39;set poli on&#39;<br>
                      *  &#39;set grid on&#39;<br>
                       &#39;set grads off&#39;<br>
                       &#39;set gxout contour&#39;<br>
                       &#39;draw map&#39;<br>
<br>
                      *  add lon/lat lines...<br>
<br>
                       &#39;set ccolor 1&#39;<br>
                       &#39;set cstyle 5&#39; ; &#39;d lon&#39;<br>
                       &#39;set cstyle 5&#39; ; &#39;d lat&#39;<br>
<br>
                      *  add title, x- and y-labels...<br>
<br>
                       &#39;draw title \\ Track of Minimum Surface Pressure&#39;<br>
                       &#39;draw xlab Longitude \\&#39;<br>
                       &#39;draw ylab \\ Latitude&#39;<br>
<br>
                      return<br>
<br>
                      _______________________________________________<br>
                      gradsusr mailing list<br>
                      <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt; &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;&gt;<br>
                   &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt; &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;&gt;&gt;<br>
<br>
<br>
                      <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
                          ------------------------------------------------------------------------<br>
<br>
                   _______________________________________________<br>
                   gradsusr mailing list<br>
                   <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a> &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;<br>
        &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a> &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;&gt;<br>
                   <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
               --<br>
               Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>
               &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt; should be considered my NOAA<br>
               email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a><br>
        &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt; &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a><br>
        &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;&gt;.<br>
<br>
                      ********************************************************************<br>
                Charles Seman                                              <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<br>

        &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt;<br>
                U.S. Department of Commerce / NOAA / OAR<br>
                Geophysical Fluid Dynamics Laboratory         voice:<br>
        (609) 452-6547<br>
                201 Forrestal Road                              fax:<br>
        (609) 987-5063<br>
                Princeton, NJ  08540-6649                   <a href="http://www.gfdl.noaa.gov/~cjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
                      ********************************************************************<br>
<br>
               &quot;The contents of this message are mine personally and do not<br>
               reflect any<br>
               official or unofficial position of the United States Federal<br>
               Government,<br>
               the United States Department of Commerce, or NOAA.&quot;<br>
<br>
               *<br>
               *<br>
               * Subject: Re: Tracking Hurricanes<br>
               * From: Kun-Hsuan Chou &lt;<a href="mailto:cwujou@TYPHOON.AS.NTU.EDU.TW" target="_blank">cwujou@TYPHOON.AS.NTU.EDU.TW</a><br>
        &lt;mailto:<a href="mailto:cwujou@TYPHOON.AS.NTU.EDU.TW" target="_blank">cwujou@TYPHOON.AS.NTU.EDU.TW</a>&gt;<br>
               &lt;mailto:<a href="mailto:cwujou@TYPHOON.AS.NTU.EDU.TW" target="_blank">cwujou@TYPHOON.AS.NTU.EDU.TW</a><br>
        &lt;mailto:<a href="mailto:cwujou@TYPHOON.AS.NTU.EDU.TW" target="_blank">cwujou@TYPHOON.AS.NTU.EDU.TW</a>&gt;&gt;&gt;<br>
<br>
               * Date: Fri, 8 Oct 2004 08:03:20 +0800<br>
               * To: <a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a><br>
        &lt;mailto:<a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a>&gt; &lt;mailto:<a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a><br>
        &lt;mailto:<a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a>&gt;&gt;<br>
<br>
               *<br>
               * Hi,<br>
               *<br>
               * I write a sample to track the maxminum wind speed, it<br>
        should<br>
               be the script that you want.<br>
<br>
               *<br>
               &#39;d maxloc(max(mag(u,v),lon=120,lon=130),lat=15,lat=25)&#39;<br>
                line=sublin(result,2)<br>
                ygrd=subwrd(line,4)<br>
               &#39;d maxloc(max(mag(u,v),lat=15,lat=25),lon=120,lon=130)&#39;<br>
                line=sublin(result,2)<br>
                xgrd=subwrd(line,4)<br>
               &#39;set x &#39;xgrd<br>
               lonval = subwrd(result,4)<br>
               &#39;set y &#39;ygrd<br>
               latval = subwrd(result,4)<br>
               &#39;q w2xy &#39;lonval&#39; &#39;latval<br>
               xpos = subwrd(result,3)<br>
               ypos = subwrd(result,6)<br>
               &#39;draw mark 1 &#39;xpos&#39; &#39;ypos&#39; .2&#39;<br>
<br>
                      *============================================================================<br>
               *Kun-Hsuan Chou<br>
               *Postdoctoral Researcher<br>
               *Department of Atmospheric Sciences<br>
               *National Taiwan University<br>
               *No. 1, Sec. 4, Roosevelt Rd., Taipei 106, Taiwan.<br>
               *Phone:   886-2-23625896 ext. 243<br>
               *Mobile:  0920079247<br>
               *E-mail:   <a href="mailto:cwujou@typhoon.as.ntu.edu.tw" target="_blank">cwujou@typhoon.as.ntu.edu.tw</a><br>
        &lt;mailto:<a href="mailto:cwujou@typhoon.as.ntu.edu.tw" target="_blank">cwujou@typhoon.as.ntu.edu.tw</a>&gt;<br>
               &lt;mailto:<a href="mailto:cwujou@typhoon.as.ntu.edu.tw" target="_blank">cwujou@typhoon.as.ntu.edu.tw</a><br>
        &lt;mailto:<a href="mailto:cwujou@typhoon.as.ntu.edu.tw" target="_blank">cwujou@typhoon.as.ntu.edu.tw</a>&gt;&gt;<br>
<br>
               *----- Original Message -----<br>
               *From: Arturo Caracas Uribe<br>
               *To: <a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a><br>
        &lt;mailto:<a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a>&gt; &lt;mailto:<a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a><br>
        &lt;mailto:<a href="mailto:GRADSUSR@LIST.CINECA.IT" target="_blank">GRADSUSR@LIST.CINECA.IT</a>&gt;&gt;<br>
<br>
               *Sent: Thursday, October 07, 2004 11:48 PM<br>
               *Subject: Tracking Hurricanes<br>
               *<br>
               *Does anyone know how to get the maximum values of<br>
        vorticity of<br>
               a domain? (the value, lat and lon).I need the positions<br>
        in order<br>
               to track a hurricane.<br>
               *Thanks in advance<br>
               *<br>
               *Arturo Caracas<br>
               *Atmospheric Sciences, México.<br>
<br>
<br>
                      *----------------------------------------------------------------------<br>
               *<br>
               *  Adapted from <a href="http://plot_hurricane_center2c.gs" target="_blank">plot_hurricane_center2c.gs</a><br>
        &lt;<a href="http://plot_hurricane_center2c.gs" target="_blank">http://plot_hurricane_center2c.gs</a>&gt;<br>
               &lt;<a href="http://plot_hurricane_center2c.gs" target="_blank">http://plot_hurricane_center2c.gs</a>&gt;, which was adapted from:<br>
               *<br>
               *  (1) &quot;plot_hurricane_center2[a][b].gs&quot; (from<br>
               &quot;<a href="http://plot_hurricane_center.gs" target="_blank">plot_hurricane_center.gs</a><br>
        &lt;<a href="http://plot_hurricane_center.gs" target="_blank">http://plot_hurricane_center.gs</a>&gt;<br>
        &lt;<a href="http://plot_hurricane_center.gs" target="_blank">http://plot_hurricane_center.gs</a>&gt;&quot;),<br>
<br>
               *      locally modified versions derived from Joe<br>
        Covert&#39;s script<br>
               *      &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot;<br>
               (<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a> &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;<br>
        &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a> &lt;mailto:<a href="mailto:Joe.Covert@noaa.gov" target="_blank">Joe.Covert@noaa.gov</a>&gt;&gt;),<br>
        which was<br>
               posted to the<br>
               *      GrADS Listserv on 9/13/2004 (his script was named<br>
               <a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
        &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;)<br>
<br>
               *      on 4/27/06, found via a Google search for<br>
        &quot;<a href="http://plot_tc_shi.gs" target="_blank">plot_tc_shi.gs</a> &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;<br>
               &lt;<a href="http://plot_tc_shi.gs" target="_blank">http://plot_tc_shi.gs</a>&gt;&quot;:<br>
               *      <a href="http://caos.iisc.ernet.in/gslib/plot_tc_shi.gs" target="_blank">http://caos.iisc.ernet.in/gslib/plot_tc_shi.gs</a><br>
               *<br>
               *  (2) code in &quot;hurricane_tracking.txt&quot; (taken from an email<br>
               exchange<br>
               *      posted to the GrADS Listserv by Kun-Hsuan Chou and<br>
               *      Arturo Caracas Uribe in Oct, 2004)<br>
               *<br>
               *<br>
               *  To use: grads -l<br>
               *<br>
                      *----------------------------------------------------------------------<br>
<br>
               function main()<br>
<br>
                &#39;reinit&#39;<br>
<br>
                      ************************************************************************<br>
               *  Allow external GrADS functions<br>
                      ************************************************************************<br>
<br>
                rc = gsfallow(&quot;on&quot;)<br>
<br>
                      ************************************************************************<br>
               *  Define dataset file information and plotting limits<br>
        for base<br>
               map...<br>
                      ************************************************************************<br>
<br>
               **  nc_file1 = &#39;&#39;<br>
               **  nc_file2 = &#39;&#39;<br>
               **  nc_file3 = &#39;&#39;<br>
               **  nc_file = &#39;&#39;nc_file1&#39; &#39;nc_file2&#39; &#39;nc_file3&#39;&#39;<br>
                nc_file = &#39;your_netCDF_file&#39;<br>
<br>
                lon1 = 298 ; lon2 = 308<br>
                lat1 =  20 ; lat2 =  25<br>
<br>
                      ************************************************************************<br>
               *  Legend captions, colors, and marks for the plots<br>
                      ************************************************************************<br>
<br>
               **  nmodels = 1<br>
               **  model.1 = &#39;isabel_ras&#39;<br>
               **  model.2 = &#39;isabel_isotke&#39;<br>
               **  model.3 = &#39;isabel_my25&#39;<br>
<br>
               **  titles.1 = model.1 ; colors.1 = 2 ; marks.1 = 2<br>
               **  titles.2 = model.2 ; colors.2 = 3 ; marks.2 = 2<br>
               **  titles.3 = model.3 ; colors.3 = 4 ; marks.3 = 2<br>
               ***<br>
               ***  Define the legend plotter input...<br>
               ***<br>
               **  titles = &#39;-t&#39; ; colors = &#39;-c&#39; ; marks = &#39;-m&#39; ; lines<br>
        = &#39;-l&#39;<br>
               **  n=1<br>
               **  while ( n &lt;= nmodels )<br>
               **    titles = &#39;&#39;titles&#39; &quot;&#39;titles.n&#39;&quot;&#39;<br>
               **    colors = &#39;&#39;colors&#39; &#39;colors.n<br>
               **    marks = &#39;&#39;marks&#39; &quot;&#39;marks.n&#39;&quot;&#39;<br>
               **    lines = &#39;&#39;lines&#39; 1&#39;<br>
               **    n=n+1<br>
               **  endwhile<br>
<br>
               **  legend_info = &#39;&#39;colors&#39; &#39;lines&#39; &#39;marks&#39; &#39;titles&#39; -p&#39;<br>
<br>
                nmodels = 1<br>
                model.1 = &#39;title_name_for_your_netCDF_dataset&#39;<br>
<br>
                titles.1 = model.1 ; colors.1 = 2 ; marks.1 = 2<br>
               *<br>
               *  Define the legend plotter input...<br>
               *<br>
                titles = &#39;-t&#39; ; colors = &#39;-c&#39; ; marks = &#39;-m&#39; ; lines = &#39;-l&#39;<br>
                n=1<br>
                while ( n &lt;= nmodels )<br>
                  titles = &#39;&#39;titles&#39; &quot;&#39;titles.n&#39;&quot;&#39;<br>
                  colors = &#39;&#39;colors&#39; &#39;colors.n<br>
                  marks = &#39;&#39;marks&#39; &quot;&#39;marks.n&#39;&quot;&#39;<br>
                  lines = &#39;&#39;lines&#39; 1&#39;<br>
                  n=n+1<br>
                endwhile<br>
<br>
                legend_info = &#39;&#39;colors&#39; &#39;lines&#39; &#39;marks&#39; &#39;titles&#39; -p&#39;<br>
<br>
               *  ...other drawing primitives<br>
<br>
                marksize = 0.1<br>
<br>
                lstyle = 1 ; lthick = 5<br>
<br>
                      ************************************************************************<br>
               *  Use &quot;cbar_line&quot; or &quot;cbar_line_box&quot;?<br>
                      ************************************************************************<br>
<br>
                legend_plotter = &#39;cbar_line&#39;<br>
               *  legend_plotter = &#39;cbar_line_box&#39;<br>
<br>
                      ************************************************************************<br>
               *  Plot page limits<br>
                      ************************************************************************<br>
<br>
                plot_vpage = &#39;0 11 0 8.5&#39;<br>
                plot_area  = &#39;1 10 1 7.5&#39;<br>
<br>
                xl = subwrd(plot_area,1) ; xr = subwrd(plot_area,2)<br>
                yb = subwrd(plot_area,3) ; yt = subwrd(plot_area,4)<br>
<br>
                xc = xl + (xr-xl)/2<br>
<br>
                      ************************************************************************<br>
               *  GrADS metafile output...<br>
                      ************************************************************************<br>
<br>
                &#39;enable print hurricane_track.gx&#39;<br>
<br>
                      *-----------------------------------------------------------------------<br>
               *  Define and plot track of minimum surface pressure for each<br>
               dataset...<br>
                      *-----------------------------------------------------------------------<br>
<br>
                nf=1<br>
                while ( nf &lt;= nmodels )<br>
<br>
               * Open dataset file and define parameters...<br>
<br>
                  fname = subwrd(nc_file,nf)<br>
                  &#39;sdfopen &#39;fname<br>
                  &#39;set dfile &#39;nf<br>
                  &#39;q file&#39;<br>
                  rec3 = sublin(result,3) ; binary_file = subwrd(rec3,2)<br>
                  say<br>
                  say<br>
                  say &#39;*** &#39;binary_file&#39; ***&#39;<br>
                  say<br>
                  rec5 = sublin(result,5)<br>
                  nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz =<br>
               subwrd(rec5,9) ; nt = subwrd(rec5,12)<br>
<br>
                  if( nf = 1 )<br>
<br>
               * Plot base map...<br>
<br>
                    plot_base_map(plot_vpage,plot_area,lon1,lon2,lat1,lat2)<br>
<br>
                  endif<br>
<br>
               * Define locations of &quot;hurricane center&quot; for plotting points,<br>
               and write&lt;<br>
<br>
    ...<br>
<br>
    [Message clipped]      function maxwind(args)<br>
     &#39;reinit&#39;<br>
     nc_file = subwrd(args,1)<br>
     wind = subwrd(args,2)<br>
     wind_units = subwrd(args,3)<br>
     say<br>
     say nc_file<br>
     say wind&#39; (&#39;wind_units&#39;)&#39;<br>
     say<br>
     &#39;sdfopen &#39;nc_file<br>
     &#39;q file&#39;<br>
     say result<br>
     say<br>
     rec5 = sublin(result,5)<br>
     nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9) ;<br>
    nt = subwrd(rec5,12)<br>
     say<br>
     say &#39;(nx,ny,nz,nt) = (&#39;nx&#39;,&#39;ny&#39;,&#39;nz&#39;,&#39;nt&#39;)&#39;<br>
     say<br>
     nxp = nx<br>
     nyp = ny<br>
     nzp = nz<br>
    *<br>
    * get the x- and y-limits for virtual page<br>
    *<br>
     &#39;q gxinfo&#39;<br>
     rec3 = sublin(result,3) ; xpl = subwrd(rec3,4) ; xpu = subwrd(rec3,6)<br>
     rec4 = sublin(result,4) ; ypl = subwrd(rec4,4) ; ypu = subwrd(rec4,6)<br>
     tt = 1<br>
     while ( tt &lt;= nt )<br>
       &#39;set x 1&#39;<br>
       &#39;set y 1&#39;<br>
       &#39;set z 1&#39;<br>
       &#39;set t &#39;tt<br>
       say &#39;tt = &#39;tt<br>
       &#39;set gxout print&#39;<br>
       &#39;d max(max(max(&#39;wind&#39;,x=1,x=&#39;nx&#39;),y=1,y=&#39;ny&#39;),z=1,z=&#39;nz&#39;)&#39;<br>
         rec = sublin(result,(nyp+1)*nzp+3)<br>
         max_wind = subwrd(rec,1)<br>
         say &#39; max &#39;wind&#39; = &#39;max_wind<br>
       &#39;d maxloc(max(max(&#39;wind&#39;,y=1,y=&#39;ny&#39;),z=1,z=&#39;nz&#39;),x=1,x=&#39;nx&#39;)&#39;<br>
         rec = sublin(result,(nzp+1)*nxp+3)<br>
         xc = subwrd(rec,1)<br>
       &#39;d maxloc(max(max(&#39;wind&#39;,x=1,x=&#39;nx&#39;),z=1,z=&#39;nz&#39;),y=1,y=&#39;ny&#39;)&#39;<br>
         rec = sublin(result,(nzp+1)*nyp+3)<br>
         yc = subwrd(rec,1)<br>
       &#39;d maxloc(max(max(&#39;wind&#39;,x=1,x=&#39;nx&#39;),y=1,y=&#39;ny&#39;),z=1,z=&#39;nz&#39;)&#39;<br>
         rec = sublin(result,(nyp+1)*nzp+3)<br>
         zc = subwrd(rec,1)<br>
         say &#39; (xc,yc,zc) = (&#39;xc&#39;,&#39;yc&#39;,&#39;zc&#39;)&#39;<br>
       &#39;d &#39;wind&#39;(x=&#39;xc&#39;,y=&#39;yc&#39;,z=&#39;zc&#39;)&#39;<br>
         rec = sublin(result,2)<br>
         wind_xc_yc_zc = subwrd(rec,1)<br>
         say &#39; &#39;wind&#39;(x=&#39;xc&#39;,y=&#39;yc&#39;,z=&#39;zc&#39;) = &#39;wind_xc_yc_zc<br>
    *<br>
    * find &quot;world&quot; coordinates of (xc,yc) and convert &quot;world&quot; coordinates<br>
    * to &quot;xy&quot; coordinates for plotting track of hurricane center...<br>
    *<br>
         &#39;set x &#39;xc<br>
         lonc = subwrd(result,4)<br>
         &#39;set y &#39;yc<br>
         latc = subwrd(result,4)<br>
         say &#39; (lonc,latc,zc) = (&#39;lonc&#39;,&#39;latc&#39;,&#39;zc&#39;)&#39;<br>
       &#39;d &#39;wind&#39;(lon=&#39;lonc&#39;,lat=&#39;latc&#39;,z=&#39;zc&#39;)&#39;<br>
         rec = sublin(result,2)<br>
         wind_lnc_ltc_zc = subwrd(rec,1)<br>
         say &#39; &#39;wind&#39;(lon=&#39;lonc&#39;,lat=&#39;latc&#39;,z=&#39;zc&#39;) = &#39;wind_lnc_ltc_zc<br>
    *<br>
    * plot the wind and place a mark at the max<br>
    *<br>
       &#39;c&#39;<br>
       &#39;set vpage &#39;xpl&#39; &#39;xpu&#39; &#39;ypl&#39; &#39;ypu<br>
       &#39;set parea &#39;xpl+1&#39; &#39;xpu-1&#39; &#39;ypl+1&#39; &#39;ypu-1<br>
       &#39;set x 1 &#39;nx<br>
       &#39;set y 1 &#39;ny<br>
       &#39;set z &#39;zc<br>
       &#39;set gxout shaded&#39;<br>
       &#39;set grads off&#39;<br>
       &#39;d &#39;wind<br>
       &#39;run cbar 0.7&#39;<br>
       &#39;draw title \ Max &#39;wind&#39; = &#39;wind_lnc_ltc_zc&#39; (&#39;wind_units&#39;)\at<br>
    (lonc,latc,zc)=(&#39;lonc&#39;,&#39;latc&#39;,&#39;zc&#39;)&#39;<br>
       &#39;q w2xy &#39;lonc&#39; &#39;latc<br>
         xpos = subwrd(result,3)<br>
         ypos = subwrd(result,6)<br>
         say &#39; (xpos,ypos) = (&#39;xpos&#39;,&#39;ypos&#39;)&#39;<br>
       &#39;set line 1 1 6&#39;<br>
       &#39;draw mark 6 &#39;xpos&#39; &#39;ypos&#39; 0.2&#39;<br>
       &#39;c events&#39;<br>
       pause()<br>
       tt=tt+1<br>
     endwhile<br>
     say &#39;...finished.&#39;<br>
     &#39;close 1&#39;<br>
    return<br>
<br>
    function pause()<br>
    *<br>
    * Pauses till ENTER key is pressed<br>
    *<br>
     say<br>
     say &#39;*********************************&#39;<br>
     say &#39;Press &quot;ENTER&quot; key to continue...&#39;<br>
     say &#39;*********************************&#39;<br>
     pull answer<br>
    *<br>
    return<br>
<br>
<br>
    _______________________________________________<br>
    gradsusr mailing list<br>
    <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a> &lt;mailto:<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>&gt;<br>
    <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
<br>
-- <br>
<br>
Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> should be considered my NOAA<br>
email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>.<br>
<br>
********************************************************************<br>
 Charles Seman                                <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
 U.S. Department of Commerce / NOAA / OAR<br>
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547<br>
 201 Forrestal Road                              fax: (609) 987-5063<br>
 Princeton, NJ  08540-6649            <a href="http://www.gfdl.noaa.gov/~cjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
********************************************************************<br>
<br>
&quot;The contents of this message are mine personally and do not reflect any<br>
official or unofficial position of the United States Federal Government,<br>
the United States Department of Commerce, or NOAA.&quot;<br>
<br>function maxwind(args)<br>
  &#39;reinit&#39;<br>
  wind_nc_file = subwrd(args,1)<br>
  wind_var = subwrd(args,2)<br>
  wind_units = subwrd(args,3)<br>
  lev_units = subwrd(args,4)<br>
  say<br>
  say wind_nc_file<br>
  say wind_var&#39; (&#39;wind_units&#39;)&#39;<br>
  say<br>
<br>
* open &quot;wind_nc_file&quot; and define variables for (x,y,z,t) dimension limits<br>
<br>
  &#39;sdfopen &#39;wind_nc_file<br>
  &#39;q file&#39;<br>
  rec5 = sublin(result,5)<br>
  nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9) ; nt = subwrd(rec5,12)<br>
  say result<br>
  say &#39;(nx,ny,nz,nt) = (&#39;nx&#39;,&#39;ny&#39;,&#39;nz&#39;,&#39;nt&#39;)&#39;<br>
  say<br>
<br>
* define (x,y,z,t) lower and upper limits for finding max wind<br>
<br>
  x1 = 2 ; x2 = nx-1<br>
  y1 = 2 ; y2 = ny-1<br>
  z1 = 2 ; z2 = nz-1<br>
  t1 = 2 ; t2 = nt-1<br>
  say &#39;(x1,x2) = (&#39;x1&#39;,&#39;x2&#39;)&#39;<br>
  say &#39;(y1,y2) = (&#39;y1&#39;,&#39;y2&#39;)&#39;<br>
  say &#39;(z1,z2) = (&#39;z1&#39;,&#39;z2&#39;)&#39;<br>
  say &#39;(t1,t2) = (&#39;t1&#39;,&#39;t2&#39;)&#39;<br>
  say<br>
<br>
* get the x- and y-limits for virtual page<br>
<br>
  &#39;q gxinfo&#39;<br>
  rec3 = sublin(result,3) ; xpl = subwrd(rec3,4) ; xpu = subwrd(rec3,6)<br>
  rec4 = sublin(result,4) ; ypl = subwrd(rec4,4) ; ypu = subwrd(rec4,6)<br>
  xptime = (xpu-xpl)/2 ; yptime = ypu-0.4<br>
<br>
* print plots into an output file?<br>
<br>
do_print = true<br>
<br>
* plot output<br>
<br>
  if ( do_print = true )<br>
    gx_file = &#39;maxwind_&#39;wind_var&#39;.gx&#39;<br>
    ps_file = &#39;maxwind_&#39;wind_var&#39;.ps&#39;<br>
    &#39;enable print &#39;gx_file<br>
  endif<br>
<br>
* loop over time<br>
<br>
  tt = t1<br>
  while ( tt &lt;= t2 )<br>
<br>
* find max wind and its location<br>
<br>
    &#39;set x 1&#39;<br>
    &#39;set y 1&#39;<br>
    &#39;set z 1&#39;<br>
    &#39;set t &#39;tt<br>
    &#39;q time&#39; ; ttime = subwrd(result,3)<br>
    say &#39;tt = &#39;tt&#39; (&#39;ttime&#39;)&#39;<br>
    &#39;set gxout print&#39;<br>
    &#39;d max(max(max(&#39;wind_var&#39;,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;)&#39;<br>
      rec = sublin(result,(y2-y1+2)*(z2-z1+1)+3)<br>
      max_wind = subwrd(rec,1)<br>
      say &#39; max &#39;wind_var&#39; = &#39;max_wind<br>
    &#39;d maxloc(max(max(&#39;wind_var&#39;,y=&#39;y1&#39;,y=&#39;y2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;),x=&#39;x1&#39;,x=&#39;x2&#39;)&#39;<br>
      rec = sublin(result,(z2-z1+2)*(x2-x1+1)+3)<br>
      xc = subwrd(rec,1)<br>
    &#39;d maxloc(max(max(&#39;wind_var&#39;,x=&#39;x1&#39;,x=&#39;x2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;)&#39;<br>
      rec = sublin(result,(z2-z1+2)*(y2-y1+1)+3)<br>
      yc = subwrd(rec,1)<br>
    &#39;d maxloc(max(max(&#39;wind_var&#39;,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;)&#39;<br>
      rec = sublin(result,(y2-y1+2)*(z2-z1+1)+3)<br>
      zc = subwrd(rec,1)<br>
      say &#39; (xc,yc,zc) = (&#39;xc&#39;,&#39;yc&#39;,&#39;zc&#39;)&#39;<br>
    &#39;d &#39;wind_var&#39;(x=&#39;xc&#39;,y=&#39;yc&#39;,z=&#39;zc&#39;)&#39;<br>
      rec = sublin(result,2)<br>
      wind_xc_yc_zc = subwrd(rec,1)<br>
      say &#39; &#39;wind_var&#39;(x=&#39;xc&#39;,y=&#39;yc&#39;,z=&#39;zc&#39;) = &#39;wind_xc_yc_zc<br>
<br>
* find &quot;world&quot; coordinates of (xc,yc) and convert &quot;world&quot; coordinates<br>
* to &quot;xy&quot; coordinates for plotting track of hurricane center...<br>
<br>
      &#39;set x &#39;xc<br>
      lonc = subwrd(result,4)<br>
      &#39;set y &#39;yc<br>
      latc = subwrd(result,4)<br>
      &#39;set z &#39;zc<br>
      levc = subwrd(result,4)<br>
      say &#39; (lonc,latc,levc) = (&#39;lonc&#39;,&#39;latc&#39;,&#39;levc&#39;)&#39;<br>
    &#39;d &#39;wind_var&#39;(lon=&#39;lonc&#39;,lat=&#39;latc&#39;,lev=&#39;levc&#39;)&#39;<br>
      rec = sublin(result,2)<br>
      wind_lnc_ltc_lvc = subwrd(rec,1)<br>
      say &#39; &#39;wind_var&#39;(lon=&#39;lonc&#39;,lat=&#39;latc&#39;,lev=&#39;levc&#39;) = &#39;wind_lnc_ltc_lvc<br>
<br>
* plot the wind at the level of the max and place a mark at the max<br>
<br>
    &#39;c&#39;<br>
    &#39;set vpage &#39;xpl&#39; &#39;xpu&#39; &#39;ypl&#39; &#39;ypu<br>
    &#39;set parea &#39;xpl+1&#39; &#39;xpu-1&#39; &#39;ypl+1&#39; &#39;ypu-1<br>
    &#39;set x &#39;x1&#39; &#39;x2 ; lon1 = subwrd(result,4) ; lon2 = subwrd(result,5)<br>
    &#39;set y &#39;y1&#39; &#39;y2 ; lat1 = subwrd(result,4) ; lat2 = subwrd(result,5)<br>
    &#39;set z &#39;zc<br>
    &#39;set gxout shaded&#39;<br>
    &#39;set grads off&#39;<br>
    &#39;d &#39;wind_var<br>
    &#39;run cbar 0.7&#39;<br>
    &#39;set strsiz 0.16&#39;<br>
    &#39;set string 1 c 6&#39;<br>
    &#39;draw string &#39;xptime&#39; &#39;yptime&#39; &#39;ttime<br>
    &#39;draw title &#39;wind_var&#39; (&#39;wind_units&#39;) \ max=&#39;wind_lnc_ltc_lvc&#39; at: \ (x,y,z)=(&#39;xc&#39;,&#39;yc&#39;,&#39;zc&#39;), (lon,lat,lev)=(&#39;lonc&#39;E,&#39;latc&#39;N,&#39;levc&#39;&#39;lev_units&#39;)&#39;<br>

    &#39;draw xlab plot: &#39;lon1&#39;E to &#39;lon2&#39;E \&#39;<br>
    &#39;draw ylab \ plot: &#39;lat1&#39;N to &#39;lat2&#39;N&#39;<br>
    &#39;q w2xy &#39;lonc&#39; &#39;latc<br>
      xpos = subwrd(result,3)<br>
      ypos = subwrd(result,6)<br>
      say &#39; (xpos,ypos) = (&#39;xpos&#39;,&#39;ypos&#39;)&#39;<br>
    &#39;set line 1 1 6&#39;<br>
    &#39;draw mark 6 &#39;xpos&#39; &#39;ypos&#39; 0.2&#39;<br>
    if ( do_print = true )<br>
      &#39;print&#39;<br>
    endif<br>
    &#39;c events&#39;<br>
***    pause()<br>
    tt=tt+1<br>
  endwhile<br>
  say &#39;...finished.&#39;<br>
  &#39;close 1&#39;<br>
  if ( do_print = true )<br>
    say<br>
    &#39;disable print&#39;<br>
    &#39;!gxps -c -i &#39;gx_file&#39; -o &#39;ps_file<br>
    &#39;!ps2pdf &#39;ps_file<br>
    &#39;!rm &#39;gx_file&#39; &#39;ps_file<br>
  endif<br>
return<br>
<br>
function pause()<br>
<br>
* Pauses till ENTER key is pressed<br>
<br>
 say<br>
 say &#39;*********************************&#39;<br>
 say &#39;Press &quot;ENTER&quot; key to continue...&#39;<br>
 say &#39;*********************************&#39;<br>
 pull answer<br>
return<br>
<br>
<br>function maxwind2(args)<br>
  &#39;reinit&#39;<br>
  wind1_nc_file = subwrd(args,1) ; wind1_var = subwrd(args,2)<br>
  wind2_nc_file = subwrd(args,3) ; wind2_var = subwrd(args,4)<br>
  wind_units = subwrd(args,5)<br>
  lev_units = subwrd(args,6)<br>
  say<br>
  say wind1_nc_file<br>
  say wind1_var<br>
  say wind2_nc_file<br>
  say wind2_var<br>
  say &#39;wind units: (&#39;wind_units&#39;)&#39;<br>
  say &#39; lev units: (&#39;lev_units&#39;)&#39;<br>
  say<br>
<br>
* open &quot;wind1_nc_file&quot; and &quot;wind2_nc_file&quot; and<br>
* define variables for (x,y,z,t) dimension limits<br>
<br>
  &#39;sdfopen &#39;wind1_nc_file<br>
  &#39;q file 1&#39;<br>
  rec5 = sublin(result,5)<br>
  nx1 = subwrd(rec5,3) ; ny1 = subwrd(rec5,6) ; nz1 = subwrd(rec5,9) ; nt1 = subwrd(rec5,12)<br>
  say result<br>
  say &#39;(nx1,ny1,nz1,nt1) = (&#39;nx1&#39;,&#39;ny1&#39;,&#39;nz1&#39;,&#39;nt1&#39;)&#39;<br>
  say<br>
  &#39;sdfopen &#39;wind2_nc_file<br>
  &#39;q file 2&#39;<br>
  rec5 = sublin(result,5)<br>
  nx2 = subwrd(rec5,3) ; ny2 = subwrd(rec5,6) ; nz2 = subwrd(rec5,9) ; nt2 = subwrd(rec5,12)<br>
  say result<br>
  say &#39;(nx2,ny2,nz2,nt2) = (&#39;nx2&#39;,&#39;ny2&#39;,&#39;nz2&#39;,&#39;nt2&#39;)&#39;<br>
  say<br>
<br>
* make sure (x,y,z,t) dimensions are the same for &quot;wind1_nc_file&quot; and &quot;wind2_nc_file&quot;<br>
* and, if so, define general variable names for (x,y,z,t) dimension limits<br>
<br>
  if( nx2 = nx1 )<br>
    nx = nx1<br>
  else<br>
    say<br>
    say &#39;nx1 = &#39;nx1<br>
    say &#39;nx2 = &#39;nx2<br>
    say &#39;...are not equal&#39;<br>
    say<br>
    exit<br>
  endif<br>
  if( ny2 = ny1 )<br>
    ny = ny1<br>
  else<br>
    say<br>
    say &#39;ny1 = &#39;ny1<br>
    say &#39;ny2 = &#39;ny2<br>
    say &#39;...are not equal&#39;<br>
    say<br>
    exit<br>
  endif<br>
  if( nz2 = nz1 )<br>
    nz = nz1<br>
  else<br>
    say<br>
    say &#39;nz1 = &#39;nz1<br>
    say &#39;nz2 = &#39;nz2<br>
    say &#39;...are not equal&#39;<br>
    say<br>
    exit<br>
  endif<br>
  if( nt2 = nt1 )<br>
    nt = nt1<br>
  else<br>
    say<br>
    say &#39;nt1 = &#39;nt1<br>
    say &#39;nt2 = &#39;nt2<br>
    say &#39;...are not equal&#39;<br>
    say<br>
    exit<br>
  endif<br>
<br>
* define (x,y,z,t) lower and upper limits for finding max wind<br>
<br>
  x1 = 2 ; x2 = nx-1<br>
  y1 = 2 ; y2 = ny-1<br>
  z1 = 2 ; z2 = nz-1<br>
  t1 = 2 ; t2 = nt-1<br>
  say &#39;(x1,x2) = (&#39;x1&#39;,&#39;x2&#39;)&#39;<br>
  say &#39;(y1,y2) = (&#39;y1&#39;,&#39;y2&#39;)&#39;<br>
  say &#39;(z1,z2) = (&#39;z1&#39;,&#39;z2&#39;)&#39;<br>
  say &#39;(t1,t2) = (&#39;t1&#39;,&#39;t2&#39;)&#39;<br>
  say<br>
<br>
* get the x- and y-limits for virtual page<br>
<br>
  &#39;q gxinfo&#39;<br>
  rec3 = sublin(result,3) ; xpl = subwrd(rec3,4) ; xpu = subwrd(rec3,6)<br>
  rec4 = sublin(result,4) ; ypl = subwrd(rec4,4) ; ypu = subwrd(rec4,6)<br>
  xptime = (xpu-xpl)/2 ; yptime = ypu-0.4<br>
<br>
* print plots into an output file?<br>
<br>
do_print = true<br>
<br>
* plot output<br>
<br>
  if ( do_print = true )<br>
    gx_file = &#39;maxwind2.gx&#39;<br>
    ps_file = &#39;<a href="http://maxwind2.ps" target="_blank">maxwind2.ps</a>&#39;<br>
    &#39;enable print &#39;gx_file<br>
  endif<br>
<br>
* loop over time<br>
<br>
  tt = t1<br>
  while ( tt &lt;= t2 )<br>
<br>
* use &quot;wind1_nc_file&quot; to define dimensions<br>
<br>
    &#39;set dfile 1&#39;<br>
    &#39;set t &#39;tt<br>
    &#39;q time&#39; ; ttime = subwrd(result,3)<br>
    say &#39;tt = &#39;tt&#39; (&#39;ttime&#39;)&#39;<br>
<br>
* define wind magnitude variable for this time level<br>
<br>
    &#39;set x 1 &#39;nx<br>
    &#39;set y 1 &#39;ny<br>
    &#39;set z 1 &#39;nz<br>
    &#39;define wind = mag(&#39;wind1_var&#39;.1,&#39;wind2_var&#39;.2)&#39;<br>
<br>
* find max wind and its location<br>
<br>
    &#39;set x 1&#39;<br>
    &#39;set y 1&#39;<br>
    &#39;set z 1&#39;<br>
    &#39;set gxout print&#39;<br>
    &#39;d max(max(max(wind,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;)&#39;<br>
      rec = sublin(result,(y2-y1+2)*(z2-z1+1)+3)<br>
      max_wind = subwrd(rec,1)<br>
      say &#39; max wind = &#39;max_wind<br>
    &#39;d maxloc(max(max(wind,y=&#39;y1&#39;,y=&#39;y2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;),x=&#39;x1&#39;,x=&#39;x2&#39;)&#39;<br>
      rec = sublin(result,(z2-z1+2)*(x2-x1+1)+3)<br>
      xc = subwrd(rec,1)<br>
    &#39;d maxloc(max(max(wind,x=&#39;x1&#39;,x=&#39;x2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;)&#39;<br>
      rec = sublin(result,(z2-z1+2)*(y2-y1+1)+3)<br>
      yc = subwrd(rec,1)<br>
    &#39;d maxloc(max(max(wind,x=&#39;x1&#39;,x=&#39;x2&#39;),y=&#39;y1&#39;,y=&#39;y2&#39;),z=&#39;z1&#39;,z=&#39;z2&#39;)&#39;<br>
      rec = sublin(result,(y2-y1+2)*(z2-z1+1)+3)<br>
      zc = subwrd(rec,1)<br>
      say &#39; (xc,yc,zc) = (&#39;xc&#39;,&#39;yc&#39;,&#39;zc&#39;)&#39;<br>
    &#39;d wind(x=&#39;xc&#39;,y=&#39;yc&#39;,z=&#39;zc&#39;)&#39;<br>
      rec = sublin(result,2)<br>
      wind_xc_yc_zc = subwrd(rec,1)<br>
      say &#39; wind(x=&#39;xc&#39;,y=&#39;yc&#39;,z=&#39;zc&#39;) = &#39;wind_xc_yc_zc<br>
<br>
* find &quot;world&quot; coordinates of (xc,yc) and convert &quot;world&quot; coordinates<br>
* to &quot;xy&quot; coordinates for plotting track of hurricane center...<br>
<br>
      &#39;set x &#39;xc<br>
      lonc = subwrd(result,4)<br>
      &#39;set y &#39;yc<br>
      latc = subwrd(result,4)<br>
      &#39;set z &#39;zc<br>
      levc = subwrd(result,4)<br>
      say &#39; (lonc,latc,levc) = (&#39;lonc&#39;,&#39;latc&#39;,&#39;levc&#39;)&#39;<br>
    &#39;d wind(lon=&#39;lonc&#39;,lat=&#39;latc&#39;,lev=&#39;levc&#39;)&#39;<br>
      rec = sublin(result,2)<br>
      wind_lnc_ltc_lvc = subwrd(rec,1)<br>
      say &#39; wind(lon=&#39;lonc&#39;,lat=&#39;latc&#39;,lev=&#39;levc&#39;) = &#39;wind_lnc_ltc_lvc<br>
<br>
* plot the wind at the level of the max and place a mark at the max<br>
<br>
    &#39;c&#39;<br>
    &#39;set vpage &#39;xpl&#39; &#39;xpu&#39; &#39;ypl&#39; &#39;ypu<br>
    &#39;set parea &#39;xpl+1&#39; &#39;xpu-1&#39; &#39;ypl+1&#39; &#39;ypu-1<br>
    &#39;set x &#39;x1&#39; &#39;x2 ; lon1 = subwrd(result,4) ; lon2 = subwrd(result,5)<br>
    &#39;set y &#39;y1&#39; &#39;y2 ; lat1 = subwrd(result,4) ; lat2 = subwrd(result,5)<br>
    &#39;set z &#39;zc<br>
    &#39;set gxout shaded&#39;<br>
    &#39;set grads off&#39;<br>
    &#39;d &#39;wind<br>
    &#39;run cbar 0.7&#39;<br>
    &#39;set strsiz 0.16&#39;<br>
    &#39;set string 1 c 6&#39;<br>
    &#39;draw string &#39;xptime&#39; &#39;yptime&#39; &#39;ttime<br>
    &#39;draw title Wind Magnitude (&#39;wind_units&#39;) \ max=&#39;wind_lnc_ltc_lvc&#39; at: \ (x,y,z)=(&#39;xc&#39;,&#39;yc&#39;,&#39;zc&#39;), (lon,lat,lev)=(&#39;lonc&#39;E,&#39;latc&#39;N,&#39;levc&#39;&#39;lev_units&#39;)&#39;<br>

    &#39;draw xlab plot: &#39;lon1&#39;E to &#39;lon2&#39;E\&#39;<br>
    &#39;draw ylab \ plot: &#39;lat1&#39;N to &#39;lat2&#39;N&#39;<br>
    &#39;q w2xy &#39;lonc&#39; &#39;latc<br>
      xpos = subwrd(result,3)<br>
      ypos = subwrd(result,6)<br>
      say &#39; (xpos,ypos) = (&#39;xpos&#39;,&#39;ypos&#39;)&#39;<br>
    &#39;set line 1 1 6&#39;<br>
    &#39;draw mark 6 &#39;xpos&#39; &#39;ypos&#39; 0.2&#39;<br>
    if ( do_print = true )<br>
      &#39;print&#39;<br>
    endif<br>
    &#39;c events&#39;<br>
    &#39;undefine wind&#39;<br>
***    pause()<br>
    tt=tt+1<br>
  endwhile<br>
  say &#39;...finished.&#39;<br>
  &#39;close 2&#39; ; &#39;close 1&#39;<br>
  if ( do_print = true )<br>
    say<br>
    &#39;disable print&#39;<br>
    &#39;!gxps -c -i &#39;gx_file&#39; -o &#39;ps_file<br>
    &#39;!ps2pdf &#39;ps_file<br>
    &#39;!rm &#39;gx_file&#39; &#39;ps_file<br>
  endif<br>
return<br>
<br>
function pause()<br>
<br>
* Pauses till ENTER key is pressed<br>
<br>
 say<br>
 say &#39;*********************************&#39;<br>
 say &#39;Press &quot;ENTER&quot; key to continue...&#39;<br>
 say &#39;*********************************&#39;<br>
 pull answer<br>
return<br>
<br>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>सुशांत पुराणिक <br>वातावरणशास्त्र व अवकाशशास्त्र विभाग,<br>पुणे विद्यापीठ <br>पुणे-०७, महाराष्ट्र <br>भारत. <br><br><br><br>
</div>