src/tropycal/tracks/storm.py
def download_tcr(self,save_path=""):
        
        r"""
        Downloads the NHC offical Tropical Cyclone Report (TCR) for the requested storm to the requested directory. Available only for storms with advisories issued by the National Hurricane Center.
        
        Parameters
        ----------
        save_path : str
            Path of directory to download the TCR into. Default is current working directory.
        """
        
        #Check to ensure storm is not an invest
        if self.invest:
            raise RuntimeError("Error: NHC does not issue advisories for invests that have not been designated as Potential Tropical Cyclones.")
        
        #Error check
        if self.source != "hurdat":
            msg = "NHC data can only be accessed when HURDAT is used as the data source."
            raise RuntimeError(msg)
        if self.year < 1995:
            msg = "Tropical Cyclone Reports are unavailable prior to 1995."
            raise RuntimeError(msg)
        if isinstance(save_path,str) == False:
            msg = "'save_path' must be of type str."
            raise TypeError(msg)
        
        #Format URL
        storm_id = self.dict['id'].upper()
        storm_name = self.dict['name'].title()
        url = f"https://www.nhc.noaa.gov/data/tcr/{storm_id}_{storm_name}.pdf"
        
        #Check to make sure PDF is available
        request = requests.get(url)
        if request.status_code != 200:
            msg = "This tropical cyclone does not have a Tropical Cyclone Report (TCR) available."
            raise RuntimeError(msg)
        
        #Retrieve PDF
        response = requests.get(url)
        full_path = os.path.join(save_path,f"TCR_{storm_id}_{storm_name}.pdf")
        with open(full_path, 'wb') as f:
            f.write(response.content)
r"""
        Downloads the NHC offical Tropical Cyclone Report (TCR) for the requested storm to the requested directory. Available only for storms with advisories issued by the National Hurricane Center.
        
        Parameters
        ----------
        save_path : str
            Path of directory to download the TCR into. Default is current working directory.
        
r"""
Downloads the NHC offical Tropical Cyclone Report (TCR) for the requested storm to the requested directory. Available only for storms with advisories issued by the National Hurricane Center.

Parameters

save_path : str
Path of directory to download the TCR into. Default is current working directory.
r " " " Downloads the NHC offical Tropical Cyclone Report ( TCR ) for the requested storm to the requested directory . Available only for storms with advisories issued by the National Hurricane Center . Parameters save_path : str Path of directory to download the TCR into . Default is current working directory .
def download_tcr(self,save_path=""):
        if self.invest:
            raise RuntimeError("Error: NHC does not issue advisories for invests that have not been designated as Potential Tropical Cyclones.")
        if self.source != "hurdat":
            msg = "NHC data can only be accessed when HURDAT is used as the data source."
            raise RuntimeError(msg)
        if self.year < 1995:
            msg = "Tropical Cyclone Reports are unavailable prior to 1995."
            raise RuntimeError(msg)
        if isinstance(save_path,str) == False:
            msg = "'save_path' must be of type str."
            raise TypeError(msg)
        storm_id = self.dict['id'].upper()
        storm_name = self.dict['name'].title()
        url = f"https://www.nhc.noaa.gov/data/tcr/{storm_id}_{storm_name}.pdf"
        request = requests.get(url)
        if request.status_code != 200:
            msg = "This tropical cyclone does not have a Tropical Cyclone Report (TCR) available."
            raise RuntimeError(msg)
        response = requests.get(url)
        full_path = os.path.join(save_path,f"TCR_{storm_id}_{storm_name}.pdf")
        with open(full_path, 'wb') as f:
            f.write(response.content)
def download_tcr ( self , save_path = "" ) : if self . invest : raise RuntimeError ( "Error: NHC does not issue advisories for invests that have not been designated as Potential Tropical Cyclones." ) if self . source != "hurdat" : msg = "NHC data can only be accessed when HURDAT is used as the data source." raise RuntimeError ( msg ) if self . year < 1995 : msg = "Tropical Cyclone Reports are unavailable prior to 1995." raise RuntimeError ( msg ) if isinstance ( save_path , str ) == False : msg = "'save_path' must be of type str." raise TypeError ( msg ) storm_id = self . dict [ 'id' ] . upper ( ) storm_name = self . dict [ 'name' ] . title ( ) url = f"https://www.nhc.noaa.gov/data/tcr/{storm_id}_{storm_name}.pdf" request = requests . get ( url ) if request . status_code != 200 : msg = "This tropical cyclone does not have a Tropical Cyclone Report (TCR) available." raise RuntimeError ( msg ) response = requests . get ( url ) full_path = os . path . join ( save_path , f"TCR_{storm_id}_{storm_name}.pdf" ) with open ( full_path , 'wb' ) as f : f . write ( response . content )
r"""
Downloads the NHC offical Tropical Cyclone Report (TCR) for the requested storm to the requested directory.
r " " " Downloads the NHC offical Tropical Cyclone Report ( TCR ) for the requested storm to the requested directory .
r"""
        Downloads the NHC offical Tropical Cyclone Report (TCR) for the requested storm to the requested directory. Available only for storms with advisories issued by the National Hurricane Center.
        
        Parameters
        ----------
        save_path : str
            Path of directory to download the TCR into. Default is current working directory.
        """ #Check to ensure storm is not an invest #Error check #Format URL #Check to make sure PDF is available #Retrieve PDF
self
save_path