<div dir="ltr">Dear NCL-Talk, <div>I have been using this script to get accumulated precipitation value(txt), and I want to add hourly precipitation value, however the codes are not working. How should I fix this?</div><div><br></div><div>===================================================================</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<br>;====================================================================<br>domain = "d02"<br>start = "20210417"<br>;====================================================================<br>stid = (/"87"/)<br></div><div><br></div><div>id=1</div><div>station = stid(id)<br> if station.eq."87" then<br> slat = 33.3562127<br> slon = 126.1840886<br></div><div>end if<br></div><div><br></div><div>lampway = "/home/sja3/yun/ncl/prog/make_netcdf/wrfout/"+domain+"/"<br>lampdirs = systemfunc ("ls "+lampway)<br>startday = ind(str_get_cols(lampdirs,0,7).eq.start)<br><br>nt=24*12+1<br>it=ispan(1,nt,1)<br><br></div><div> i=startday<br> print(station+" -> "+i+"/"+(dimsizes(lampdirs)-1))<br> lampfils = systemfunc ("ls "+lampway+lampdirs(i)+"/wrfout*")<br> lampfi = addfiles(lampfils,"r")<br> lampref = addfile(lampfils(0),"r")<br> ListSetType(lampfi,"cat") ; cat : tie to time, join : tie to number of files<br><br> opt = True<br> opt@returnInt = True<br> locij = wrf_user_ll_to_ij(lampref, slon, slat, opt)<br> locij = locij-1<br> locX = locij(0)<br> locY = locij(1)<br><br> input_utim=wrf_user_getvar(lampfi, "times", -1) <br> ntim=dimsizes(input_utim)<br></div><div><br></div><div> rainc=wrf_user_getvar(lampfi, "RAINC", -1)<br></div><div> rainnc=wrf_user_getvar(lampfi, "RAINNC", -1)<br> rain=rainc+rainnc<br> rain(1:ntim-1,locY,locX)=rain(1:ntim-1,locY,locX) - rain(0:ntim-2,locY,locX) <br><b> rain_point=rain(1:ntim-1,locY,locX)<br></b></div><div><br></div><div>======================================================================</div><div><br></div><div>error occured in this line -> rain_point=rain(1:ntim-1,locY,locX)
</div><div>How should i fix this?</div><div><br></div><div>Olivia<br></div><div><br></div><div><br></div><div><br></div></div>