[ncl-talk] Error with bin_sum

Ipsita Putatunda ipsita.putatunda at gmail.com
Mon Nov 24 03:57:36 MST 2014


Dear NCL users,
   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?

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?

Any help will be appreciated.

Thanks,
Ipsita

On Sun, Nov 23, 2014 at 7:42 PM, Ipsita Putatunda <
ipsita.putatunda at gmail.com> wrote:

> Thank you Dennis and Alan for your support.
>
> Thanks,
> Ipsita
>
> On Wed, Nov 19, 2014 at 10:06 PM, Alan Brammer <abrammer at albany.edu>
> wrote:
>
>> From a 2A25 perspective and this goes along with what Dennis said,  know
>> your data.  Extensive Documentation here:
>> http://www.eorc.jaxa.jp/TRMM/documents/PR_algorithm_product_information/pr_manual/PR_Instruction_Manual_V7_L1.pdf
>>
>> 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.)
>> And details about the two types of missing data values.  They leave out
>> the along track dimension btw.
>>
>> For the archive in-case that link dies.
>>  I’m in now way affiliated with this data, have just used it and had the
>> documentation on hand.
>>
>>
>> rain
>> float32 rain[49][80];
>> REAL*4 rain(80,49)
>>
>> Internally this quantity is stored as
>> int16 rain_scale[49][80] after multiplied (scaled) by 100.
>> rainfall rate in mm/h
>>
>> 49 elements in the 2-D array correspond to the angle bins and 80 elements
>> (first argument in FORTRAN convention) in the 2-D array correspond to the
>> range
>> bins.
>>
>> If the estimated Z-factor is below 0 dBZ, the rain rate is always set to
>> 0.
>> If the input radar reflectivity factor Zm is below the noise level,
>> the corresponding rain estimate is set to 0. This procedure does not
>> cause
>> any serious problem except when the measured Zm becomes smaller than the
>> noise
>> level by rain attenuation. In such a case, even if some heavy rain exists
>> near
>> the surface,the number in this variable is 0.
>>
>> To know whether such low radar reflectivity factors are caused by large
>> attenuation or not, look at the forth bit of 'reliab' and the forth bit
>> of
>> rainFlag.
>>
>> 80 range bins are filled with data from top to bottom in height.
>> The last element corresponds to the ellipsoid height, i.e., 0 m high
>> above
>> the model ellipsoid (not the actual surface). The first element
>> corresponds to
>> the radar resolution cell about 20 km above in slant range along the beam
>> from the footprint on the ellipsoid. The range resolution is 250 m.
>>
>> If the radar data is missing, MISSING value of -99.99 is stored.
>> This situation may happen at range bins above 15 km high because JAXA
>> only
>> guarantees the data collection below 15km.
>> (The highest edge of the radar's receiving window comes down to nearly
>> 15km above
>> the sea level near the equator.)
>>
>> The bin number of the lowest range bin that contains valid rain data is
>> (rangeBinNum[][6] - 1 in C) or (rangeBinNum(7,.) - 1 in FORTRAN).
>> Below this level, CLUTTER value of -88.88 is stored.
>>
>> If the estimated rainfall rate exceeds 300 mm/h, it is reset to 300 mm/h.
>>
>>
>> --
>> Alan Brammer
>>
>>
>> From: Dennis Shea <shea at ucar.edu> <shea at ucar.edu>
>> Reply: Dennis Shea <shea at ucar.edu>> <shea at ucar.edu>
>> Date: November 18, 2014 at 21:02:13
>> To: Ipsita Putatunda <ipsita.putatunda at gmail.com>>
>> <ipsita.putatunda at gmail.com>
>> Cc: ncl-talk at ucar.edu Talk <ncl-talk at ucar.edu>> <ncl-talk at ucar.edu>
>> Subject:  Re: [ncl-talk] Error with bin_sum
>>
>>   [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
>>>
>>>
>> ------------------------------
>> _______________________________________________
>> 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/20141124/b8465a8f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipsita1.ncl
Type: application/octet-stream
Size: 3536 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141124/b8465a8f/attachment.obj 


More information about the ncl-talk mailing list