[ncl-talk] NCL wrf_contour use for multiple files

Bill Ladwig ladwig at ucar.edu
Wed Jun 15 09:36:37 MDT 2016


Hi Jade,

Please include ncl-talk in your replies so that it posts to the email
list.  The error you're getting is most likely due to 'it' being out of the
bounds for your 'a' list variable.  This leads me to believe there aren't
actually 12 timesteps in that second file.  Have you looked at the file?
Never assume it's what you think it is, always check.  Please do an 'ncdump
-h wrfout_d01_2005-08-25_06:00:00' and report back the result.  Until I
know what's really in that second file, it's hard to guess what might be
going wrong.  Also, if you can print the 'times' result from 'times =
wrf_user_getvar(a, "times", -1)', that would be helpful too.

Thanks,

Bill

On Tue, Jun 14, 2016 at 6:29 PM, Wang,Yu <wangyu8722 at ufl.edu> wrote:

> Thank you so much for your help.
>
>
> I think I will put my question in a different way maybe it is more clear.
>
>
> I have two nc files wrfout_d01_2005-08-25_00:00:00 and wrfout_d01_2005-08-25_06:00:00,
> each of them have 12 time steps, whic means they have 30 minutes interval.
> I put them together using a addfiles command. And using a timestep of 2 to
> loop over to calculate the hourly precipitation tendency by using a later
> time minus an earlier one, for example, using the 5th time step (
> 2005-08-25_02:00:00) of the first file minus the 3rd time step (
> 2005-08-25_01:00:00) to calculate the tendency between 01Z to 02Z.
>
>
> When I was trying to plot the tendency from 2005-08-25_05:00:00 (which is
> the 11th time step of the first file as well as the 11th of the addfiles
> resulted list) to 2005-08-25_06:00:00(which is the 3rd time step of the
> second file, and the 13th time step of the addfiles list) using the line
> below:
>
> > contour_psl = wrf_contour(a[it],wks,slp(it,:,:),opts_psl)
>
> And get the error of fatal:ListSelect: Index out of range.
>
>
> If this still does not make any sense. Could you give me some suggestion
> about how to use wrf_contour to plot the difference between the last
> time step of one wrf output file and the first time step of the second
> file? Can it be done or I have to use some other functions.
>
>
> Hope this explain better of my question.
>
>
> Thanks again for your help.
>
>
> Best,
>
>
> Jade
> ------------------------------
> *From:* Bill Ladwig <ladwig at ucar.edu>
> *Sent:* Tuesday, June 14, 2016 6:21:11 PM
> *To:* Wang,Yu
> *Cc:* ncl-talk at ucar.edu; wrfhelp at ucar.edu
> *Subject:* Re: [ncl-talk] NCL wrf_contour use for multiple files
>
> Hi Jade,
>
> Can you do an "ncdump -h wrf_file" or an ncl_filedump and report back the
> number of times for each file?  With WRF, sometimes the last file has less
> times than the other files.  In this case, it might be only 1.  With a
> tend_int greater than 1, you might be jumping past the last time.  Without
> seeing the data, it's hard to say.
>
> Bill
>
> On Tue, Jun 14, 2016 at 2:53 PM, Wang,Yu <wangyu8722 at ufl.edu> wrote:
>
>> Dear ncl_talk and wrfhelp,
>>
>> Hope everything goes well with everyone.
>>
>> I am having a problem with ncl when I wanted to plot hourly precipitation
>> tendencies multiple files. I used the example from the wrf website as below
>>
>> http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/PRECIP/wrf_Precip_multi_files.ncl.
>> All I did is to change the input file. I have 2 domain 1 files, including
>> 6 hours with 30 mins interval in each file. The script works perfectly when
>> it was processing the first file as below:
>>
>> (0)     Working on time: 2005-08-25_01:00:00
>> (0)     Working on time: 2005-08-25_02:00:00
>> (0)     Working on time: 2005-08-25_03:00:00
>> (0)     Working on time: 2005-08-25_04:00:00
>> (0)     Working on time: 2005-08-25_05:00:00
>> But when it get to calculate the next hour which should use both files,
>> the script starts to have trouble and give me an error of
>> fatal:ListSelect: Index out of range
>> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 89 in
>> file wrf_Precip_multi_files.ncl
>> Is this because of my output file or there is something I should change
>> in the script?
>>
>> Hope some one can provide some help. I would really appreciate any help.
>> Thank you so much.
>>
>> Best,
>>
>> Jade
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160615/20ad8566/attachment.html 


More information about the ncl-talk mailing list