[ncl-talk] IBTrACS: storm tracking problem

Rashed Mahmood rashidcomsis at gmail.com
Thu Jan 28 02:58:56 MST 2021


Sorry for chim-in here...I think Adams suggestions are correct and the NCL
is doing exactly what it is supposed to do.

The problem is how you read the data. Your data contains all storm tracks
for 2019 and the way you are using "ind" function it would get all tracks
because you are using 2019 for finding the tracks. This is the reason all
tracks are plotted as one single line.

In this case, what you need is to select tracks based on either ID and Name
of the typhoons. See attached modified script and the figure.

hope that helps!

Rashed



On Thu, Jan 28, 2021 at 4:29 AM Md. Jalal Uddin via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Thank you, sir, for your kind help. I am getting the same result as
> before. Please see the attached file.
>
> Regards,
> Jalal
>
> On Thu, 28 Jan 2021 at 06:18, Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Jalal,
>> As you switched to using gsn_add_polyline/gsn_add_polymarker, my previous
>> advice will not work. The gs resources do not allow one to specify multiple
>> colors for multiple entries. Looking at your script, it looks to me like
>> you are only drawing one storm path, but your graphic shows multiple.
>> stormLat/stormLon look like single dimensioned arrays. (Maybe I am
>> misreading your code though.)
>>
>> In any case, assuming you have multiple tracks, you need to loop over
>> each track, setting each track a different color along the way:
>> ; ntracks is the number of tracks to be plotted
>>
>> colors = (/"red","blue","green","yellow"/)   ; and so on and so on
>> d1 = new(ntracks,graphic)
>> d2 = d1
>> do gg = 0,ntracks-1   ; loop over each track
>>     resp at gsLineColor = colors(gg)
>>     amres at gsMarkerColor = colors(gg)
>>     d1(gg) = gsn_add_polyline(wks,map,stormLon,stormLat,resp)
>>     d2(gg) = gsn_add_polymarker(wks,map,stormLon,stormLat,amres)
>> end do
>> draw(map)
>> frame(wks)
>>
>> For the colors, you can alternatively go old school and read in a
>> colormap directly and just refer to color indices:
>> gsn_define_colormap(wks,"srip_reanalysis") ; only has 19 colors
>> ; (no need to set a colors array)
>> do gg = 0,ntracks-1   ; loop over each track
>>     resp at gsLineColor = gg+2
>>     amres at gsMarkerColor = gg+2
>>
>> Anyway, the above should at the very least be able to get you started.
>> Good luck!
>> Adam
>>
>>
>> On Mon, Jan 25, 2021 at 6:52 PM Md. Jalal Uddin <dmjalal90 at gmail.com>
>> wrote:
>>
>>> Sorry, I forgot to add the updated script. Please see attached.
>>>
>>> On Tue, 26 Jan 2021 at 07:59, Adam Phillips <asphilli at ucar.edu> wrote:
>>>
>>>> Hi Jalal,
>>>> You did not send an updated version of your script, so I can only
>>>> address what you are doing by looking at the script attached to your
>>>> initial ncl-talk email. Assuming that you are drawing all the tracks with a
>>>> single gsn_csm_xy plot call, you will need to set the color of each marker
>>>> using the xyMarkerColors resource.
>>>>
>>>> http://www.ncl.ucar.edu/Document/Graphics/Resources/xy.shtml#xyMarkerColors
>>>> An example of doing this can be seen in XY example 37 here:
>>>> http://www.ncl.ucar.edu/Applications/xy.shtml#ex37
>>>> Hope that helps!
>>>> Adam
>>>>
>>>>
>>>> On Mon, Jan 18, 2021 at 6:52 AM Md. Jalal Uddin via ncl-talk <
>>>> ncl-talk at mailman.ucar.edu> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have solved the previous issue. However, I am still facing a
>>>>> problem. All typhoons are getting one line (attached figure), but every
>>>>> typhoon should have a different line.
>>>>>
>>>>> Any suggestions would be appreciated.
>>>>>
>>>>> On Sun, 17 Jan 2021 at 12:28, Md. Jalal Uddin <dmjalal90 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I am getting a map for only one typhoon instead of all (attached
>>>>>> figure). I followed the ibtracs_1.ncl example (
>>>>>> https://www.ncl.ucar.edu/Applications/Scripts/ibtracs_1.ncl). I need
>>>>>> to modify the following code.
>>>>>>
>>>>>> ID      = 2
>>>>>>  year  = 2019
>>>>>>
>>>>>> if( ID.ge.2 ) then
>>>>>>     stormInd = ind( ( year.eq.stormYear ).and.( ID.eq.stormID ) )
>>>>>>   else
>>>>>>     stormInd = ind( stormID.gt.ID )
>>>>>>   end if
>>>>>>
>>>>>>   stormLat = Latitude(stormInd)
>>>>>>   stormLon = Longitude(stormInd)
>>>>>>
>>>>>> The full code and data have been added in the attachment.
>>>>>>
>>>>>> Best regards,
>>>>>> Jalal
>>>>>> --
>>>>>> *Md. Jalal Uddin*
>>>>>> Founder and Director of Research Society (
>>>>>> https://researchsociety20.org/founder-and-director/)
>>>>>> PhD candidate - Atmospheric Physics and Atmospheric Environment
>>>>>> (NUIST)
>>>>>> M.Sc. in Applied Meteorology (NUIST)
>>>>>> B.Sc. in Disaster Management (PSTU)
>>>>>> Email: dmjalal90 at nuist.edu.cn
>>>>>> Personal website: https://dmjalal90.weebly.com/
>>>>>> Research gate profile:
>>>>>> https://www.researchgate.net/profile/Md_Uddin125
>>>>>> YouTube channel: http://www.youtube.com/c/MdJalalUddindmjalal90
>>>>>> Cell: +8613260859092, +8801792052662
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Md. Jalal Uddin*
>>>>> Founder and Director of Research Society (
>>>>> https://researchsociety20.org/founder-and-director/)
>>>>> PhD candidate - Atmospheric Physics and Atmospheric Environment (NUIST)
>>>>> M.Sc. in Applied Meteorology (NUIST)
>>>>> B.Sc. in Disaster Management (PSTU)
>>>>> Email: dmjalal90 at nuist.edu.cn
>>>>> Personal website: https://dmjalal90.weebly.com/
>>>>> Research gate profile:
>>>>> https://www.researchgate.net/profile/Md_Uddin125
>>>>> YouTube channel: http://www.youtube.com/c/MdJalalUddindmjalal90
>>>>> Cell: +8613260859092, +8801792052662
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at mailman.ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>>
>>>> --
>>>> Adam Phillips
>>>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>>>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>>>
>>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>>
>>>
>>>
>>> --
>>> *Md. Jalal Uddin*
>>> Founder and Director of Research Society (
>>> https://researchsociety20.org/founder-and-director/)
>>> PhD candidate - Atmospheric Physics and Atmospheric Environment (NUIST)
>>> M.Sc. in Applied Meteorology (NUIST)
>>> B.Sc. in Disaster Management (PSTU)
>>> Email: dmjalal90 at nuist.edu.cn
>>> Personal website: https://dmjalal90.weebly.com/
>>> Research gate profile: https://www.researchgate.net/profile/Md_Uddin125
>>>
>>> YouTube channel: http://www.youtube.com/c/MdJalalUddindmjalal90
>>> Cell: +8613260859092, +8801792052662
>>>
>>
>>
>> --
>> Adam Phillips
>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>
>> <http://www.cgd.ucar.edu/staff/asphilli>
>>
>
>
> --
> *Md. Jalal Uddin*
> Founder and Director of Research Society (
> https://researchsociety20.org/founder-and-director/)
> PhD candidate - Atmospheric Physics and Atmospheric Environment (NUIST)
> M.Sc. in Applied Meteorology (NUIST)
> B.Sc. in Disaster Management (PSTU)
> Email: dmjalal90 at nuist.edu.cn
> Personal website: https://dmjalal90.weebly.com/
> Research gate profile: https://www.researchgate.net/profile/Md_Uddin125
> YouTube channel: http://www.youtube.com/c/MdJalalUddindmjalal90
> Cell: +8613260859092, +8801792052662
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210128/d417786c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ibtracs.png
Type: image/png
Size: 524770 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210128/d417786c/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typhoon_track.ncl
Type: application/octet-stream
Size: 3596 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210128/d417786c/attachment-0001.obj>


More information about the ncl-talk mailing list