scripts/retrieve_netcdf_files.py
def retrieve(
    files: str,
    output: str
    ) -> None:
    """Download a list of files to an output directory.
    
    Parameters
    ----------
    files: str
        List of file URLs, one per line.
    output: str
        Download directory where all files will be saved.
        
    Returns
    -------
    None
    """
    # Get list of URLs
    with Path(files).open('r') as fi:
        urls = [line.strip() for line in fi]

    # Prepare output directory
    odir = Path(output)
    odir.mkdir(exist_ok=True, parents=True)

    # Download
    for url in urls:
        # Construct an output filename
        ofile = odir / url.split("/")[-1]
        
        # Save
        download(url, ofile)
Download a list of files to an output directory.
    
    Parameters
    ----------
    files: str
        List of file URLs, one per line.
    output: str
        Download directory where all files will be saved.
        
    Returns
    -------
    None
    
Download a list of files to an output directory.
Parameters

str
List of file URLs, one per line.
output: str
Download directory where all files will be saved.

Returns

None
Download a list of files to an output directory . Parameters str List of file URLs one per line . output : str Download directory where all files will be saved . Returns None
def retrieve(
    files: str,
    output: str
    ) -> None:
    with Path(files).open('r') as fi:
        urls = [line.strip() for line in fi]
    odir = Path(output)
    odir.mkdir(exist_ok=True, parents=True)
    for url in urls:
        ofile = odir / url.split("/")[-1]
        download(url, ofile)
def retrieve ( files : str , output : str ) -> None : with Path ( files ) . open ( 'r' ) as fi : urls = [ line . strip ( ) for line in fi ] odir = Path ( output ) odir . mkdir ( exist_ok = True , parents = True ) for url in urls : ofile = odir / url . split ( "/" ) [ - 1 ] download ( url , ofile )
Download a list of files to an output directory.
Download a list of files to an output directory .
"""Download a list of files to an output directory.
    
    Parameters
    ----------
    files: str
        List of file URLs, one per line.
    output: str
        Download directory where all files will be saved.
        
    Returns
    -------
    None
    """ # Get list of URLs # Prepare output directory # Download # Construct an output filename # Save
files
str
output
str