;xhu@ou.edu ;******************************************** ; stream_8.ncl ;******************************************** 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/WRFUserARW.ncl" begin ; 35.468762,-97.516304 location of PWIDS used in Ju2003, intersection of Park Ave and N Robinson Ave lat = 35.468762 lon = -97.516304 do idomain = 5,5 files = systemfunc ("ls wrfout_d0"+idomain+"_2*00:00 ") do ifile = 0, 0; dimsizes(files)-1 file_target = files(ifile) in = addfile(file_target+".nc","r") if (ifile .eq. 0) then lat2d=in->XLAT(0,:,:) ;(Time, south_north, west_east) lon2d=in->XLONG(0,:,:) JI=getind_latlon2d(lat2d,lon2d, lat,lon) print(JI) end if T = in->T ; select variable to ave pres = wrf_user_getvar(in,"pres",0) ; pres pres_coor = dim_avg_Wrap(dim_avg_Wrap(pres)) pres_coor@units = "Pa" ;printVarSummary(pres) ;printVarSummary(pres_coor) ;printVarSummary(T) T&bottom_top = pres_coor va = wrf_user_getvar(in,"va",0) ; va wa = wrf_user_getvar(in,"wa",0) ; wa figurename = "wrfout_d0"+idomain+"_T_crossSNstremline_"+ifile wks = gsn_open_wks("eps" ,figurename) ; ps,pdf,x11,ncgm,eps gsn_define_colormap(wks,"BlAqGrYeOrRevi200") ; choose color map res = True ; plot mods desired res@tiMainString = chartostring(in->Times) ; simname = "fnl5dWSM6_noUCM" res@gsnRightString = simname res@gsnLeftString = "Perturbation Po Temp" res@cnLineLabelsOn = False ; turn off line labels res@cnFillOn = True ; turn on color fill res@lbLabelStride = 2 ; every other color res@gsnSpreadColors = True ; use full range of color map res@stMinArrowSpacingF = 0.008 ; arrow spacing. res@stArrowLengthF = 0.008 ; arrow length i_location = JI(0,1) -4 ; -4 to avoid norman ; print(wa(:,:,i_location)) plot = gsn_csm_pres_hgt_streamline(wks,T(0,:,:,i_location),va(:,:,i_location),\ wa(:,:,i_location),res ) system("convert -trim "+figurename+".eps /nsftor/xhu/public_html/WRF-UCM/FocusON_OKC/wrf"+simname+".2003072400/"+figurename+".png") ; system("rm "+figurename+".eps") print("finish plotting "+figurename+".eps") delete(T) end do end do end