Hello NCL,
I'm taking wrf-output and calculating the maximum wind speed over a 24-hr
period. The plot itself looks fine, but there is no associated lat/lon
coordinates and I'm having difficulties getting a lat/lon grid to plot with
the data. The script below runs without errors. Any help is appreciated.
Thanks,
Zack
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/wrf/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
a =
addfile("/sully/r0/ztaylor/WRF/DATA_FILES/WRFOUT_DATA/2_DOMS_12000_KM_35_LEVS_2010_0727_WSM6_WISC/
wsm6_d02.nc","r")
wks = gsn_open_wks("ps","maxwind")
u10 = a->U10(:,:,:)
v10 = a->V10(:,:,:)
u2 = u10(:,:,:)*u10(:,:,:)
v2 = v10(:,:,:)*v10(:,:,:)
speed = sqrt(u2+v2)
speed_mph = speed(:,:,:)*0.868976
maxwind= dim_max(speed_mph(:,:,:))
print(maxwind)
u10@lat2d = a->XLAT(0,:,:)
u10@lon2d = a->XLONG(0,:,:)
v10@lat2d = a->XLAT(0,:,:)
v10@lon2d = a->XLONG(0,:,:)
; lat2d = a->XLAT(0,:,:)
; lon2d = a->XLONG(0,:,:)
; maxwind@lat2d = lat2d
; maxwind@lon2d = lon2d
gsn_define_colormap(wks,"WhBlReWh")
res = True
res@gsnMaximize = True
res@cnLevelSelectionMode = "ManualLevels" ; Set contour levels manually
res@cnMinLevelValF = 10 ; Minimum contour level
res@cnMaxLevelValF = 24.0 ; Maximum contour level
res@gsnDraw = True ; Forces the plot to be drawn
res@gsnFrame = True ; Frame advance
res@cnFillOn = True
res@gsnPaperOrientation = "portrait"
res@lbAutoManage = True
res@gsnMaximize = True ; Maximize plot in frame
res@gsnSpreadColors = True ; span full colormap
res@tiMainString = "24-hr Maximum Wind Speed"
;plot = wrf_contour(a,wks,maxwind,res)
plot = gsn_csm_contour(wks,maxwind,res)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Mon Mar 28 2011 - 08:51:50 MDT