; Example script to produce standard plots for a WRF grav2x run load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ;load "./WRFUserARW.ncl" begin ; ; The WRF ARW input file. ; This needs to have a ".nc" appended, so just do it. a = addfile("..//DATA/em_seabreeze2d_x/wrfout_d01_2007-06-01_05:00:00.nc","r") ; We generate plots, but what kind do we prefer? type = "x11" type = "pdf" ; type = "ps" ; type = "ncgm" wks = gsn_open_wks(type,"plt_Sea2x") ; Set some basic resources res = True res@MainTitle = "WRF SEABREEZE" res@InitTime = False res@Footer = False pltres = True ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; What times and how many time steps are in the data set? times = wrf_user_list_times(a) ; get times in the file ntimes = dimsizes(times) ; number of times in the file ; The specific plane we want to plot data on plane = (/ 20., 0./) ; (x,y) point for vertical plane angle = 90.0 pii = 3.14159 ; This is the big loop over all of the time periods to process. do it = 18,ntimes-1,2 time = it res@TimeLabel = times(it) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; First get the variables we will need u = wrf_user_getvar(a,"ua",time) ; ua is u averaged to mass points w = wrf_user_getvar(a,"wa",time) ; vertical velocity z = wrf_user_getvar(a, "z",time) ; grid point height res@tmYLMode = "Explicit" res@tmYLValues = fspan(0.,100.,5) res@tmYLLabels = sprintf("%.1f",fspan(0.,34.,5)) u_plane = wrf_user_intrp3d( u,z,"v",plane,angle,False) w_plane = wrf_user_intrp3d( w,z,"v",plane,angle,False) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gsn_define_colormap(wks,"BlWhRe") opts_u = res opts_u@cnFillOn = True opts_u@ContourParameters = (/ -1., 1., .1 /) contour_u = wrf_contour(a,wks, u_plane,opts_u) plot = wrf_overlays(a,wks,(/contour_u/),pltres) gsn_define_colormap(wks,"3saw") opts_w = res opts_w@cnFillOn = True opts_w@ContourParameters = (/ -0.2, 0.2, .02 /) opts_w@gsnSpreadColorEnd = 53 contour_w = wrf_contour(a,wks,w_plane,opts_w) plot = wrf_overlays(a,wks,(/contour_w/),pltres) ; ************************************************************ end do ; end of the time loop end