[gradsusr] Find maximum at a point over a time period.
Davide Sacchetti
davide.sacchetti at arpal.gov.it
Wed Oct 17 05:41:12 EDT 2012
suppose you fixed X and Y at your location
suppose you have 41 time steps (actually your are much more but it's the
same)
first question
ga-> d max(t2,t=1,t=41)
MAXing. dim = 3, start = 1, end = 41
Result value = 295.123
so you got max value
ga-> d maxloc(t2,t=1,t=41)
MAXLOCing. dim = 3, start = 1, end = 41
Result value = 19
so you got when: maximum occured at t = 19
second question
suppose you want to find out how many times your T exceeded 292K (eg.: 5
times)
* maskout(t2,t2-292) shows you only values > 292
* const(maskout(t2,t2-292),1) shows you '1' only when values > 292
* const(const(maskout(t2,t2-292),1),0,-u) shows you '1' only when
values > 292, 0 otherwise
* sum(const(const(maskout(t2,t2-292),1),0,-u),t=1,t=41) is your
answer
ga-> d sum(const(const(maskout(t2,t2-292),1),0,-u),t=1,t=41)
SUMing. dim = 3, start = 1, end = 41
Result value = 5
it should help ...
bye bye
Davide
On Wed, 2012-10-17 at 12:21 +0400, Marsh, Kieren wrote:
> Dear GrADS users
>
>
>
> I have an hourly data set that spans about 7 months and I want to find
> the absolute maximum temperature at a given point and I also want to
> find out when that occurred.
>
>
>
> Also is it possible to find the number of times the temperature
> exceeds a given value at a point and to find the corresponding times
> for each exceedence?
>
>
>
> Can anyone, who has a better understanding of the max() function help
> me with this? I know the ordering of the nesting matters, but I’m not
> sure exactly how.
>
>
>
> Thanks in advance.
>
>
>
> Kieren
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535 fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it web: www.meteoliguria.it
More information about the gradsusr
mailing list