<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" 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">http://www.eorc.jaxa.jp/TRMM/documents/PR_algorithm_product_information/pr_manual/PR_Instruction_Manual_V7_L1.pdf</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" 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 id="bloop_customfont" 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 id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" 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 id="bloop_customfont" 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 id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"> </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="margin: 0px; font-size: 13px; font-family: Helvetica, Arial; color: rgb(0, 0, 0);"><div id="bloop_customfont" style="margin: 0px;">rain </div><div id="bloop_customfont" style="margin: 0px;">float32 rain[49][80]; </div><div id="bloop_customfont" style="margin: 0px;">REAL*4 rain(80,49) </div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Internally this quantity is stored as </div><div id="bloop_customfont" style="margin: 0px;">int16 rain_scale[49][80] after multiplied (scaled) by 100. </div><div id="bloop_customfont" style="margin: 0px;">rainfall rate in mm/h </div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">49 elements in the 2-D array correspond to the angle bins and 80 elements </div><div id="bloop_customfont" style="margin: 0px;">(first argument in FORTRAN convention) in the 2-D array correspond to the range </div><div id="bloop_customfont" style="margin: 0px;">bins. </div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">If the estimated Z-factor is below 0 dBZ, the rain rate is always set to 0. </div><div id="bloop_customfont" style="margin: 0px;">If the input radar reflectivity factor Zm is below the noise level, </div><div id="bloop_customfont" style="margin: 0px;">the corresponding rain estimate is set to 0. This procedure does not cause </div><div id="bloop_customfont" style="margin: 0px;">any serious problem except when the measured Zm becomes smaller than the noise </div><div id="bloop_customfont" style="margin: 0px;">level by rain attenuation. In such a case, even if some heavy rain exists near </div><div id="bloop_customfont" style="margin: 0px;">the surface,the number in this variable is 0. </div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">To know whether such low radar reflectivity factors are caused by large </div><div id="bloop_customfont" style="margin: 0px;">attenuation or not, look at the forth bit of 'reliab' and the forth bit of </div><div id="bloop_customfont" style="margin: 0px;">rainFlag.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">80 range bins are filled with data from top to bottom in height. </div><div id="bloop_customfont" style="margin: 0px;">The last element corresponds to the ellipsoid height, i.e., 0 m high above </div><div id="bloop_customfont" style="margin: 0px;">the model ellipsoid (not the actual surface). The first element corresponds to </div><div id="bloop_customfont" style="margin: 0px;">the radar resolution cell about 20 km above in slant range along the beam </div><div id="bloop_customfont" style="margin: 0px;">from the footprint on the ellipsoid. The range resolution is 250 m. </div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">If the radar data is missing, MISSING value of -99.99 is stored. </div><div id="bloop_customfont" style="margin: 0px;">This situation may happen at range bins above 15 km high because JAXA only </div><div id="bloop_customfont" style="margin: 0px;">guarantees the data collection below 15km. </div><div id="bloop_customfont" style="margin: 0px;">(The highest edge of the radar's receiving window comes down to nearly 15km above </div><div id="bloop_customfont" style="margin: 0px;">the sea level near the equator.) </div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">The bin number of the lowest range bin that contains valid rain data is </div><div id="bloop_customfont" style="margin: 0px;">(rangeBinNum[][6] - 1 in C) or (rangeBinNum(7,.) - 1 in FORTRAN). </div><div id="bloop_customfont" style="margin: 0px;">Below this level, CLUTTER value of -88.88 is stored.</div><div id="bloop_customfont" style="margin: 0px;"> </div><div id="bloop_customfont" style="margin: 0px;">If the estimated rainfall rate exceeds 300 mm/h, it is reset to 300 mm/h. </div></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div> <div class="bloop_sign" id="bloop_sign_1416414446800275968"><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"><shea@ucar.edu></a><br>Reply: <span style="color:black">Dennis Shea</span> <a href="mailto:shea@ucar.edu"><shea@ucar.edu>></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"><ipsita.putatunda@gmail.com>></a><br>Cc: <span style="color:black">ncl-talk@ucar.edu Talk</span> <a href="mailto:ncl-talk@ucar.edu"><ncl-talk@ucar.edu>></a><br>Subject: <span style="color:black"> Re: [ncl-talk] Error with bin_sum <br></span></div><br> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<title></title>
<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/">http://www.ncl.ucar.edu/Training/Webinars/NCL_File_IO/</a><br>
Webinar #1: Introduction to NCL File
Input/Output: "supported" formats<br>
<br>
[1] The most important rule in data processing is "Look at your
data"<br>
<br>
I have one day of TRMM 2A25 files.<br>
<br>
Looking at one file using ncl_filedump<br>
<br>
%> 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
) <=== 2D<br>
units
: degrees<br>
hdf_name
: Latitude<br>
<br>
float Longitude ( nscan, nray
) <=== 2D<br>
units
: degrees<br>
hdf_name
: Longitude<br>
[SNIP]<br>
short rain ( nscan, nray, ncell1
) <=== type 'short'; 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:["Execute.c":7743]:Execute: Error occurred at or near line 46
in file test2_rai<br>
n.ncl<br>
`<br>
Obviously 'z' (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 'scale_factor' 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 'conform' and 'conform_dims'<br>
<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml">
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">
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"><<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</a>></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:["Execute.c":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>
<hr>_______________________________________________
<br>ncl-talk mailing list
<br>List instructions, subscriber options, unsubscribe:
<br>http://mailman.ucar.edu/mailman/listinfo/ncl-talk
<br></div></div></span></blockquote></body></html>