<div dir="ltr"><div><div><div><div><div>Hi Jim, <br><br></div>Removing the space in between the commands seems to resolve the problem. <br></div>Now I am experiencing the following error: <br>.<br>.<br>.<br>.<br>Invalid QUERY argument: w2xy-2.461 <br>DRAW error:  Invalid operand<br>Invalid QUERY argument: w2xy-2.335 <br>DRAW error:  Invalid operand<br>Invalid QUERY argument: w2xy-62.923 <br>DRAW error:  Invalid operand<br>Invalid QUERY argument: w2xy-62.799 <br>DRAW error:  Invalid operand<br>Invalid QUERY argument: w2xy-62.864 <br>DRAW error:  Invalid operand<br>Invalid QUERY argument: w2xy-60.155 <br>DRAW error:  Invalid operand<br>.<br>.<br>.<br><br></div>I also  display a variable right after open the .ctl and it worked well.<br><br></div>Thanks, <br><br><br></div>Keren  <br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8000001907349px">----<br>Keren Rosado<br>PhD Candidate/Howard University/NOAA EPP GRTSP Fellow<br>Intern/NOAA/NWS/NCEP/EMC <br></div><div><span style="font-size:12.8000001907349px">5830 University Research CT</span></div><div><span style="font-size:12.8000001907349px">Cubicle 2795</span><br><span style="font-size:12.8000001907349px">College Park, MD 20740</span><br><span style="font-size:12.8000001907349px">Tel: </span><a href="tel:%28301%29-683-3763" value="+13016833763" target="_blank">(301)-683-3816</a><br>Cel: <span style="color:rgb(0,0,255)"><u style="background-color:rgb(255,255,255)">(407)-621-1676 </u><span style="background-color:rgb(243,243,243)"></span></span><br><span style="font-size:12.8000001907349px">Email: <a href="mailto:Keren.Rosado@noaa.gov" target="_blank">Keren.Rosado@noaa.gov</a><a href="mailto:Bin.Liu@noaa.gov" target="_blank"></a></span></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Nov 30, 2015 at 2:50 PM, James T. Potemra <span dir="ltr">&lt;<a href="mailto:jimp@hawaii.edu" target="_blank">jimp@hawaii.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Keren,<br>
    <br>
    Another possibility is that you haven&#39;t displayed a variable yet,
    thus you don&#39;t have plotting dimensions defined.  If you open
    &quot;dummy.ctl&quot; and then don&#39;t display anything, I think your &quot;q w2xy&quot;
    line will return &quot;No scaling environment&quot;, then this will cause
    &quot;xloc&quot; and &quot;yloc&quot; to be improperly defined.  Try display something
    first from your file &quot;dummy.ctl&quot;.<br>
    <br>
    Also, it helps to use the &quot;say&quot; function to display these variables
    within your script to help diagnose the problem.  For example,
    adding say xloc&#39;, &#39;yloc will print these values to the screen.<br>
    <br>
    Jim<div><div class="h5"><br>
    <br>
    <div>On 11/30/15 9:39 AM, Jeff Duda wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Keren,<br>
              </div>
              You have a lot of extra spaces floating around in your
              commands. As far as I know, when you&#39;re inserting script
              variables into a command in a grads script, you need to be
              very explicit with the formatting of the command. In other
              words, the spaces around your &#39;lat&#39;, &#39;lon&#39;, &#39;xloc&#39;, and
              &#39;yloc&#39; may be causing the syntax error. I recommend
              removing those spaces and trying again. For example,
              change<br>
              <br>
              &quot;draw mark &quot;flag &quot; &quot;xloc  &quot; &quot;yloc  &quot; 0.1&quot;
              <br>
              <br>
            </div>
            into <br>
            <br>
          </div>
          &quot;draw mark &quot;flag&quot; &quot;xloc&quot; &quot;yloc&quot; 0.1&quot;<br>
          <br>
        </div>
        Jeff<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Nov 30, 2015 at 1:30 PM, Keren
          Rosado - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:keren.rosado@noaa.gov" target="_blank"></a><a href="mailto:keren.rosado@noaa.gov" target="_blank">keren.rosado@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">
            <div dir="ltr">
              <div>Thanks Jeff,<br>
              </div>
              <div><br>
                I already used the q w2xy and I don&#39;t see any error. <br>
                <br>
                <br>
              </div>
              <div>Here is the rest of the script <br>
                <br>
                file =&quot;lightning_from00z29April.004.txt&quot;
                <br>
                colors=&quot;1 2 3 4 5 6 7 8 9 10 11 12 13&quot;
                <br>
                ccount=0
                <br>
                 <br>
                rc=1
                <br>
                while (rc != 2)
                <br>
                   data=read(file)
                <br>
                   rc=sublin(data,1)
                <br>
                   if (rc != 2)
                <br>
                      line=sublin(data,2)
                <br>
                      chk=substr(line,1,10)
                <br>
                      if (chk != &quot;----------&quot;)
                <br>
                 <br>
                        lat=subwrd(line,1)
                <br>
                        lon=subwrd(line,2)
                <br>
                       flag=subwrd(line,3)
                <br>
                      color=subwrd(line,4)
                <br>
                 <br>
                 <br>
                        &quot;q w2xy &quot;lon &quot; &quot; lat
                <br>
                         xloc=subwrd(result,3)
                <br>
                         yloc=subwrd(result,6)
                <br>
                         name=subwrd(ccount,1)
                <br>
                 <br>
                          &quot;set line &quot;color&quot; 1 5&quot;
                <br>
                          &quot;set lat -20 20&quot;
                <br>
                          &quot;set lon -40 25&quot;
                <br>
                          &quot;draw mark &quot;flag &quot; &quot;xloc  &quot; &quot;yloc  &quot; 0.1&quot;
                <br>
                *         &quot;draw mark 1 &quot; xloc  &quot; &quot;yloc  &quot; 0.06&quot;
                <br>
                      else
                <br>
                         ccount=ccount+1
                <br>
                      endif
                <br>
                   endif
                <br>
                endwhile
                <br>
                 <br>
                 <br>
                &#39;set string 1 tc 1&#39;
                <br>
                &#39;set strsiz .30&#39;<br>
                <br>
              </div>
            </div>
            <div class="gmail_extra"><br clear="all">
              <div>
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div style="font-size:12.8000001907349px">----<br>
                          Keren Rosado<br>
                          PhD Candidate/Howard University/NOAA EPP GRTSP
                          Fellow<br>
                          Intern/NOAA/NWS/NCEP/EMC <br>
                        </div>
                        <div><span style="font-size:12.8000001907349px">5830
                            University Research CT</span></div>
                        <div><span style="font-size:12.8000001907349px">Cubicle
                            2795</span><br>
                          <span style="font-size:12.8000001907349px">College
                            Park, MD 20740</span><br>
                          <span style="font-size:12.8000001907349px">Tel: </span><a href="tel:%28301%29-683-3763" value="+13016833763" target="_blank">(301)-683-3816</a><br>
                          Cel: <span style="color:rgb(0,0,255)"><u style="background-color:rgb(255,255,255)"><a href="tel:%28407%29-621-1676" value="+14076211676" target="_blank">(407)-621-1676</a>
                            </u><span style="background-color:rgb(243,243,243)"></span></span><br>
                          <span style="font-size:12.8000001907349px">Email:
                            <a href="mailto:Keren.Rosado@noaa.gov" target="_blank">Keren.Rosado@noaa.gov</a></span></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <br>
              <div class="gmail_quote">On Mon, Nov 30, 2015 at 2:06 PM,
                Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div dir="ltr">
                    <div>Keren,<br>
                      <br>
                      The error tells you what the problem is. You must
                      have a &quot;draw mark&quot; command somewhere in your
                      script that has a syntax error in it. You can use
                      the grads documentation index to determine values
                      of the various arguments to that function. I
                      suspect you have an error in your x and y
                      arguments in the function call. The x and y
                      arguments need to be in real page units, not world
                      coordinates. You&#39;ll need to use the &#39;query
                      (position)&#39; functions to translate between world
                      coordinates, grid coordinates, and page
                      coordinates. A commonly used one is &#39;q w2xy&#39;,
                      which would convert world coordinates to real page
                      coordinates.<span><font color="#888888"><br>
                          <br>
                        </font></span></div>
                    <span><font color="#888888">Jeff Duda<br>
                      </font></span></div>
                  <div>
                    <div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">On Mon, Nov 30, 2015 at
                          12:51 PM, Keren Rosado - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:keren.rosado@noaa.gov" target="_blank">keren.rosado@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">
                            <div dir="ltr">
                              <div>The text file is big but from what I
                                can see is all numbers. <br>
                                <br>
                                 11.228   -73.969   1<br>
                                 13.983     5.299   1<br>
                                 13.790   -14.934   1<br>
                                 22.645   -51.073   1<br>
                                 11.254   -73.973   1<br>
                                  6.508   -61.990   1<br>
                                 11.405     4.011   1<br>
                                 29.012   -59.311   1<br>
                                 11.262   -74.027   1<br>
                                 10.631   -68.972   1<br>
                                 11.270   -73.941   1<br>
                                 11.341   -73.955   1<br>
                                 11.295   -73.604   1<br>
                                 11.269   -73.595   1<br>
                                 11.231   -73.537   1<br>
                                 11.254   -73.611   1<br>
                                <br>
                                <br>
                              </div>
                              When I type  &quot;run <a href="http://namescript.gs" target="_blank">namescript.gs</a>&quot; I get
                              the following error:<br>
                              <br>
                               DRAW error: Syntax is DRAW MARK marktype
                              x y size<br>
                              DRAW error: Syntax is DRAW MARK marktype x
                              y size<br>
                              DRAW error: Syntax is DRAW MARK marktype x
                              y size<br>
                              DRAW error: Syntax is DRAW MARK marktype x
                              y size<br>
                              DRAW error: Syntax is DRAW MARK marktype x
                              y size<br>
                              DRAW error: Syntax is DRAW MARK marktype x
                              y size<br>
                              <div>
                                <div><br>
                                </div>
                                <div>But when I run the script line by
                                  line the first error I get is the one
                                  I send in the first email.<br>
                                </div>
                                <div><br>
                                  <br>
                                </div>
                                <div>Thanks<br>
                                </div>
                                <div>
                                  <div><br>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <div class="gmail_extra"><span><br clear="all">
                                <div>
                                  <div>
                                    <div dir="ltr">
                                      <div>
                                        <div dir="ltr">
                                          <div style="font-size:12.8000001907349px">----<br>
                                            Keren Rosado<br>
                                            PhD Candidate/Howard
                                            University/NOAA EPP GRTSP
                                            Fellow<br>
                                            Intern/NOAA/NWS/NCEP/EMC <br>
                                          </div>
                                          <div><span style="font-size:12.8000001907349px">5830
                                              University Research CT</span></div>
                                          <div><span style="font-size:12.8000001907349px">Cubicle
                                              2795</span><br>
                                            <span style="font-size:12.8000001907349px">College
                                              Park, MD 20740</span><br>
                                            <span style="font-size:12.8000001907349px">Tel: </span><a href="tel:%28301%29-683-3763" value="+13016833763" target="_blank">(301)-683-3816</a><br>
                                            Cel: <span style="color:rgb(0,0,255)"><u style="background-color:rgb(255,255,255)"><a href="tel:%28407%29-621-1676" value="+14076211676" target="_blank">(407)-621-1676</a>
                                              </u><span style="background-color:rgb(243,243,243)"></span></span><br>
                                            <span style="font-size:12.8000001907349px">Email:
                                              <a href="mailto:Keren.Rosado@noaa.gov" target="_blank">Keren.Rosado@noaa.gov</a></span></div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                                <br>
                              </span>
                              <div>
                                <div>
                                  <div class="gmail_quote">On Mon, Nov
                                    30, 2015 at 1:16 PM, Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank"></a><a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span>
                                    wrote:<br>
                                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                      <div dir="ltr">
                                        <div>The snippet of script code
                                          you included isn&#39;t consistent
                                          with the output you included.
                                          I can&#39;t see from what you
                                          included what would be the
                                          cause of the error. Do you
                                          have non-alphanumeric
                                          characters in your text file?
                                          Otherwise I suspect you have a
                                          syntax error in your script
                                          somewhere else.<br>
                                          <br>
                                        </div>
                                        Jeff Duda<br>
                                      </div>
                                      <div class="gmail_extra"><br>
                                        <div class="gmail_quote">
                                          <div>
                                            <div>On Mon, Nov 30, 2015 at
                                              10:36 AM, Keren Rosado -
                                              NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:keren.rosado@noaa.gov" target="_blank"></a><a href="mailto:keren.rosado@noaa.gov" target="_blank">keren.rosado@noaa.gov</a>&gt;</span>
                                              wrote:<br>
                                            </div>
                                          </div>
                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                            <div>
                                              <div>
                                                <div dir="ltr">
                                                  <div>
                                                    <div>Hello, <br>
                                                      <br>
                                                    </div>
                                                    I am trying to open
                                                    a .txt file in a .gs
                                                    grads script without
                                                    luck. <br>
                                                  </div>
                                                  <div>Grads version
                                                    2.0.1<br>
                                                  </div>
                                                  <div><br>
                                                    <br>
                                                  </div>
                                                  This is what I have <br>
                                                  <div><br>
                                                    &#39;open dummy.ctl&#39;<br>
                                                    file =
                                                    &#39;A20100826a.txt&#39;<br>
                                                    colors=&quot;1 2 3 4 5 6
                                                    7 8 9 10 11 12 13&quot;<br>
                                                    ccount=0<br>
                                                    <br>
                                                    rc=1<br>
                                                    while (rc != 2)<br>
                                                       data=read(file)<br>
                                                       rc=sublin(data,1)<br>
                                                       if (rc != 2)<br>
                                                         
                                                    line=sublin(data,2)<br>
                                                         
                                                    chk=substr(line,1,10)<br>
                                                          if (chk !=
                                                    &quot;----------&quot;)<br>
                                                    .<br>
                                                    .<br>
                                                    .<br>
                                                    .<br>
                                                  </div>
                                                  <div> The code keeps
                                                    going but the error
                                                    is at the &quot;file&quot;
                                                    line. <br>
                                                    <br>
                                                  </div>
                                                  <div>Here is the error
                                                    <br>
                                                    file =
                                                    &#39;A20100826a.txt&#39;<br>
                                                    Syntax Error: 
                                                    Expected operand or
                                                    &#39;(&#39;<br>
                                                      Error ocurred at
                                                    column 1<br>
                                                    DEFINE error: 
                                                    Invalid expression.
                                                    <br>
                                                    <br>
                                                  </div>
                                                  <div>Thanks!<br>
                                                  </div>
                                                  <div><br>
                                                  </div>
                                                  <div><br>
                                                    <br clear="all">
                                                    <div>
                                                      <div>
                                                        <div>
                                                          <div>
                                                          <div dir="ltr">
                                                          <div>
                                                          <div dir="ltr">
                                                          <div style="font-size:12.8px">----<br>
                                                          Keren Rosado<br>
                                                          PhD
                                                          Candidate/Howard
                                                          University/NOAA
                                                          EPP GRTSP
                                                          Fellow<br>
                                                          Intern/NOAA/NWS/NCEP/EMC
                                                          <br>
                                                          </div>
                                                          <div><span style="font-size:12.8px">5830
                                                          University
                                                          Research CT</span></div>
                                                          <div><span style="font-size:12.8px">Cubicle
                                                          2795</span><br>
                                                          <span style="font-size:12.8px">College
                                                          Park, MD 20740</span><br>
                                                          <span style="font-size:12.8px">Tel: </span><a href="tel:%28301%29-683-3763" value="+13016833763" target="_blank">(301)-683-3816</a><br>
                                                          Cel: <span style="color:rgb(0,0,255)"><u style="background-color:rgb(255,255,255)"><a href="tel:%28407%29-621-1676" value="+14076211676" target="_blank">(407)-621-1676</a> </u><span style="background-color:rgb(243,243,243)"></span></span><br>
                                                          <span style="font-size:12.8px">Email:
                                                          <a href="mailto:Keren.Rosado@noaa.gov" target="_blank"></a><a href="mailto:Keren.Rosado@noaa.gov" target="_blank">Keren.Rosado@noaa.gov</a></span></div>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </div>
                                                        </div>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </div>
                                                <br>
                                              </div>
                                            </div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
                                            <br>
                                          </blockquote>
                                        </div>
                                        <span><font color="#888888"><br>
                                            <br clear="all">
                                            <br>
                                            -- <br>
                                            <div>Jeff Duda<br>
                                              Graduate research
                                              assistant<br>
                                              University of Oklahoma
                                              School of Meteorology<br>
                                              Center for Analysis and
                                              Prediction of Storms<br>
                                            </div>
                                          </font></span></div>
                                      <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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
                                      <br>
                                    </blockquote>
                                  </div>
                                  <br>
                                </div>
                              </div>
                            </div>
                            <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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
                            <br>
                          </blockquote>
                        </div>
                        <br>
                        <br clear="all">
                        <span><font color="#888888"><br>
                            -- <br>
                            <div>Jeff Duda<br>
                              Graduate research assistant<br>
                              University of Oklahoma School of
                              Meteorology<br>
                              Center for Analysis and Prediction of
                              Storms<br>
                            </div>
                          </font></span></div>
                      <span><font color="#888888">
                        </font></span></div>
                  </div>
                  <span><font color="#888888"><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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
                      <br>
                    </font></span></blockquote>
              </div>
              <br>
            </div>
            <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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div>Jeff Duda<br>
          Graduate research assistant<br>
          University of Oklahoma School of Meteorology<br>
          Center for Analysis and Prediction of Storms<br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>