<div dir="ltr"><div>Thank you for your help. I got the 2D variable as per your suggestions. But it is giving one warning message as mentioned below, as the size of x and PR differs. Is their any way to make it correct. Why is it coming like that? There are also some grids for the variable where there is no data, and may be that is why converting PR from string to float is preventing. How can I convert the data from string to float? Any help will be appreciated.</div><div>My script is attached here with.</div><div><br></div><div>Variable: x</div><div>Type: string</div><div>Total Size: 802264 bytes</div><div>            200566 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:   [200566]</div><div>Coordinates:</div><div>warning:onedtond : output dimension sizes not even multiples of input, check output</div><div><br></div><div><br></div><div>Variable: PR</div><div>Type: string</div><div>Total Size: 1036800 bytes</div><div>            259200 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:   [lat | 360] x [lon | 720]</div><div>Coordinates:</div><div>            lat: [-89.75..89.75]</div><div>            lon: [-179.75..89.75]</div><div>Number Of Attributes: 2</div><div>  long_name :   PR_rain</div><div>  units :       mm/hour</div><div>(0,0)</div><div>(0,1)</div><div>(0,2)</div><div>(0,3)</div><div>(0,4)</div><div>(0,5)</div><div>(0,6)</div><div>(0,7)</div><div>(0,8)</div><div>(0,9)</div><div>(0,10)</div><div>(0,11)</div><div><br></div><div><br></div><div>Thanks,</div><div>Ipsita</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 16, 2015 at 7:05 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@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">Please read:<br>
  <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml</a><br>
<br>
=================<br>
You must look at your data.  There are different resolutions (0.25,<br>
0.50, ..). A 0.5 light have<br>
<br>
3G68 7.1 NONE NONE NASA/JAXA/NICT 2011-08-14T21:16UTC<br>
360 720 -90 -180 0.5 20100901<br>
-40 40 -180 180<br>
Grid_First_Row=0 Grid_Center_Latitude=-89.75 Grid_First_Column=0<br>
Grid_Center_Longitude=-179.75 Grid_Cell_Resolution=0.5 Duration=Day<br>
<br>
So, in the function below,<br>
   latStrt  = -89.75<br>
   latLast = abs(latStrt)<br>
   lonStrt = -179.75<br>
   lonLast = abs(latStrt)<br>
   nlat  = 360<br>
   mlon = 729<br>
<br>
=====<br>
<br>
<br>
undef(&quot;3G68_txt2latlon&quot;)<br>
function 3G68_txt2latlon(x[*], nlat[1]:integer, mlon[1]:integer \<br>
                                       ,latStrt[1]:numeric, latLast[1]         \<br>
                                       ,lonStrt[1]:numeric,lonLast[1]:numeric)<br>
begin<br>
    data = onedtooned(x, (/nlat,mlon/) )<br>
<br>
    lat     = fspan(latStrt,latLast,nlat)<br>
    lat!0  = &quot;lat&quot;<br>
    lat@units = &quot;degrees_north&quot;<br>
    lon    = fspan(lonStrt,latLast,mlon)<br>
    lon!0 =&quot;lon&quot;<br>
    lon@units = &quot;degrees_east&quot;<br>
<br>
    data!0 = &quot;lat&quot;<br>
    data!1 = &quot;lon&quot;<br>
    data&amp;lat = lat<br>
    data&amp;lon = lon<br>
    data@long_name = &quot;...&quot;<br>
    data@units = &quot;...&quot;<br>
<br>
    return(data)<br>
end<br>
<div><div class="h5"><br>
<br>
<br>
On Sun, Aug 16, 2015 at 12:15 AM, Ipsita Putatunda<br>
&lt;<a href="mailto:ipsita.putatunda@gmail.com">ipsita.putatunda@gmail.com</a>&gt; wrote:<br>
&gt; Dear all,<br>
&gt;    I need to get a two dimensional variable Var(lat,lon) from TRMM 3G68<br>
&gt; dataset which is in ascii form. I am able to read the data using asciiread,<br>
&gt; and then by using str_get_field function, but how to convert it into a 2<br>
&gt; dimensional variable whose coordinate will be lat and lon. Any help in this<br>
&gt; issue will be appreciated.<br>
&gt;<br>
&gt; Thanks in advance,<br>
&gt; Ipsita<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;<br>
</blockquote></div><br></div>