[ncl-talk] Error while handling multiple WRF output files
swati shewale
shewaleswati16 at gmail.com
Thu Sep 7 22:02:03 MDT 2017
Thank you. I will try with your script. yesterday I tried it with below
script. Please have a look and let me know, whether it is correct or not.
On Fri, Sep 8, 2017 at 12:54 AM, Mary Haley <haley at ucar.edu> wrote:
> If I understand you correctly, then you need to reshape your X array so
> that it is NTIM x 8 x NLAT x NLON, and then you can average across the
> second dimension from the left.
>
> I've attached a modified version of your script, which is UNTESTED. You
> may need to modify it to do the right thing with regard to copying over the
> required metadata. I did this a little with copy_VarAtts, and copy_coords.
>
> --Mary
>
>
>
>
> On Thu, Sep 7, 2017 at 3:42 AM, swati shewale <shewaleswati16 at gmail.com>
> wrote:
>
>> Hiii,
>> using ncrcat I have single file containing 24 time step (3hrly, 3 days).
>> Now I want to plot temperature variable (average for each day, spatial,
>> panel plot). I am unable to take out time step for 1st day (0:7) and then
>> do average of it...then second day (8:15) ...likewise for third day
>> (16:23). I wrote a script, in that it takes average over all time steps.
>> what changes should I make so that I can get average over specific time
>> step? attached herewith script.
>> summary of variable temperature is as follow.
>>
>> Variable: X
>> Type: float
>> Total Size: 5658552 bytes
>> 1414638 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [Time | 23] x [south_north | 201] x [west_east |
>> 306]
>> Coordinates:
>> Number Of Attributes: 6
>> FieldType : 104
>> MemoryOrder : XY
>> description : TEMP at 2 M
>> units : K
>> stagger :
>> coordinates : XLONG XLAT XTIME
>>
>>
>>
>> On Thu, Sep 7, 2017 at 3:04 PM, swati shewale <shewaleswati16 at gmail.com>
>> wrote:
>>
>>> Thank you. I will try with it.
>>>
>>> On Wed, Sep 6, 2017 at 8:39 PM, Mary Haley <haley at ucar.edu> wrote:
>>>
>>>> The error message is telling you that there's something wrong with
>>>> argument 0 passed to wrf_contour. Argument 0 refers to the first argument
>>>> in the list, which is "a(itime)" in this case.
>>>>
>>>> The issue is that when you use addfiles to open a series of files, you
>>>> need to use square brackets, [], to access a single file, and not curved
>>>> brackets, (). This is because addfiles returns a "List" object, and lists
>>>> in NCL need to be access with square brackets.
>>>>
>>>> You have:
>>>>
>>>> contour = wrf_contour(a(itime),wks,t,t_res)
>>>>
>>>> and this should be:
>>>>
>>>> contour = wrf_contour(a[itime],wks,t,t_res)
>>>>
>>>> --Mary
>>>>
>>>>
>>>>
>>>> On Mon, Sep 4, 2017 at 4:40 AM, swati shewale <shewaleswati16 at gmail.com
>>>> > wrote:
>>>>
>>>>> Hiiii
>>>>>
>>>>> I want to do panel plotting using WRF output. I have total 8 files,
>>>>> each contains single time step (one day, 3 hrly datafiles so total 8
>>>>> files). out of eight times I want to plot 6 time step (panel plot) for
>>>>> variable slp and temperature.
>>>>>
>>>>> It shows below error.
>>>>>
>>>>> fatal:Argument type mismatch on argument (0) of (wrf_contour) can not
>>>>> coerce
>>>>> fatal:["Execute.c":8567]:Execute: Error occurred at or near line 44
>>>>> in file temp.ncl
>>>>> (0) Error: gsn_panel: all of the plots passed to gsn_panel appear
>>>>> to be invalid
>>>>>
>>>>> Attached herewith script.
>>>>>
>>>>> Thank you in advance. Any help will be appreciated
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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/20170908/b76b1e6f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: partial_time_avg_plot.ncl
Type: application/octet-stream
Size: 1171 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170908/b76b1e6f/attachment.obj>
More information about the ncl-talk
mailing list