[gradsusr] probability distribution

mehwish ramzan mehwish.ramzan at gmail.com
Wed Sep 3 09:52:15 EDT 2014


Dear Luis,

Thank you for your reply. I have tried your suggestions but both of these
tries gave me error message as follows;

Try 1:

a-> open r_pgb.ctl
Scanning description file:  r_pgb.ctl
Data file r_pgb.%y4%m2%d2.avrg.grib is open as file 1
LON set to 7.756 128.125
LAT set to -20.826 50.163
LEV set to 1000 1000
Time values set: 1980:1:1:0 1980:1:1:0
ga-> set time 1jan1980 25dec1985
Time values set: 1980:1:1:0 1985:12:25:0
ga-> hist t pratesfc*60*60*24 preciphist -2 2 0.25
[hist info] Temporary directory is set to /tmp/bGASL-mehwish
[hist info] Process ID is 12355
ga-> set lev -2 2
LEV set to -2 2
ga-> d preciphist
Operation error:  Invalid dimension environment
  Too many varying dimensions

-----------------------------------------------------------------------
Try 2:

ga-> open r_pgb.ctl
Scanning description file:  r_pgb.ctl
Data file r_pgb.%y4%m2%d2.avrg.grib is open as file 1
LON set to 7.756 128.125
LAT set to -20.826 50.163
LEV set to 1000 1000
Time values set: 1980:1:1:0 1980:1:1:0
ga-> set lon 60 80
LON set to 60 80
ga-> set lat 20 40
LAT set to 20 40
ga-> hist xy pratesfc*60*60*24 preciphist -2 2 0.25
[hist info] Temporary directory is set to /tmp/bGASL-mehwish
[hist info] Process ID is 12355
ga-> set lon 7.756
LON set to 7.756 7.756
ga-> set lat -20.826
LAT set to -20.826 -20.826
ga-> set lev -2 2
LEV set to -2 2
ga-> set xyrev on
ga-> d preciphist
Data Request Error: Invalid grid coordinates
  World coordinates convert to non-integer grid coordinates
    Variable = preciphist  Dimension = 0
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = preciphist


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

Can you guide me which step i am doing wrong? or any other way to calculate
daily extreme precipitation events for 26 years data.

I will be really grateful.



With Best Regards,

Mehwish


On Tue, Sep 2, 2014 at 8:40 PM, Luis Blacutt <luis.blacutt at gmail.com> wrote:

> Dear Mehwish,
>
> Take a look at this web page, there you will find the histogram script
> which can be tailored to the bins of your preference
>
> http://www.atmos.umd.edu/~bguan/grads/GrADS_Scripts.html
>
> Best regards
> Luis
>
>
> On Tue, Sep 2, 2014 at 8:17 AM, mehwish ramzan <mehwish.ramzan at gmail.com>
> wrote:
>
>> Dear GrADS users,
>>
>> I want to calculate the probability of daily extreme precipitationby
>> classifying  multiple precipitation bins (e.g. 0-10, 10-20, 20-30, onwards)
>> for 26 years of model output. And draw histogram for these bin against
>> probability (%).
>>
>> I looked for grads scripts  but still didn't get any success.
>>
>> As an alternative, i tried to use the "const" function of GrADS to see
>> the number of days which exceeded 10mm/day for example.
>> ==================================================
>>
>> 'reinit'
>> 'open r_pgb.ctl'
>> 'set display color white'
>> 'c'
>> 'set lon 50 80'
>> 'set lat 20 40'
>> 'set time 1jan1980 25dec1980'
>> 'define p1= const(const(maskout(prate*60*60*24, prate*60*60*24 -
>> 10),1),0,-u)'
>> 'set x 1'
>> 'set y 1'
>> 'd tloop(aave(p1, lon=50, lon=80, lat=20, lat=40))'
>>
>> ========================================================
>>
>> It worked fine and i get the output as well, but i am not sure of the
>> units. (please see attached figure. Should i  multiply p1 by 100 to get
>> percentage? ).
>>
>> I would really appreciate if someone guide me, regarding making
>> precipitation bins in grad as it is my first priority.
>>
>>
>> Thank you
>>
>> With Best Regards,
>>
>> Mehwish
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140903/33296077/attachment.html 


More information about the gradsusr mailing list