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/contrib/calendar_decode2.ncl" begin ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; f=addfile("/afs/umich.edu/class/aoss605/data/data.60/uwnd.10m.2000.nc", "r") g=addfile("/afs/umich.edu/class/aoss605/data/data.60/vwnd.10m.2000.nc", "r") uwind=f->uwnd(:,:,:) unew=uwind*uwind@scale_factor+uwind@add_offset vwind=g->vwnd(:,:,:) vnew=vwind*vwind@scale_factor+vwind@add_offset wind=sqrt((unew*unew)+(vnew*vnew)) lat2d= f->lat lon2d= f->lon printVarSummary(lat2d) wind!0 = "time" wind!1 = "lat" wind!2 = "lon" wind@lat = lat2d wind@lon = lon2d time=f->time results=calendar_decode2(time,0) printVarSummary(results) dim1 = dimsizes(lat2d) nlat = dim1(0) nlon = dim1(1) ;print(dims) lats=(/ 40.5, 46.5/) lons=(/ -82.0, -87.0/) nm=getind_latlon2d(lat2d,lon2d,lats,lons) wks=gsn_open_wks("pdf","NARR") gsn_define_colormap(wks,"gui_default") plot = new(1,graphic) res=True res@gsnDraw = True res@gsnFrame = True ;res@tiYAxisString="Wind Speed m/s" ;res@tiXAxisString="Time (hours)" res@cnInfoLabelOn = True ; turn off cn info label res@cnFillOn = True ; turn on color res@lbLabelBarOn = True res@cnLinesOn = False res@mpProjection = "LambertConformal" res@mpLambertParallel1F = 50.0 res@mpLambertParallel2F = 50.0 res@mpLambertMeridianF = -107.0 ;res@mpLimitMode="Corners" ;res@mpLeftCornerLatF=lat2d(0,0) ;res@mpLeftCornerLonF=lon2d(0,0) ;res@mpRightCornerLatF=lat2d(nlat-1,nlon-1) ;res@mpRightCornerLonF=lon2d(nlat-1,nlon-1) res@mpLimitMode = "LatLon" res@mpMinLatF = 40.5 res@mpMinLonF = -87.0 res@mpMaxLatF = 46.5 res@mpMaxLonF = -82.0 ;res@mpMinLatF = nm(0,0) ;res@mpMinLonF = nm(0,1) ;res@mpMaxLatF = nm(1,0) ;res@mpMaxLonF = nm(1,1) res@tfDoNDCOverlay = True res@gsnAddCyclic = False ; regional data plot=gsn_csm_contour_map(wks,wind(0,:,:),res) ;plot=gsn_xy(wks,time,unew(0,:,:),res) end