begin a = addfile("wrfout_d04_2007-09-24_05:00:00.nc","r") wks = gsn_open_wks("pdf","vertical_test") pltres = True mpres = True ;*********************************************** ; plot control ;*********************************************** res = True res@gsnDraw = False res@gsnFrame = False ; res@FieldTitle = "Wind" ; res@vcRefMagnitudeF = 1. ; res@vcRefLengthF = 0.025 ; res@vcGlyphStyle = "WindBarb" ; res@vcMinDistanceF = 0.025 res@cnFillOn = True ; turns on the color res@cnLinesOn = False ; turn off contour lines res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels res@cnMinLevelValF = -90. ; set min contour level res@cnMaxLevelValF = 20. ; set max contour level res@cnLevelSpacingF = 1. ; set contour spacing ;********************************************** ; for a single time ;********************************************** time = 3 ; w = wrf_user_getvar(a,"wa",time) ; w in m/s ; u = wrf_user_getvar(a,"ua",time) ; u in m/s z = wrf_user_getvar(a,"z",time) ; height in mass points tc = wrf_user_getvar(a,"tc",time) ; temperature in degrees c ; printVarSummary(w) printVarSummary(z) ; printMinMax(tc,0) dimsw = dimsizes(tc) print(dimsw) ; plane = (/ dimsw(2)/2, dimsw(1)/2 /) ; pivot point is central plane = (/ 500,530 , 600,530 /) ; w_plane = wrf_user_intrp3d(w,z,"v",plane,90.0,False) ; u_plane = wrf_user_intrp3d(u,z,"v",plane,90.0,False) tc_plane = wrf_user_intrp3d(tc,z,"v",plane,90.0,True) printVarSummary(tc_plane) ; w_plane_vector = wrf_vector(a,wks,u_plane,w_plane,res) tc_plane_contour = wrf_contour(a,wks,tc_plane,res) plot = wrf_overlays(a,wks,(/tc_plane_contour/),pltres) end