# [gradsusr] Get maximum value from a Time-Longitude-Latitude plot -

Gmail l.alisios at gmail.com
Fri Sep 6 12:57:28 EDT 2019

```Hello there,

I am using this instruction to place the maximum value of my variable in
space and time, I think this is especially useful for everyone ->
d max(max(max(wind,lon=XXXX,lon=XXXX),lat=XXXX,lat=XXXX),t=1,t=120)

I have applied both 'set gxout stat' or 'set stat on' before, but I need
to "know the coordinate where it finds it", but it ends like this ->

MAXing.  dim = 0, start = 1, end = 189
Data Type = grid
Dimensions = -1 -1
I Dimension = -999 to -999
J Dimension = -999 to -999
Sizes = 1 1 1
Undef value = -9.99e+08
Undef count = 0  Valid count = 1
Min, Max = 74.281 74.281

Now I am trying to achieve the same thing but that paint the value in x
and y and the value of the time where it finds it. I started from a
piece of code that Jennifer put in ->

I do not see that it travels the dimension "lat".
It gives me a bug when it reaches the "say" command.

Non-terminated constant
Error occurred on line 24

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
minlon=-16.7025
maxlon=-16.3453
mint=1
maxt=4

'set lon 'minlon' 'maxlon
'set t 'mint' 'maxt

'd minloc(min(wind,lon='minlon',lon='maxlon'),t='mint',t='maxt')'
yminloc=subwrd(result,4)

'd minloc(min(wind,t='mint',t='maxt'),lon='minlon',lon='maxlon')'
xminloc=subwrd(result,4)

'd maxloc(max(wind,lon='minlon',lon='maxlon'),t='mint',t='maxt')'
ymaxloc=subwrd(result,4)

'd maxloc(max(wind,t='mint',t='maxt'),lon='minlon',lon='maxlon')'
xmaxloc=subwrd(result,4)

say 'minloc is at x='xminloc' and t=‘yminloc
say 'maxloc is at x='xmaxloc' and t='ymaxloc
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -

L. Alvarez
Gargantua Laboratory
Tenerife

```