****************************************************** ****************************************************** ** ** ** WELCOME TO TEDDY's GrADS SCRIPTS ** ** ** ** I AM NO EXPERT, BUT I CAN HELP BEGINNERS ** ** ** ****************************************************** ****************************************************** **************************************************************************** * * * This example shows how to create climatology fields from monthly * * data files. In this case I use monthly NCEP Reanalysis for zonal winds * * and sea level pressure to create JULY climatology from 1979-2007. Then I * * plot both fields using a shaded (with color bar) and contour plot. In * * addition, I apply a mask for the sea level pressure to only contour * * values above 1018mb. Please see details below for each step. * * Questions and comments can be sent to teddyallen@yahoo.com * * * **************************************************************************** 'reinit' 'sdfopen c:\testdata\netcdf\uwnd.mon.mean.nc' * BELOW LINES state: * 1) set the zonal wind level to the 925mb level * 2) set the geographic dimensions to the specified lat and lon * 3) forces GrADS to output a shaded plot 'set lev 925' 'set lat 5 45' 'set lon -110 -20' 'set grads off' 'set gxout shaded' 'set map 1 1 20' 'set clevs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14' 'set rbrange 0 16' 'set csmooth on' * BELOW LINE set months to include only July from 1979-2007 * t = 379 is July 1979 and t = 715 is July 2007 * I want every July and NOT every month, so the 12 tells GrADS * to select every 12 months, or every July since I am starting on * a July. If I wanted August climatology, then I would have chosen * t=380 to t=716, but at the same 12th time step. 'd ave (uwnd, t=379, t=715, 12)' *'define umean=ave(uwnd,t=379,t=715,12)' * command to draw a colorbar below 'run cbar' *close the zonal wind file 'close c:\testdata\netcdf\uwnd.mon.mean.nc' * open sea level pressure file 'sdfopen c:\testdata\netcdf\slp.mon.mean.nc' 'set lev 0' 'set lat 5 45' 'set lon -110 -20' 'set grads off' 'set gxout contour' 'set ccolor 0' 'set cthick 19' 'set black 1010 1016' 'set csmooth on' 'd ave (slp.2, t=379, t=715, 12)' *'draw title Average SLP CLLJ July 1979-2007' 'printim c:\testdata\website.jpg gif x800 x600 white' 'disable print'