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

Setareh Rahimi setareh.rahimi at gmail.com
Sun Dec 10 09:36:28 MST 2023


Dear Dave,

Thank you so much for your reply. Yes! your are right, [nt-1 = -1] which is
meaningless. I should skip this one, and set :
do nt=1, ntim-1.

I changed nt from 0 to 1 and it worked. Thanks!

******So I want to make sure that my calculation to achieve hourly
precipitation is correct?*****

_________________________________

*How about daily average precipitation, how can I calculate it, please?*



On Sun, Dec 10, 2023 at 7:42 PM Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:

> 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
>>
>

-- 
S.Rahimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20231210/7ee0d723/attachment.htm>


More information about the ncl-talk mailing list