Skip to content

from_nhc_code bug for same-year events with the same name #78

@SorooshMani-NOAA

Description

@SorooshMani-NOAA

Try:

storm = stormevents.StormEvent.from_nhc_code('EP182022')

Now if you inspect the storm, it's actually picking Julia from AL basin! That's because of search-by-name done in the constructor and then picking the "first" occurrence of the name in the list:

storms = nhc_storms(year=year)
storms = storms[storms["name"].str.contains(name.upper())]
if len(storms) > 0:
self.__entry = storms.iloc[0]

Looking at the storms list from 2022:

           name class  year basin  number       source start_date            end_date
nhc_code
.
.
.
AL132022  JULIA    HU  2022    AL      13  GIS_ARCHIVE        NaT                 NaT
.
.
.
EP182022  JULIA    HU  2022    EP      18              2022-10-02 2022-10-10 18:00:00
.
.
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions