[ncl-talk] issue plotting accumulated precip

Andrew Kren - NOAA Affiliate andrew.kren at noaa.gov
Thu Aug 30 14:58:34 MDT 2018


Dear ncl-talk,


I am getting issues with my ncl script in plotting accumulated
precipitation. Basically, I store the 6-hourly precipitation from the grib
file and sum it at the end using dim_sum_n. See below snippet of my code.
When I use ncl 6.3, the accumulated precipitation increases as expected
from hour 6 to hour 144. When I use ncl 6.5, I get certain hours where the
precipitation decreases from say hour 18 to hour 24. It only appears to
happen when I plot a regional accumulation, though, like for the state of
Colorado. But there is nothing different in both scripts. I can't figure
out what is going on. Is this a bug?


print("Calculating accumulated precipitation")


accum_pcp = new((/dimsizes(fcst_hr),nlat,nlon/),float)  ; accumulated precip

accum_pcp!0="hour"

accum_pcp!1="lat"

accum_pcp!2="lon"

accum_pcp&lat = lat

accum_pcp&lon = lon

accum_pcp&lat at units = "degrees_north"

accum_pcp&lon at units = "degrees_east"


    ntstrt = 0 ; counter variables for accumulated precipitation

    ntlast = 0

    do t=0,dimsizes(fcst_hr)-1

    accum_pcp(t,:,:) = dim_sum_n(saved_pcp(ntstrt:ntlast,:,:),0)

    ntlast = ntlast + 1   ; increment for accumulated precipitation

    end do


Thank you,

-- 
Andrew Kren
Assistant Scientist
University of Miami CIMAS - NOAA/AOML
Duty Station: NCAR Foothills - FL2-3058
Boulder, Colorado, USA
Office: 303-497-2715
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180830/0c59f285/attachment.html>


More information about the ncl-talk mailing list