[gradsusr] monthly calculation from daily data

Rupak Rajbhandari rupak.rajbhandari at gmail.com
Mon Nov 2 20:54:01 EST 2015


Ramchandra,

To answer your first question, you will need to develop a script to
calculate each months total for every year. Hard coding would be something
like;

define jan=sum(precip,t=1,t=31)
define feb=sum(precip,t=32,t=59)
define mar=sum(precip,t=60,t=90)
....

Next year data i.e. 1952 jan 1st starts at t=366 and continues so on (you
must have already known). Now if you can put this kind of commands in a
loop then you have it. Eventually, if you want to build a climatology from
the 57 year of data, I suggest you create monthly binary file and work on
it. Daily rainfall data is useful only to study the extremes such as your
next two questions.

Your second question about the number of rainy days - I presume number of
rainy days in a year. Again you need a separate program which counts days
when condition is fulfilled. In my case, I wrote o short program in Fortran
which calculates number of days over each grid, then I used GrADS to read
this file to display the number of rainy days.

Third question;
In order to calculate percentile, first you need to SORT the data and find
the values for different percentile. Once you have the threshold value, you
can follow the same procedure for finding number of rainy days and work on.

So the way forward is not that simple. For more queries, you can contact me
at my office.

-rupak




On Sun, Nov 1, 2015 at 11:07 PM, Ramchandra Karki <rammetro at hotmail.com>
wrote:

> Hi all
> I am beginner to grads and I want to calculate the following from these
> data set
> i have *daily *Aphrodite data set  with control file in this format
>
> dset F:\005deg\APHRO_NPL_005deg_V1003R1.%y4
> *
> undef -99.9
> options little_endian template
> title Averaged Daily Precipitation Value
> *
> xdef   190 linear   79.525 0.05
> ydef   100 linear   26.025 0.05
> zdef     1 levels 1
> tdef 20819 linear 01jan1951 1dy
> *
> vars 3
> precip 1 00 daily precipitation analysis (mm/day)
> flgcnt 1 00 if 1, offline (individual country's) gauge(s) exists
> flggts 1 00 if 1, online (GTS-based) gauge(s) exists
> endvars
>
>
>    1. *how can i calculate the monthly rainfall total for each year from
>    1951 to 2009 using some loops or easier way*
>    2. how can i get rainy days (count of days >1mm rainfall)
>    3. how can i get percentile 99 for 1971 to 2000 and then days with
>    count > 99 percentile
>
>
>
>
>
>
> *RegardsRamchandra KarkiDepartment of Hydrology and Meteorology, Nepal*
>
> _______________________________________________
> 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/20151103/2db07e89/attachment-0001.html 


More information about the gradsusr mailing list