* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * shp_demo3.gs * * Demonstrates the use of shapefiles in GrADS * Written by Jennifer Adams, June 2010 * function main() * N.B. Don't forget to change the /path/dataset name for your own data 'use /data/grib2/radar/radar.ctl' 'set display color white' 'clear' getcols() * Draw a blank plot to establish dimension and scaling environment 'set parea 0.5 10 0 8.5' 'set lon -79.59 -74.91' 'set lat 37.1 39.8' 'set grid off' 'set mpdraw off' 'set grads off' 'set gxout contour' 'set xlab off' 'set ylab off' 'set clevs 0' 'd base+1000000' * Fill in all land areas with grey 'set line 99 1 1' 'set shpopts 99' 'draw shp statesp020' * Draw the radar data 'set gxout grfill' 'set ccols 20 21 22 23 24 25 26 27 28 29 30 31 32 33' 'set clevs 5 10 15 20 25 30 35 40 45 50 55 60 65 ' 'd base' 'cbarm 1 1' * Draw the county boundaries thin 'set shpopts -1' 'set line 31 1 1' 'draw shp countyp020' * Draw the state boundaries thicker 'set line 31 1 6' 'draw shp statesp020' * draw the roads: thickest white with thin black overlay 'set line 0 1 12' 'draw shp roads' 'set line 1 1 1' 'draw shp roads' 'draw title Composite Radar Base Reflectivity in dBZ for 12z 6 February 2010' function getcols() 'set rgb 99 140 140 116' 'set rgb 20 180 200 255' 'set rgb 21 95 135 255' 'set rgb 22 20 70 230' 'set rgb 23 110 245 75' 'set rgb 24 0 195 0' 'set rgb 25 0 115 0' 'set rgb 26 255 255 0' 'set rgb 27 255 180 48' 'set rgb 28 250 125 0' 'set rgb 29 230 45 0' 'set rgb 30 175 0 0' 'set rgb 31 105 0 0' 'set rgb 32 250 0 200' 'set rgb 33 155 0 250'