;************************************************* ; shapefiles_2.ncl ; ; Concepts illustrated: ; - Reading shapefiles ; - Plotting data from shapefiles ; - Drawing selected data based upon a database query of the shapefile ; - Using shapefile data to plot history of F5 tornadoes in the U.S. ; ;************************************************* ; ; Simple example of how to draw selected geometry from a shapefile, ; based upon properties of an associated non-spatial variable. ; ; This example draws the historical incidents of F5-class tornadoes in ; the United States. ; ; The "states.shp" and "tornadx020.shp" shapefiles are from the ; National Atlas (http://www.nationalatlas.gov/) ; ; You must also have the associated ".dbf" and ".shx" files for this ; example to run. ;************************************************* load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" begin date = 20100923 websiteprefix = "http://www2.mmm.ucar.edu/imagearchive1/RadarComposites/national/"+date+"/national_"+date website_meat = "national_"+date website_suffix = ".gif" minute = 0 hour = 0 count = 48 do hour=0, 6 hourweb = sprinti("%0.2i",hour) do minute = 0,30, 30 minweb = sprinti("%0.2i",minute) website = str_get_dq()+websiteprefix+hourweb+minweb+website_suffix+str_get_dq() filerad = website_meat+hourweb+minweb+website_suffix ;print(website) system("wget " +website) system("mv " +filerad+ " rad_nat"+count+".jpg") count = count + 1 delete(minweb) delete(website) end do delete(hourweb) end do end