[ncl-talk] "Hourly " and "daily average precipitation" from WRF-Chem files

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Sun Dec 10 09:12:24 MST 2023


Your code structure is:

do nt=0,ntim-1
   ... (rainTot(nt,:,:) - rainTot(nt-1,:,:)),res)

end do


So on the first iteration, nt = 0, and nt-1 = -1.  That is a subscript out
of bounds.  What do you really want to compute here when nt=0?  Do you want
to skip this iteration?


On Sun, Dec 10, 2023 at 7:57 AM Setareh Rahimi via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear all,
>
> I need to calculate *hourly precipitation* from WRF-Chem output files. In
> order, to do this I used the below equation:
> (rainTot(nt,:,:) - rainTot(nt-1,:,:))
>
> However, I received these error messages:
>
> fatal:Subscript out of range, error in subscript #0
>
> fatal:An error occurred reading rainTot
>
> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 70 in
> file precip
>
> Would you please advise me on how to remove these error messages? (the
> script is attached).
>
> I have also another question, how can I calculate the daily average
> precipitation, please?
>
> Many thanks in advance.
>
> Best wishes,
> --
> S.Rahimi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20231210/607a86e0/attachment.htm>


More information about the ncl-talk mailing list