[gradsusr] Help with average

Jason M. Warren jason at solargrafix.com
Mon Nov 29 23:43:44 EST 2021


Hello,

I have a file with monthly height data dating back to 1948.  I would 
like to create monthly averages of the data from 1981 to 2010 to create 
anomaly maps.

I have been trying to create a script that will create the averages 
using ave.  Then subtract data from another height map I have to display 
the height anomalies. Here is what I have...

'clear'
'set datawarn off'

'sdfopen C:\OpenGrADS-2.2\data\hgt.mon.mean.nc'

'sdfopen C:\OpenGrADS-2.2\data\GFSGPA.nc'

'set dfile 1'
'define hgt = hgt'

'set dfile 2'
'set t 1 80'
'define gpa = gpa'

count = 1
while (count <= 80)

'set t 'count

'define ave(hgt,t=397,t=757,12)'
'modify hgt seasonal'

'd hgt-gpa'

fmt='%02.0f'
cc=math_format(fmt,count)

'gxprint C:\models\TEST\GPA-'cc'.png x1024 y768'

count = count + 1
'c'
endwhile


What I get when I run this script is the following...

Error in gagchk: axis sizes are not the same
Operation error:  Incompatable grids
   Error ocurred at column 11
DISPLAY error:  Invalid expression
   Expression = gpa-height
Error in xcbar.gs: No shading information
DEFINE error: Failed to find '=' after parsing the defined variable name
               The name may be too long or contain non-alphanumeric 
characters
Defined variable is now climatological

I am very confused, and I would appreciate any help.

Thanks,

Jason Warren



More information about the gradsusr mailing list