;Load NCL Libraries 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/wrf/WRF_contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" begin ;------------------------------------------------------------------- ;Add ARW output file a = addfile("/public/chenf/WRF_OPERATION/WRFwks/wrfout_d01_2010-06-18_12:00:00.nc","r") ;Open NCL Workspace type = "ps" wks = gsn_open_wks(type,"test") ;Define colormap gsn_define_colormap(wks,"wh-bl-gr-ye-re") ;Set resources ARWres = True ARWres@MainTitle = "ZJMB-WARMS Prediction" ARWres@Footer = False ARWres@pmLabelBarOrthogonalPosF = -0.08 ;------------------------------------------------------------------- ; What times and how many time steps are in the data set? FirstTime = True times = wrf_user_list_times(a) ; get times in the file ntimes = dimsizes(times) ; number of times in the file ;------------------------------------------------------------------- ;Create map background mpres = True ; Create map background mpres@mpFillOn = False i = NhlNewColor(wks,0.7,0.7,0.7) ; add gray to colormap mpres@mpLandFillColor = "black" ; set land to be gray mpres@mpOceanFillColor = "white" mpres@mpGeophysicalLineColor = "black" mpres@mpGeophysicalLineThicknessF = 1. mpres@mpDataBaseVersion = "Ncarg4_1" map = wrf_map(wks,a,mpres) ;------------------------------------------------------------------- do it = 3,ntimes-1,3 ; TIME LOOP ARWres@TimeLabel = times(it) ; Set Valid time to use on plots cape2d = wrf_user_getvar(a,"cape_2d",it) mcape = cape2d(0,:,:) opts = ARWres opts@cnFillOn = True opts@cnLineLabelsOn = False opts@FieldTitle = "MCAPE(maximum convective available potential energy):" opts@UnitLabel = "J/kg" opts@cnLevelSelectionMode = "ExplicitLevels" opts@cnLevels = (/ 500., 750., 1000., 1250., 1500., 1750., 2000., 2500., 3000., 3500./) opts@cnFillColors = (/3,15,31,45,63,80,95,127,159,182,199/) contour = wrf_contour(a,wks,mcape,opts) wrf_map_overlay(wks,map,contour,True) delete(opts) end do ; END OF TIME LOOP end