* script to print vertical wind profile of April-Nov. 1000hPa - 200hPa 2002,1983 and climatology * Basically, this script produces a vertical cross section of zonal wind for 3 user defined time periods * for a single month. In this case, I plotted 1) May climatology from 1979-2007, 2)May 2002, and 3)May 1983. * Of course, you decide what dates are valuable for your specific analysis. * Valuable "functions" in this example below include a) vertical point profiles, b) x and y labels, c) string placement, * and defining a specific color for each profile line. * DISCLAIMER: I am no expert, but can help beginners! * re-initialize GrADS to clear saved variables 'reinit' * open specific dataset given pathfile 'sdfopen c:\testdata\netcdf\uwnd.mon.mean.nc' * determines how many z-levels to include and what geographic location to plot along with line thickness *************** 'set z 1 11' 'set lat 18' 'set lon -78.75' 'set cthick 7' 'set grads off' *************** *sets months to include May Climo, May 2002, and May 1983 * In order to do this, you must know the time steps of your dataset. In this case, t=377 is May 1979 while t=653 is May 2002 * The Climatology profile averages every 12th time step from the 377 (may 1979) to 713 (may 2007) 'define may =ave(uwnd,t=377,t=713,12)' 'define 2002=ave(uwnd,t=653,t=653)' 'define 1983=ave(uwnd,t=425,t=425)' * plot May 2002 in GREEN 'set ccolor 3' 'd ave(uwnd,t=653,t=653)' * plot May 1983 in YELLOW 'set ccolor 7' 'd ave(uwnd,t=425,t=425)' * plot May climotolgy in BLACK 'set ccolor 1' 'd may' * assign proper x and y labels along with plot title 'draw xlab u-Wind Speed' 'draw ylab pressure level' 'draw title May vertical u-wind profiles Jamaica\2002 1983 18N , 78.75W' * places the legend at specific location (on GrADS virtual page coordinates)with specific color and defines string style 'set string 1 l 9 0' 'draw string 8.5 4 May 1979-2007' 'set string 3 l 9 0' 'draw string 8.5 3.7 May MSD 2002' 'set string 7 l 9 0' 'draw string 8.5 3.4 May MSD 1983' * print the white background GIF image with the desired file name in the filepath location 'printim c:\testdata\msd_images\uwnd_profile_2002_1983_may.jpg gif x800 x600 white'