! WindTstring.jnl ! ! Ferret script to plot wind vectors over temperature or salinity contours for ! hourly mooring data. ! ! Mike McCann MBARI 26 September 2006 (originally written) ! Script automatically generated by combineAll.pl on Tue Feb 28 13:22:11 2012 ! Description: Plot wind vectors over temperature/salinity contours from mooring data cancel mode journal sp rm -f ferret.jnl DEFINE SYMBOL PVAR = SEA_WATER_SALINITY_HR ! Set data set and time period (region) USE "http://dods.mbari.org/opendap/data/ssdsdata/deployments/m1/201010/OS_M1_20101027hourly_CMSTV.nc" SET REGION/T="29-Jan-2012 21:22":"28-Feb-2012 21:22" DEFINE VIEWPORT /axes /xlimits=0.1,0.8 /ylimits=0.15,0.65 TV DEFINE VIEWPORT /axes /xlimits=0.1,0.8 /ylimits=0.67,0.89 WV ppl SHASET RESET ppl /reset ! ! Pick the proper variables ! let uwnd = EASTWARD_WIND_HR let vwnd = NORTHWARD_WIND_HR ! ! -- Plot variable contours ! SET VIEWPORT TV ppl axset 1,1 ! upper and lower x axes LET plot_var = ($PVAR) ! Hack to remove long_name_mod from plot label SET VAR/TITLE="`($PVAR),return=title`"/units="`($PVAR),return=units`" plot_var ! Use free-range contour limits with no labels and colorbar CONTOUR/FILL/NOLABEL/SET_UP/LEVELS=60V plot_var ! Alternate contouring methods !CONTOUR/FILL/LINE/COLOR=1/SIGDIG=3/SIZE=0.15/SPACING=9/SET_UP/LEVELS=(33,35,0.2)/VLIMITS=0:300 plot_var !CONTOUR/FILL/LINE/COLOR=1/SIGDIG=3/SIZE=0.15/SPACING=9/SET_UP/LEVELS=(33,35,0.2) plot_var ppl shakey 1 ! Remove labels on top go unlabel 1 go unlabel 2 go unlabel 3 go unlabel 4 go unlabel 5 go unlabel 6 go unlabel 7 go unlabel 8 go unlabel 9 go unlabel 10 go unlabel 11 go unlabel 12 ppl title ! no title under plot ppl ylab Depth (m) ppl fill ! Put today's date on lower right let xpl = -1*MIN(1,`($ppl$xorg)`) let ypl = -1*MIN(1,`($ppl$yorg)`) label/nouser `($ppl$xlen)/2`, `ypl`, 0, 0, 0.15, "Time (GMT)" label/nouser `($ppl$xlen)`, `ypl`, 1, 0, 0.08, "Created: Tue Feb 28 13:22:11 2012" ! ! -- Plot wind vectors with no x axis ! SET VIEWPORT WV PLOT/SET/VLIMITS=-10:10 uwnd,vwnd ! Remove the unwanted labels, and also the DODS URL go unlabel 1 go unlabel 2 go unlabel 3 go unlabel 6 go unlabel 8 go unlabel 9 ! Plot title on top, replace with label line below go unlabel 10 go unlabel 11 go unlabel 12 ppl title ! no title under plot ppl axset 1,0,1,0 ! no lower or right axes ppl window, off ! plot outside boundaries ppl ylab Wind Speed (m/s) ppl plotuv ! Label the top of the plot label/nouser 4.46, 2.75, 0, 0, 0.180 "Hourly gridded M1 Wind Velocity and Salinity" ! Clean up all the labels for next use go unlabel 1 go unlabel 2 go unlabel 3 go unlabel 4 go unlabel 5 go unlabel 6 go unlabel 7 go unlabel 8 go unlabel 9 go unlabel 10 go unlabel 11 go unlabel 12 ! Remove the old and then save the new image to a gif file (specify your own file if you are running this script locally) SPAWN "/bin/rm -f /mbari/ssdsdata/deployments/m1/201010/gifs/OS_M1_20101027hourly_CMSTV_last30_nc/wind_SEA_WATER_SALINITY_HR_last30.gif" FRAME/FILE="/mbari/ssdsdata/deployments/m1/201010/gifs/OS_M1_20101027hourly_CMSTV_last30_nc/wind_SEA_WATER_SALINITY_HR_last30.gif" QUIT