<div dir="ltr"><div><div><div><div><div>Dear Rick,<br><br></div>Many Thanks for the suggestion, Its working now.<br><br>ubyte was the right type for fortran character (1)<br><br></div>also function toint() is working instead of charactertointeger() or chartoint() that is exactly mimicking the ichar function of fortran.<br>
<br></div>I think that my code can be put in the example section of binary reading as it would be very useful for the future users if NCL adminstration agrees.<br></div><div>If yes then let me know to whom the code has to be sent.<br>
</div><div><br></div>Sincerely<br></div>Samir<br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 6:18 PM,  <span dir="ltr">&lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Samir,<br>
<br>
In answer to your second question, there are the functions charactertoint()/<u></u>charactertointeger() which seem to do what ICHAR() does.<br>
<br>
I&#39;m not familiar with SSMI data, but a quick look over the data format suggests that &#39;ubyte&#39; would indeed be the right type. I don&#39;t think you&#39;d need something like ichar in this case, unless you needed your variable wind to be explicitly 4-byte integer, in which case:<br>

<br>
   tmp = fbinread(....)<br>
   wind = toint(tmp)<br>
<br>
Hope that helps...<br>
Rick<div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, 19 Sep 2013 16:14:27 +0530<br>
 samir pokhrel &lt;<a href="mailto:samir@tropmet.res.in" target="_blank">samir@tropmet.res.in</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear NCL users,<br>
<br>
I am trying to read binary SSMI data from REMSS site.<br>
<br>
The data is in written as a character in lat and lon array and read in<br>
fortran90 as<br>
<br>
CHARACTER(1) abuf(1440,720,4)<br>
         READ(3,rec=1) abuf<br>
<br>
<br>
then converted using ICHAR function of fortran as follows.<br>
<br>
ssmi_data(:,:)=ICHAR(abuf(:,:)<u></u>)<br>
<br>
<br>
I am reading the first record of this data as<br>
<br>
wind  = fbinrecread (dpath + infile,0,(/1440,720/),&quot;ubyte&quot;)<br>
<br>
will &quot;ubyte&quot; be approprate type here?<br>
<br>
secondly<br>
<br>
Is there any NCL function similar to fortran ichar function.<br>
<br>
Any help will be highly appreciated<br>
<br>
Sincerely<br>
Samir<br>
-- <br>
Samir Pokhrel<br>
Climate and Global Modelling Division<br>
Indian Institute of Tropical Meteorology<br>
NCL Post, Pashan<br>
Pune-411008<br>
INDIA<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Samir Pokhrel<br>Climate and Global Modelling Division<br>Indian Institute of Tropical Meteorology<br>NCL Post, Pashan<br>Pune-411008<br>INDIA
</div>