load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ;load "./WRFUserARW.ncl" begin ; ; Make a list of all files we are interested in DATADir = "./" FILES = systemfunc (" ls -1 " + DATADir + "wrfout* ") numFILES = dimsizes(FILES) do j = 0,numFILES-1,1 f = addfiles(FILES(j)+".nc","r") do it = 0,ntimes-1,1 ; TIME LOOP u = wrf_user_getvar(f,"ua",it) ; u averaged to mass points v = wrf_user_getvar(f,"va",it) ; v averaged to mass points loc = wrf_user_ll_to_ij(f, 54.01486, 6.5876, True) mx = loc(0) - 1 ny = loc(1) - 1 lat1 = f->XLAT(0,ny,mx) ; the is the nearest grid point lon1 = f->XLONG(0,ny,mx) res = True res@tiMainString = "WRF: All Times: grid point ["+sprintf("%5.2f",lat1)+" , "+sprintf("%5.2f",lon1) +"]" wspd1= ndtooned( sqrt(u(2,ny,mx)^2 + v(2,ny,mx)^2) ) ;wdir1= ndtooned( atan2(u(2,ny,mx),v(2,ny,mx))/0.01745329 +180. ) print("Working on time: " + times(it) + " wind_speed="+wspd1) end do end do end