<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>