[ncl-talk] Problems with plotting Cyclone Track

Dennis Shea shea at ucar.edu
Mon Jun 24 09:15:40 MDT 2019


[1]* Example s*cripts are not necessarily directly applicable. They are
meant as *guidance*.
*http://www.ncl.ucar.edu/Applications/wrftrack.shtml*
<http://www.ncl.ucar.edu/Applications/wrftrack.shtml>

* WRF_track_1.ncl *

Others* WRF guidance* examples.
*http://www.ncl.ucar.edu/Applications/wrf.shtml
<http://www.ncl.ucar.edu/Applications/wrf.shtml>*
*http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.php*
*http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/SPECIAL/wrf_Vortex.php*
<http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/SPECIAL/wrf_Vortex.php>

[2] The golden rule of data processing is *"Look at you data"*
It is *user responsibility* to look at the WRF data being used.
This allows the user to make an assessment if the data can be directly used
within the example script.

[3] *WRF_track_1.ncl *had one time step per file. Each of your WRF  files
has 17 time steps. Obviously, the *user *must make script changes to
accommodate these file structure differences.  This is user responsibility.

[4] Using 'ncdump -h' or 'ncl_filedump' on each file shows they have *different
horizontal grid resolutions*.
The have different areas:

netcdf *wrfout_d01_2017-10-21_00_00_00 *{
dimensions:
        Time = UNLIMITED ; // (17 currently)
        *west_east = 80 ;*
       * south_north = 80 ;*
        *bottom_top = 32* ; ;

(0) *LATITUDE*, SOUTH IS NEGATIVE (degree_north) : *min=13.834
max=32.9475*
(0)* LONGITUDE*, WEST IS NEGATIVE (degree_east) : *min=79.9375
max=100.897*

netcdf *wrfout_d02_2017-10-21_00_00_00 *{
dimensions:
        Time = UNLIMITED ; // (17 currently) ;


*        west_east = 93 ;        south_north = 96 ;        bottom_top = 32
;*

(0) *LATITUDE, *SOUTH IS NEGATIVE (degree_north) :
* min=19.09   max=26.8182*(0)* LONGITUDE, *WEST IS NEGATIVE (degree_east)
* : min=87.2776   max=95.4136*

Thus, *when looping over files, it may be necessary to use NCL's
reassignment operator  :=*

[5] re: Being 'new-to-NCL' or being a "novice"
It is your responsibility to read/study the language documentation:

*http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_Legal.pdf*
<http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_Legal.pdf>






On Thu, Jun 20, 2019 at 11:52 PM Saurav Dey Shuvo via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Dear Respected Sir,
>
> I have attached my files for you to check. They are not single time step
> files. So what should I do now?
> I am trying to plot the path of a depression that formed during that
> period and moved over that area.
> The script I am using is from the NCL's website.
> As I have said before, I am a novice at this. That's why I am still at
> wonder with these things.
>
> https://drive.google.com/open?id=1Icu9p9hT6u7_zOzUEnDwEZH7-9NwH62i
>
> Sincerely -
>
> On Fri, 21 Jun 2019 at 04:14, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> 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
>>>
>>>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190624/7cf8a78a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WRF_track_1.new.ncl
Type: application/octet-stream
Size: 4520 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190624/7cf8a78a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: track_d02_d01.png
Type: image/png
Size: 92548 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190624/7cf8a78a/attachment-0001.png>


More information about the ncl-talk mailing list