<p dir="ltr">Dear all, I am unable to increase the unit of colour bar (colour code), any help in this regard will be appreciated.<br>
</p>
<div class="gmail_quote">On Aug 16, 2015 11:30 PM,  &lt;<a href="mailto:ncl-talk-request@ucar.edu">ncl-talk-request@ucar.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send ncl-talk mailing list submissions to<br>
        <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:ncl-talk-request@ucar.edu">ncl-talk-request@ucar.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:ncl-talk-owner@ucar.edu">ncl-talk-owner@ucar.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of ncl-talk digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. how to plot xy2 plot with 1D data ( grace )<br>
   2. Reading 3G68 TRMM (Ipsita Putatunda)<br>
   3. Re: Reading 3G68 TRMM (Dennis Shea)<br>
   4. Re: Reading 3G68 TRMM (Ipsita Putatunda)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 16 Aug 2015 09:07:06 +0800<br>
From: &quot; grace &quot; &lt;<a href="mailto:313695096@qq.com">313695096@qq.com</a>&gt;<br>
Subject: [ncl-talk] how to plot xy2 plot with 1D data<br>
To: &quot; ncl-talk &quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
Message-ID: &lt;<a href="mailto:tencent_5E9341E166F1E2D5446E797C@qq.com">tencent_5E9341E166F1E2D5446E797C@qq.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi,all:    I am wondering how to plot xy2 plot with 1D data?<br>
   I want to compare wrfout data with observed data in a xy2 plot with time as the X axis,<br>
but the observed data are 1D without time  demension in a .txt file, a data per hour .<br>
    I have  extract the wrfout data as 1D data in a .txt file :<br>
;;;;;;;;;;;;;;;;;;;;;<br>
ascii_file = &quot;temp.txt&quot;<br>
str = new(ntimes, &quot;string&quot;)<br>
  do it =0, ntimes-1,1        ; TIME LOOP<br>
<br>
t2= wrf_user_getvar(a,&quot;T2&quot;,it)<br>
      t2= t2-273.15<br>
      t2@units = &quot;c&quot;<br>
        tt2=t2(it,98, 98)<br>
    end if<br>
   str(it) = sprintf(&quot;%12.8f&quot;, tt2)<br>
end do<br>
<br>
   asciiwrite(ascii_file, str)<br>
;;;;;;;;;;;;;;;;;;;;;;;<br>
<br>
<br>
How can I plot the xyplot with time as the X axis while data do not have time demension with the &quot;plot = gsn_csm_xy2(wks,time,t2,tob,resL,resR)&quot;<br>
<br>
<br>
   Or do you guys have some advice?<br>
    any information will be appreciated<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/56bfc6ba/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/56bfc6ba/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 16 Aug 2015 11:45:26 +0530<br>
From: Ipsita Putatunda &lt;<a href="mailto:ipsita.putatunda@gmail.com">ipsita.putatunda@gmail.com</a>&gt;<br>
Subject: [ncl-talk] Reading 3G68 TRMM<br>
To: &quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a> Talk&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
Message-ID:<br>
        &lt;CA+WpEXstEmD4UARiN2kJkeiqBo6a+wFFk+PF=<a href="mailto:KoCa2m6O-z2MA@mail.gmail.com">KoCa2m6O-z2MA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Dear all,<br>
   I need to get a two dimensional variable Var(lat,lon) from TRMM 3G68<br>
 dataset which is in ascii form. I am able to read the data using<br>
asciiread, and then by using str_get_field function, but how to convert it<br>
into a 2 dimensional variable whose coordinate will be lat and lon. Any<br>
help in this issue will be appreciated.<br>
<br>
Thanks in advance,<br>
Ipsita<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/0a3155e4/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/0a3155e4/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sun, 16 Aug 2015 07:35:34 -0600<br>
From: Dennis Shea &lt;<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br>
Subject: Re: [ncl-talk] Reading 3G68 TRMM<br>
To: Ipsita Putatunda &lt;<a href="mailto:ipsita.putatunda@gmail.com">ipsita.putatunda@gmail.com</a>&gt;<br>
Cc: &quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a> Talk&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:CAOF1d_6%2BHDC7CgZ59535oB5hxTf4_-Sjnx_02w6_OgzOUZBd4w@mail.gmail.com">CAOF1d_6+HDC7CgZ59535oB5hxTf4_-Sjnx_02w6_OgzOUZBd4w@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
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>
<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>
&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>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Sun, 16 Aug 2015 22:04:19 +0530<br>
From: Ipsita Putatunda &lt;<a href="mailto:ipsita.putatunda@gmail.com">ipsita.putatunda@gmail.com</a>&gt;<br>
Subject: Re: [ncl-talk] Reading 3G68 TRMM<br>
To: Dennis Shea &lt;<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br>
Cc: &quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a> Talk&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
Message-ID:<br>
        &lt;CA+WpEXtZtSZSZzBm=17z=yZUdPQ8+hmELRULidetA9z+Lxg=<a href="mailto:bw@mail.gmail.com">bw@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Thank you for your help. I got the 2D variable as per your suggestions. But<br>
it is giving one warning message as mentioned below, as the size of x and<br>
PR differs. Is their any way to make it correct. Why is it coming like<br>
that? There are also some grids for the variable where there is no data,<br>
and may be that is why converting PR from string to float is preventing.<br>
How can I convert the data from string to float? Any help will be<br>
appreciated.<br>
My script is attached here with.<br>
<br>
Variable: x<br>
Type: string<br>
Total Size: 802264 bytes<br>
            200566 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes:   [200566]<br>
Coordinates:<br>
warning:onedtond : output dimension sizes not even multiples of input,<br>
check output<br>
<br>
<br>
Variable: PR<br>
Type: string<br>
Total Size: 1036800 bytes<br>
            259200 values<br>
Number of Dimensions: 2<br>
Dimensions and sizes:   [lat | 360] x [lon | 720]<br>
Coordinates:<br>
            lat: [-89.75..89.75]<br>
            lon: [-179.75..89.75]<br>
Number Of Attributes: 2<br>
  long_name :   PR_rain<br>
  units :       mm/hour<br>
(0,0)<br>
(0,1)<br>
(0,2)<br>
(0,3)<br>
(0,4)<br>
(0,5)<br>
(0,6)<br>
(0,7)<br>
(0,8)<br>
(0,9)<br>
(0,10)<br>
(0,11)<br>
<br>
<br>
Thanks,<br>
Ipsita<br>
<br>
On Sun, Aug 16, 2015 at 7:05 PM, Dennis Shea &lt;<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt; wrote:<br>
<br>
&gt; Please read:<br>
&gt;   <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>
&gt;<br>
&gt; =================<br>
&gt; You must look at your data.  There are different resolutions (0.25,<br>
&gt; 0.50, ..). A 0.5 light have<br>
&gt;<br>
&gt; 3G68 7.1 NONE NONE NASA/JAXA/NICT 2011-08-14T21:16UTC<br>
&gt; 360 720 -90 -180 0.5 20100901<br>
&gt; -40 40 -180 180<br>
&gt; Grid_First_Row=0 Grid_Center_Latitude=-89.75 Grid_First_Column=0<br>
&gt; Grid_Center_Longitude=-179.75 Grid_Cell_Resolution=0.5 Duration=Day<br>
&gt;<br>
&gt; So, in the function below,<br>
&gt;    latStrt  = -89.75<br>
&gt;    latLast = abs(latStrt)<br>
&gt;    lonStrt = -179.75<br>
&gt;    lonLast = abs(latStrt)<br>
&gt;    nlat  = 360<br>
&gt;    mlon = 729<br>
&gt;<br>
&gt; =====<br>
&gt;<br>
&gt;<br>
&gt; undef(&quot;3G68_txt2latlon&quot;)<br>
&gt; function 3G68_txt2latlon(x[*], nlat[1]:integer, mlon[1]:integer \<br>
&gt;                                        ,latStrt[1]:numeric, latLast[1]<br>
&gt;      \<br>
&gt;<br>
&gt;  ,lonStrt[1]:numeric,lonLast[1]:numeric)<br>
&gt; begin<br>
&gt;     data = onedtooned(x, (/nlat,mlon/) )<br>
&gt;<br>
&gt;     lat     = fspan(latStrt,latLast,nlat)<br>
&gt;     lat!0  = &quot;lat&quot;<br>
&gt;     lat@units = &quot;degrees_north&quot;<br>
&gt;     lon    = fspan(lonStrt,latLast,mlon)<br>
&gt;     lon!0 =&quot;lon&quot;<br>
&gt;     lon@units = &quot;degrees_east&quot;<br>
&gt;<br>
&gt;     data!0 = &quot;lat&quot;<br>
&gt;     data!1 = &quot;lon&quot;<br>
&gt;     data&amp;lat = lat<br>
&gt;     data&amp;lon = lon<br>
&gt;     data@long_name = &quot;...&quot;<br>
&gt;     data@units = &quot;...&quot;<br>
&gt;<br>
&gt;     return(data)<br>
&gt; end<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Aug 16, 2015 at 12:15 AM, Ipsita Putatunda<br>
&gt; &lt;<a href="mailto:ipsita.putatunda@gmail.com">ipsita.putatunda@gmail.com</a>&gt; wrote:<br>
&gt; &gt; Dear all,<br>
&gt; &gt;    I need to get a two dimensional variable Var(lat,lon) from TRMM 3G68<br>
&gt; &gt; dataset which is in ascii form. I am able to read the data using<br>
&gt; asciiread,<br>
&gt; &gt; and then by using str_get_field function, but how to convert it into a 2<br>
&gt; &gt; dimensional variable whose coordinate will be lat and lon. Any help in<br>
&gt; this<br>
&gt; &gt; issue will be appreciated.<br>
&gt; &gt;<br>
&gt; &gt; Thanks in advance,<br>
&gt; &gt; Ipsita<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; ncl-talk mailing list<br>
&gt; &gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; &gt; List instructions, subscriber options, unsubscribe:<br>
&gt; &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; &gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/302dc9a6/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/302dc9a6/attachment-0001.html</a><br>
-------------- next part --------------<br>
;====================================================================<br>
 load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>
 load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>
 load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>
 ;load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot;<br>
;====================================================================<br>
 ;begin<br>
  netCDF=True<br>
  fn=&quot;3G68.20131201.7.txt&quot;<br>
  x1 = asciiread(fn ,-1 , &quot;string&quot;)<br>
  delim=&quot; &quot;<br>
;====================================================================<br>
  x= str_get_field(x1(5:),11,delim)<br>
  printVarSummary(x)<br>
;====================================================================<br>
  latStrt  = -89.75<br>
  latLast = abs(latStrt)<br>
  lonStrt = -179.75<br>
  lonLast = abs(latStrt)<br>
  nlat  = 360<br>
  mlon = 720<br>
;=====================================================<br>
   undef(&quot;txt2latlon&quot;)<br>
function txt2latlon(x[*], nlat[1]:integer, mlon[1]:integer \<br>
                                       ,latStrt[1]:numeric, latLast[1]         \<br>
                                       ,lonStrt[1]:numeric,lonLast[1]:numeric)<br>
;=====================================================<br>
  local data<br>
  begin<br>
    data = onedtond(x, (/nlat,mlon/) )<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>
    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;PR_rain&quot;<br>
    data@units = &quot;mm/hour&quot;<br>
<br>
    return(data)<br>
   end<br>
   begin<br>
    PR=txt2latlon(x, nlat, mlon \<br>
                                       ,latStrt,latLast\<br>
                                       ,lonStrt,lonLast)<br>
    print(PR)<br>
   end<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
<br>
End of ncl-talk Digest, Vol 141, Issue 26<br>
*****************************************<br>
</blockquote></div>