<div dir="ltr"><div><div><div><div>Dear NCL users,<br></div>   In continuation of my previous mail, I have little confusion while generating data variable in my attached script.Here I have opened two input files each containing 2 files daily.For ifil1 the variable q1, I want to sum up these 2 files to get one output daily file. But while doing operation q2=q1+q2 am not sure that it is doing the same way that I want.printing MinMax of q3 and q2 make this doubt to me. Is there any way to check if it doing correctly?<br><br></div>Secondly printing gknt is giving some junk values (-2147483647) which it is setting as fillvalue by default, though I have initialized it already. Is it doing the correct operation?<br><br></div><div>Any help will be appreciated.<br></div><div><br></div>Thanks,<br></div>Ipsita<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 7:42 PM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Dennis and Alan for your support.<div><br></div><div>Thanks,</div><div>Ipsita</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 10:06 PM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">From a 2A25 perspective and this goes along with what Dennis said,  know your data.  Extensive Documentation here: <a href="http://www.eorc.jaxa.jp/TRMM/documents/PR_algorithm_product_information/pr_manual/PR_Instruction_Manual_V7_L1.pdf" target="_blank">http://www.eorc.jaxa.jp/TRMM/documents/PR_algorithm_product_information/pr_manual/PR_Instruction_Manual_V7_L1.pdf</a></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Relevant info on page 118.   Which details how to implement the scaling, what the extra dimension is.  (It’s vertical so summing may not be what you what.)</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">And details about the two types of missing data values.  They leave out the along track dimension btw.</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">For the archive in-case that link dies. </div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"> I’m in now way affiliated with this data, have just used it and had the documentation on hand. </div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"> </div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="margin:0px;font-size:13px;font-family:Helvetica,Arial;color:rgb(0,0,0)"><div style="margin:0px">rain </div><div style="margin:0px">float32 rain[49][80]; </div><div style="margin:0px">REAL*4 rain(80,49) </div><div style="margin:0px"><br></div><div style="margin:0px">Internally this quantity is stored as </div><div style="margin:0px">int16 rain_scale[49][80] after multiplied (scaled) by 100. </div><div style="margin:0px">rainfall rate in mm/h </div><div style="margin:0px"><br></div><div style="margin:0px">49 elements in the 2-D array correspond to the angle bins and 80 elements </div><div style="margin:0px">(first argument in FORTRAN convention) in the 2-D array correspond to the range </div><div style="margin:0px">bins. </div><div style="margin:0px"><br></div><div style="margin:0px">If the estimated Z-factor is below 0 dBZ, the rain rate is always set to 0. </div><div style="margin:0px">If the input radar reflectivity factor Zm is below the noise level, </div><div style="margin:0px">the corresponding rain estimate is set to 0. This procedure does not cause </div><div style="margin:0px">any serious problem except when the measured Zm becomes smaller than the noise </div><div style="margin:0px">level by rain attenuation. In such a case, even if some heavy rain exists near </div><div style="margin:0px">the surface,the number in this variable is 0. </div><div style="margin:0px"><br></div><div style="margin:0px">To know whether such low radar reflectivity factors are caused by large </div><div style="margin:0px">attenuation or not, look at the forth bit of &#39;reliab&#39; and the forth bit of </div><div style="margin:0px">rainFlag.</div><div style="margin:0px"><br></div><div style="margin:0px">80 range bins are filled with data from top to bottom in height. </div><div style="margin:0px">The last element corresponds to the ellipsoid height, i.e., 0 m high above </div><div style="margin:0px">the model ellipsoid (not the actual surface). The first element corresponds to </div><div style="margin:0px">the radar resolution cell about 20 km above in slant range along the beam </div><div style="margin:0px">from the footprint on the ellipsoid. The range resolution is 250 m. </div><div style="margin:0px"><br></div><div style="margin:0px">If the radar data is missing, MISSING value of -99.99 is stored. </div><div style="margin:0px">This situation may happen at range bins above 15 km high because JAXA only </div><div style="margin:0px">guarantees the data collection below 15km. </div><div style="margin:0px">(The highest edge of the radar&#39;s receiving window comes down to nearly 15km above </div><div style="margin:0px">the sea level near the equator.) </div><div style="margin:0px"><br></div><div style="margin:0px">The bin number of the lowest range bin that contains valid rain data is </div><div style="margin:0px">(rangeBinNum[][6] - 1 in C) or (rangeBinNum(7,.) - 1 in FORTRAN). </div><div style="margin:0px">Below this level, CLUTTER value of -88.88 is stored.</div><div style="margin:0px"> </div><div style="margin:0px">If the estimated rainfall rate exceeds 300 mm/h, it is reset to 300 mm/h. </div></div><span><font color="#888888"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div> <div><div style="font-family:helvetica,arial;font-size:13px">-- <br>Alan Brammer<br><br></div></div> <div style="color:black"><br>From: <span style="color:black">Dennis Shea</span> <a href="mailto:shea@ucar.edu" target="_blank">&lt;shea@ucar.edu&gt;</a><br>Reply: <span style="color:black">Dennis Shea</span> <a href="mailto:shea@ucar.edu" target="_blank">&lt;shea@ucar.edu&gt;&gt;</a><br>Date: <span style="color:black">November 18, 2014 at 21:02:13</span><br>To: <span style="color:black">Ipsita Putatunda</span> <a href="mailto:ipsita.putatunda@gmail.com" target="_blank">&lt;ipsita.putatunda@gmail.com&gt;&gt;</a><br>Cc: <span style="color:black"><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> Talk</span> <a href="mailto:ncl-talk@ucar.edu" target="_blank">&lt;ncl-talk@ucar.edu&gt;&gt;</a><br>Subject: <span style="color:black"> Re: [ncl-talk] Error with bin_sum <br></span></div><br> </font></span><blockquote type="cite"><span><div><div></div><div><div><div>






<div dir="ltr">
<div>
<div>
<div>[0] There is no need to convert the file to netCDF. NCL reads
the HDF and<br>
    GRIB files the same as netCDF. Please look at
the webinar at:<br>
          
<a href="http://www.ncl.ucar.edu/Training/Webinars/NCL_File_IO/" target="_blank">http://www.ncl.ucar.edu/Training/Webinars/NCL_File_IO/</a><br>

    Webinar #1: Introduction to NCL File
Input/Output: &quot;supported&quot; formats<br>
<br>
[1] The most important rule in data processing is &quot;Look at your
data&quot;<br>
<br>
    I have one day of TRMM 2A25 files.<br>
<br>
    Looking at one file using ncl_filedump<br>
<br>
%&gt; ncl_filedump -v rain 2A25.20140829.95606.7.HDF | less<br>
<br>
[SNIP]<br>
<br>
   dimensions:<br>
      nray = 49<br>
      nscan = 9239  //
unlimited<br>
      ncell1 = 80<br>
[SNIP]<br>
       float Latitude ( nscan, nray
)      &lt;=== 2D<br>
         units
:        degrees<br>
         hdf_name
:     Latitude<br>
<br>
      float Longitude ( nscan, nray
)      &lt;=== 2D<br>
         units
:        degrees<br>
         hdf_name
:     Longitude<br>
[SNIP]<br>
      short rain ( nscan, nray, ncell1
)   &lt;=== type &#39;short&#39;; 3D<br>
         scale_factor
:  100<br>
         scale_factor_err
:        0<br>
         add_offset
:      0<br>
         add_offset_err
:          0<br>
         calibrated_nt
:        22<br>
         units
:        mm/hr<br>
         hdf_name
:     rain<br>
<br>
[SNIP ... the rain values]<br>
      
0      
0      
0      
0      
0      
0      
0      
0      
0       0<br>
      
0      
0      
0      
0      
0      
0      
0      
0      
0      37<br>
      62     
70      53    
115      77    
124     123    
103     168     101<br>
     147     
98   -8888   -8888  
-8888   -8888   -8888  
-8888   -8888   -8888<br>
   -9999   -9999   -9999  
-9999   -9999   -9999  
-9999   -9999   -9999   -9999<br>
   -9999   -9999   -9999  
-9999   -9999   -9999  
-9999   -9999   -9999   -9999<br>
   -9999   -9999   -9999  
-9999      
0      
0      
0      
0      
0       0<br>
<br>
=============<br>
<br>
=============<br>
What do you see?<br>
    Latitude(nscan,nray),
Longitude((nscan,nray)<br>
    rain ( nscan, nray, ncell1 )<br>
<br>
Fatal:bin_sum: z must be the same size as zlat and zlon<br>
fatal:[&quot;Execute.c&quot;:7743]:Execute: Error occurred at or near line 46
in file test2_rai<br>
n.ncl<br>
`<br>
Obviously &#39;z&#39; (rain) is size= nscan*nray*ncell1,<br>
Lat/LOn are  size nscan*nray<br>
That is the reason for the error messge.<br>
<br>
================<br>
<br>
More problematical ... WHat are the -8888, -9999?<br>
There is no information on the file indicating what these
represent.<br>
Really, this is a poorly created file.<br>
<br>
Also, the &#39;scale_factor&#39; is 100. There is no indication of how this
should be used. well, values like 115 if they were multiplied by
100 would yield 11500 mm/hr. This is ridiculous. How about
115/100.0=1,15 mm/hr .... MUCH more realistic.<br>
<br>
Again look at your data!!<br>
<br></div>
Learn to use &#39;conform&#39; and &#39;conform_dims&#39;<br>
<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml" target="_blank">
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml</a><br>

<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml" target="_blank">
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml</a><br>

<br></div>
See attached files.<br>
<br></div>
You will have to change for your data.<br>
<div>
<div><br></div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Nov 18, 2014 at 1:17 AM, Ipsita
Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div> NCL users,<br></div>
     Am trying to get an output file with
gridded data from TRMM 2A25 swath data, using the attached script
(I have converted files from .HDF to .nc) . But am getting error
using bin_sum.<br>
<div><br>
fatal:bin_sum: z must be the same size as zlat and zlon<br>
fatal:[&quot;Execute.c&quot;:7743]:Execute: Error occurred at or near line 46
in file test2_rain.ncl<br>
<br>
Where at line 46 of my script the lon,lat are not equal to
ndtooned(lat2d),ndtooned(lon2d). But am not sure how to handle this
issue.<br></div>
<div>Any help will be appreciated.<br>
<br></div>
<div>Thanks,<br></div>
<div>Ipsita<br></div>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>

<br></blockquote>
</div>
<br></div>


</div></div><hr><span>_______________________________________________
<br>ncl-talk mailing list
<br>List instructions, subscriber options, unsubscribe:
<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
<br></span></div></div></span></blockquote></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>