* Wants the full path "/data" in the template - otherwise, immediate seg fault
'sdfopen uwnd.1979.nc /data/uwnd.%y4.nc 1994'
'sdfopen vwnd.1979.nc /data/vwnd.%y4.nc 1994'
'sdfopen shum.1979.nc /data/shum.%y4.nc 1994'
'sdfopen slp.1979.nc /data/slp.%y4.nc 1994'
'set lat -36 -21'
'set lon 15 34'
'set lev 850'
'd ave(mag(uwnd,vwnd.2),t=1000,t=1465)'
say 'done mag wind'
* Works all the way with this line
'd ave(slp.4(z=1),t=1000,t=1365)'
say 'done slp (one year only)'
* does not finish last command in script with this line included
*'d ave(slp.4(z=1),t=1000,t=1465)'
say 'done slp (straddle year/files)'
'd ave(sum(shum.3,z=1,z=5),t=1000,t=1365)'
say 'done shum'
'd ave(mag(uwnd,vwnd.2)+sum(shum.3,z=1,z=5)-slp.4(z=1),t=1000,t=1365)'
say 'done all'
'quit'
