<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Jayanti,<br>
    <br>
    simple answer is yes. If your wind speed variable is <tt>speed</tt>
    and the wind direction variable is <tt>direction</tt>:<br>
    <br>
    <font color="#3333ff"><tt>  rad = 4.0*atan(1.0)/180.
      </tt><tt><br>
      </tt><tt>  u   = -speed*sin(rad*direction)
      </tt><tt><br>
      </tt><tt> 
        v   = -speed*cos(rad*direction)
      </tt></font><br>
    <br>
    Instead of the computation of <tt>rad</tt> above you can also use
    the function <tt>get_d2r</tt>:  <font color="#3333ff"><tt>rad =
        get_d2r("float")</tt></font><br>
    <br>
    Bye,<br>
    Karin<br>
    <br>
    <div class="moz-cite-prefix">Am 05.02.18 um 10:30 schrieb jayanti
      pal:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1302733418.3035834.1517823033209@mail.yahoo.com">
      <div style="font-family:courier new, courier, monaco, monospace,
        sans-serif;font-size:13px;">
        <div>
          <div>I have wind direction and wind speed in a file (hdf
            format and swath data). Will it be possible to calculate U
            and V component using ncl?</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div class="ydpe395c88esignature"><span
              style="font-weight:bold;font-size:medium;font-family:'Courier
              New', courier, monaco, monospace, sans-serif;">Dr. Jayanti
              Pal</span>
            <div><span style="font-size:medium;font-family:'Courier
                New', courier, monaco, monospace, sans-serif;">Post-doc
                Fellow</span></div>
            <div><span style="font-size:medium;font-family:'Courier
                New', courier, monaco, monospace, sans-serif;">Department
                of Atmospheric Sciences</span></div>
            <div><span style="font-size:medium;font-family:'Courier
                New', courier, monaco, monospace, sans-serif;">Institute
                of Atmospheric and Environmental Sciences</span></div>
            <div><span style="font-size:medium;font-family:'Courier
                New', courier, monaco, monospace, sans-serif;">University
                of Calcutta</span></div>
            <div><span style="font-size:medium;font-family:'Courier
                New', courier, monaco, monospace, sans-serif;">Contact:
                <span
                  style="font-style:italic;font-weight:bold;color:rgb(203,
                  0, 142);"><a class="moz-txt-link-abbreviated" href="mailto:jiban_samudra18@yahoo.com">jiban_samudra18@yahoo.com</a></span>,<span
                  style="font-weight:bold;font-style:italic;color:rgb(156,
                  0, 92);"> <a class="moz-txt-link-abbreviated" href="mailto:jayantibright@gmail.com">jayantibright@gmail.com</a></span></span></div>
            <div><span
                style="font-weight:bold;font-size:medium;font-family:'Courier
                New', courier, monaco, monospace, sans-serif;">Ph.
                8013906997</span></div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
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>
  </body>
</html>