[ncl-talk] Error with bin_sum

Dennis Shea shea at ucar.edu
Tue Nov 18 19:02:01 MST 2014


[0] There is no need to convert the file to netCDF. NCL reads the HDF and
    GRIB files the same as netCDF. Please look at the webinar at:
           http://www.ncl.ucar.edu/Training/Webinars/NCL_File_IO/
    Webinar #1: Introduction to NCL File Input/Output: "supported" formats

[1] The most important rule in data processing is "Look at your data"

    I have one day of TRMM 2A25 files.

    Looking at one file using ncl_filedump

%> ncl_filedump -v rain 2A25.20140829.95606.7.HDF | less

[SNIP]

   dimensions:
      nray = 49
      nscan = 9239  // unlimited
      ncell1 = 80
[SNIP]
       float Latitude ( nscan, nray )      <=== 2D
         units :        degrees
         hdf_name :     Latitude

      float Longitude ( nscan, nray )      <=== 2D
         units :        degrees
         hdf_name :     Longitude
[SNIP]
      short rain ( nscan, nray, ncell1 )   <=== type 'short'; 3D
         scale_factor :  100
         scale_factor_err :        0
         add_offset :      0
         add_offset_err :          0
         calibrated_nt :        22
         units :        mm/hr
         hdf_name :     rain

[SNIP ... the rain values]
       0       0       0       0       0       0       0       0
0       0
       0       0       0       0       0       0       0       0
0      37
      62      70      53     115      77     124     123     103
168     101
     147      98   -8888   -8888   -8888   -8888   -8888   -8888   -8888
-8888
   -9999   -9999   -9999   -9999   -9999   -9999   -9999   -9999   -9999
-9999
   -9999   -9999   -9999   -9999   -9999   -9999   -9999   -9999   -9999
-9999
   -9999   -9999   -9999   -9999       0       0       0       0
0       0

=============

=============
What do you see?
    Latitude(nscan,nray), Longitude((nscan,nray)
    rain ( nscan, nray, ncell1 )

Fatal:bin_sum: z must be the same size as zlat and zlon
fatal:["Execute.c":7743]:Execute: Error occurred at or near line 46 in file
test2_rai
n.ncl
`
Obviously 'z' (rain) is size= nscan*nray*ncell1,
Lat/LOn are  size nscan*nray
That is the reason for the error messge.

================

More problematical ... WHat are the -8888, -9999?
There is no information on the file indicating what these represent.
Really, this is a poorly created file.

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.

Again look at your data!!

Learn to use 'conform' and 'conform_dims'
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml

See attached files.

You will have to change for your data.


On Tue, Nov 18, 2014 at 1:17 AM, Ipsita Putatunda <
ipsita.putatunda at gmail.com> wrote:

>  NCL users,
>      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.
>
> fatal:bin_sum: z must be the same size as zlat and zlon
> fatal:["Execute.c":7743]:Execute: Error occurred at or near line 46 in
> file test2_rain.ncl
>
> 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.
> Any help will be appreciated.
>
> Thanks,
> Ipsita
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141118/a1510fd9/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2A.png
Type: image/png
Size: 119935 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141118/a1510fd9/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipshita.ncl
Type: application/octet-stream
Size: 3962 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141118/a1510fd9/attachment.obj 


More information about the ncl-talk mailing list