max function

Charles Seman Charles.Seman at NOAA.GOV
Fri Nov 18 16:40:50 EST 2005


Hi Ben,

For a time series of domain max values, please try something like this:

'set lon 0'
'set lat 0'
'set z 1'
'set t 1 't_8yr   * "t_8yr" is the time index for 8 years...
'define precmax1 = max(max(precip,lon=0,lon=360),lat=-90,lat=90)'
'd precmax1'

For a map of max values over a time period, please try something like this:

'set lon 0 360'
'set lat -90 90'
'set z 1'
'set t 1'
'define precmax2 = max(precip,t=1,t='t_8yr')'   * "t_8yr" is the time
index for 8 years...
'd precmax2'

I hope this helps,
Chuck

Ben Burford wrote:

>        Hello,
>
>I'm a beginner at Grads.  I want to find the max value of my data so I tried
> the max function defined in the documentation:
>d max(max(precip,lon=0,lon=360),lat=-90,lat=90)
>
>But it produces only 1 value for the entire data set.
>
>I have a global gridded 1 degree by 1 degree daily data (for an 8 year perio
>d) netcdf file.  I open the file with sdfopen.  I want to find the maximum v
>alue at each individual grid cell and display a global map of those (maximum
>) values.  Can you tell me how to do this?
>
>Also, I want to write these values out to a file to save and use later.
>
>Finally, I'm runnings Grads under Windows XP and the file I'm opening is 360
> MB.  After I perform the first Grads function my computer becomes incredibl
>y slow (for everything, Msword, Powerpoint, Grads, whatever).  Is there some
>thing I can set (e.g a memory allocation for Grads) that will prevent this?
>
>Thanks very much in advance.
>
>Ben
>
>

--

********************************************************************
 Charles Seman                                charles.seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."



More information about the gradsusr mailing list