<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Dennis,</p>
    <p>Thanks for the answer, which solves my problem. However, I am
      still curious why the Fortran code doesn't work and how I can make
      it work. I ask this because I heavily rely on Fortran to process
      some in-situ observations, which includes both numbers and
      strings. I hope to understand more about the combination of
      Fortran with NCL.<br>
    </p>
    <p>Thanks again.</p>
    <p>Ming<br>
    </p>
    <div class="moz-cite-prefix">On 8/26/19 6:04 PM, Dennis Shea wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOF1d_6RW3PhMidtQRyKAo4BLGfgi6J6fdG__KH1b7P_-H4XeQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>No need for fortran code.</div>
        <div><br>
        </div>
        <div><a
href="https://www.ncl.ucar.edu/Document/Functions/Contributed/get1Dindex.shtml"
            moz-do-not-send="true"><b>https://www.ncl.ucar.edu/Document/Functions/Contributed/get1Dindex.shtml</b></a></div>
        <div><br>
        </div>
        <div>========================</div>
        <div>            ;        0             1            <b>2</b>           
          3            4               <== <br>
        </div>
        <div>  cvsid = (/"76373", "76612", "<b>XRKF</b>", "PRUK",
          "DENB"/)<br>
            obsid = (/"<b>XRKF</b>", "76737", "BSRK"/)<br>
          <br>
            i = <b>get1Dindex</b>(cvsid, obsid)<br>
            print(i)<br>
            print("====")<br>
          <br>
            ni = num(.not.ismissing(i))<br>
            print("ni="+ni)<br>
            print("====")</div>
        <div>==================================<br>
        </div>
        <div>Variable: i<br>
          Type: integer<br>
          Total Size: 12 bytes<br>
                      3 values<br>
          Number of Dimensions: 1<br>
          Dimensions and sizes: [3]<br>
          Coordinates: <br>
          Number Of Attributes: 3<br>
            _FillValue : -2147483647<br>
            index_info : Out of nWant=3 : multiple index occurrences=0<br>
            nMultInd : 0</div>
        <div><br>
        </div>
        <div>(0) <b>2</b><br>
        </div>
        <div>(1) -2147483647   <=== No match for <b>76737</b></div>
        <div>(2) -2147483647   <=== No match for <b>BSRK</b><br>
          (0) ====<br>
          (0) ni=<b>1                 </b><=== only one match<br>
          (0) ====<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2019 at 5:30
          PM Ming Chen via ncl-talk <<a
            href="mailto:ncl-talk@ucar.edu" moz-do-not-send="true">ncl-talk@ucar.edu</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear
          All,<br>
          <br>
          I am trying to match two sets of in-situ observations. First
          of all, I <br>
          need to match stations between the two sets of data. However,
          my scrip <br>
          failed with the error message below:<br>
          <br>
          fatal:Argument type mismatch on argument (1) of (mpr_match)
          can not coerce<br>
          fatal:["Execute.c":8637]:Execute: Error occurred at or near
          line 19 in <br>
          file test4.ncl<br>
          <br>
          I attach the sample ncl script and fortran code. Any help will
          be highly <br>
          appreciated.<br>
          <br>
          Ming<br>
          <br>
          <br>
          _______________________________________________<br>
          ncl-talk mailing list<br>
          <a href="mailto:ncl-talk@ucar.edu" target="_blank"
            moz-do-not-send="true">ncl-talk@ucar.edu</a><br>
          List instructions, subscriber options, unsubscribe:<br>
          <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
      </div>
    </blockquote>
  </body>
</html>