[ncl-talk] Problems with plotting Cyclone Track
Rick Brownrigg
brownrig at ucar.edu
Thu Jun 20 16:44:25 MDT 2019
Hi,
Please reply to the ncl-talk group -- it provides a bigger resource for
answering questions.
I don't know much about WRF and what you are trying to do, but if all your
WRF files are single time step files, and all you are tring to do with this
line:
time(ifs) = wrf_user_list_times(f)
is for each file capture that timestamp, then something like this might
work:
time(ifs) = charactertostring(f->Times)
The f->Times variable (which I believe is standard) is character, so it
needs to be converted.
I'll note that when I ran a test using wrf_user_list_times() on a
single-time WRF file, it always produced a 1D array of dimension 2, which
would be why you are getting the error: trying to assign a 2-element entity
into a 1-element slot. Note that NCL requires the dimensionality *and*
types of both sides of an assignment statement to match.
Rick
On Thu, Jun 20, 2019 at 4:27 PM Saurav Dey Shuvo <sauravshuvo007 at gmail.com>
wrote:
> Dear Respected Sir,
>
> Thank you for the clarification.
> But I am very new at NCL, and still has minimal knowledge about it.
> Could you please tell me what should I write to solve this problem?
>
> Sincerely -
>
> On Thu, 20 Jun 2019 at 21:26, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> Hi,
>>
>> The error message is telling you exactly the problem -- the dimensions of
>> the expression on the right hand side of an assignment must match the
>> dimensions of the variable on the left. More specifically, line 61 in your
>> script is:
>>
>> time(ifs) = wrf_user_list_times(f)
>>
>> Time is a one dimension variable, declared as:
>>
>> time = new(ndate,string)
>>
>> and wrf_user_list_time() returns an array of available times, so line 61
>> is an attempt to assign an *element* of the time array to a 1D array of
>> indeterminate length.
>>
>> Hope that helps...
>> Rick
>>
>> On Wed, Jun 19, 2019 at 1:07 AM Saurav Dey Shuvo via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> Dear Respected Sir/Madam,
>>> I am trying to plot a cyclone track. But I am getting this -
>>>
>>> ncl WRF_track_1.ncl
>>> Copyright (C) 1995-2017 - All Rights Reserved
>>> University Corporation for Atmospheric Research
>>> NCAR Command Language Version 6.4.0
>>> The use of this software is governed by a License Agreement.
>>> See http://www.ncl.ucar.edu/ for more details.
>>> (0) Check input data:1 .ne. 8
>>>
>>>
>>> Variable: times
>>> Type: string
>>> Total Size: 264 bytes
>>> 33 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [33]
>>> Coordinates:
>>> Number Of Attributes: 2
>>> description : times in file
>>> _FillValue : missing
>>> (0) 2017-10-17_00:00:00
>>> (1) 2017-10-17_03:00:00
>>> (2) 2017-10-17_06:00:00
>>> (3) 2017-10-17_09:00:00
>>> (4) 2017-10-17_12:00:00
>>> (5) 2017-10-17_15:00:00
>>> (6) 2017-10-17_18:00:00
>>> (7) 2017-10-17_21:00:00
>>> (8) 2017-10-18_00:00:00
>>> (9) 2017-10-18_03:00:00
>>> (10) 2017-10-18_06:00:00
>>> (11) 2017-10-18_09:00:00
>>> (12) 2017-10-18_12:00:00
>>> (13) 2017-10-18_15:00:00
>>> (14) 2017-10-18_18:00:00
>>> (15) 2017-10-18_21:00:00
>>> (16) 2017-10-19_00:00:00
>>> (17) 2017-10-19_03:00:00
>>> (18) 2017-10-19_06:00:00
>>> (19) 2017-10-19_09:00:00
>>> (20) 2017-10-19_12:00:00
>>> (21) 2017-10-19_15:00:00
>>> (22) 2017-10-19_18:00:00
>>> (23) 2017-10-19_21:00:00
>>> (24) 2017-10-20_00:00:00
>>> (25) 2017-10-20_03:00:00
>>> (26) 2017-10-20_06:00:00
>>> (27) 2017-10-20_09:00:00
>>> (28) 2017-10-20_12:00:00
>>> (29) 2017-10-20_15:00:00
>>> (30) 2017-10-20_18:00:00
>>> (31) 2017-10-20_21:00:00
>>> (32) 2017-10-21_00:00:00
>>> fatal:Dimension sizes on right hand side of assignment do not match
>>> dimension sizes of left hand side
>>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 61 in
>>> file WRF_track_1.ncl
>>>
>>> Could you please help me in sorting out my problem.
>>>
>>> Sincerely -
>>> --
>>> Saurav Dey Shuvo
>>> M.Sc. in Meteorology at Department of Meteorology, University of Dhaka
>>> B.S. in Geography and Environment at Department of Geography and
>>> Environment, University of Dhaka
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
> --
> Saurav Dey Shuvo
> M.Sc. in Meteorology at Department of Meteorology, University of Dhaka
> B.S. in Geography and Environment at Department of Geography and
> Environment, University of Dhaka
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190620/78793997/attachment.html>
More information about the ncl-talk
mailing list