<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Adv,<br>
    <br>
    if you use the new version of ncl 6.3.0 than you can write the
    wanted data to a new string array using str_match_ic_regex:<br>
    <br>
    <tt>  seldata = str_match_ic_regex(strs,"CROSBY ND US")         ;--
      NEW  available in version 6.3.0</tt><tt> and later</tt><br>
    <tt>  print(seldata)</tt><br>
    <br>
    ---&gt;<br>
    <br>
    <tt>Variable: seldata</tt><tt><br>
    </tt><tt>Type: string</tt><tt><br>
    </tt><tt>Total Size: 8024 bytes</tt><tt><br>
    </tt><tt>            1003 values</tt><tt><br>
    </tt><tt>Number of Dimensions: 1</tt><tt><br>
    </tt><tt>Dimensions and sizes:    [1003]</tt><tt><br>
    </tt><tt>Coordinates: </tt><tt><br>
    </tt><tt>Number Of Attributes: 1</tt><tt><br>
    </tt><tt>  _FillValue :    missing</tt><tt><br>
    </tt><tt>(0)    COOP:321871,CROSBY ND
US,193101,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,10,-9999,-9999,12,12,41,-18,288,103,196</tt><tt><br>
    </tt><tt>(1)    COOP:321871,CROSBY ND
US,193102,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,2,-9999,-9999,4,4,40,-8,301,181,241</tt><tt><br>
    </tt><tt>(2)    COOP:321871,CROSBY ND
US,193103,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,25,-9999,-9999,99,50,50,-11,298,131,214</tt><tt><br>
    </tt><tt>(3)    COOP:321871,CROSBY ND
US,193104,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,0,-9999,-9999,0,0,83,12,578,293,436</tt><tt><br>
    </tt><tt>(4)    COOP:321871,CROSBY ND
US,193201,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,26,-9999,-9999,51,51,42,-28,168,-19,74</tt><tt><br>
    </tt><tt>(5)    COOP:321871,CROSBY ND
US,193202,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,40,-9999,-9999,52,60,66,-18,249,16,132</tt><tt><br>
    </tt><tt>(6)    COOP:321871,CROSBY ND
US,193203,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,20,-9999,-9999,50,50,51,-23,279,80,180</tt><tt><br>
    </tt><tt>(7)    COOP:321871,CROSBY ND
US,193204,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,73,-9999,-9999,115,5,72,20,534,308,421</tt><tt><br>
    </tt><tt>(8)    COOP:321871,CROSBY ND
US,193205,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,29,-9999,-9999,58,0,90,29,687,410,548</tt><tt><br>
    </tt><tt>(9)    COOP:321871,CROSBY ND
US,193206,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,249,-9999,-9999,594,0,87,47,759,544,652</tt><tt><br>
    </tt><tt>(10)    COOP:321871,CROSBY ND
US,193207,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,79,-9999,-9999,199,0,98,43,826,543,684</tt><tt><br>
    </tt>.....<br>
    <br>
    Bye,<br>
    Karin<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 24.03.15 um 03:54 schrieb Adv:<br>
    </div>
    <blockquote
cite="mid:CAHfbfHtSHkM-taDgiTkLS=6m25U6XddnPxR_y0gSrWL=yBANbQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Ncl users,<br>
            </div>
            This is how my code look like. I would like to extract data
            corresponding to station name and plot spatially only over 
            North Dakota region. Could some one help me to accomplish
            this by extracting the data for different variables. I have
            attached the input csv file with this mail. I have many csv
            files like this. I just wanna loop in such a way all data
            can be processed at once.<br>
          </div>
          Thanks,<br>
        </div>
        Adv<br>
        <div>
          <div>
            <div>
              <div><br>
                begin<br>
                  flnm = "479615.csv"<br>
                 strs = asciiread(flnm,-1,"string")<br>
                ;print(strs)<br>
                split_lines = str_split_csv(strs,",",2)<br>
                  nlines  = dimsizes(split_lines(:,0))<br>
                  nfields = dimsizes(split_lines(0,:))<br>
                 header = split_lines(0,:)<br>
                do n=0,nlines-1<br>
                      tf = isStrSubset(strs(n), "CROSBY ND US")<br>
                      if (tf) then<br>
                      field=(strs(n))<br>
                    do nf=0,nfields-1<br>
                      print(header(nf) + " : " +
                str_join(split_lines(n,nf),", "))<br>
                    end do<br>
                      end if<br>
                end do<br>
                return<br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dipl. Geophys. Karin Meier-Fleischer
Visualization
Application Support

Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany

Phone:    +49 (0)40 460094 126
Fax:      +49 (0)40 460094 270
E-Mail:   <a class="moz-txt-link-abbreviated" href="mailto:meier-fleischer@dkrz.de">meier-fleischer@dkrz.de</a>
URL:      <a class="moz-txt-link-abbreviated" href="http://www.dkrz.de">www.dkrz.de</a>

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784
</pre>
  </body>
</html>