;************************************************* ; 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 websiteprefix = "http://www2.mmm.ucar.edu/imagearchive1/satellite/IR/alb/20120705/satellite_ir_alb_20120705" website_meat = "satellite_ir_alb_20120705" website_suffix = ".jpg" minute = 0 hour = 0 count = 47 do hour=0, 12 hourweb = sprinti("%0.2i",hour) do minute = 10,40, 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+ " sat_ne"+count+".jpg") count = count + 1 delete(minweb) delete(website) end do delete(hourweb) end do ;alist = [/date1,rep_hit+rep_miss,rep_hit,rep_miss,PoD,FAR,Threat,hits,FA,Miss,NEslight_presents,outpresents/] ;write_table("/nfs/lb11/mvaughan/Research/Scores/"+scorefile, "a", alist, "%s%4d%d%d%6.3f%3.3f%3.3f%.0f%.0f%.0f%s%s") end