HOME


sh-3ll 1.0
DIR:/opt/cloudlinux/venv/lib64/python3.11/site-packages/xarray/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/xarray/__pycache__/tutorial.cpython-311.pyc
�

���hp��l�dZddlZddlmZddlmZej	�
d��Zdedfd	�ZdS)
zR
Useful for:

* users learning xarray
* building tutorials in the documentation.

�N�)�open_dataset)�urlretrieve)�~z.xarray_tutorial_dataTz%https://github.com/pydata/xarray-datac���tj�|��}|dz}tj�||f��}tj�|��s\tj�|��stj|��d�|dd|f��}t||��t|fi|���
��}	|stj|��|	S)ak
    Load a dataset from the online repository (requires internet).

    If a local copy is found then always use that to avoid network traffic.

    Parameters
    ----------
    name : str
        Name of the netcdf file containing the dataset
        ie. 'air_temperature'
    cache_dir : string, optional
        The directory in which to search for and write cached data.
    cache : boolean, optional
        If True, then cache data locally for use on subsequent calls
    github_url : string
        Github repository where the data is stored
    kws : dict, optional
        Passed to xarray.open_dataset

    z.nc�/�raw�master)�_os�path�
expanduser�sep�join�exists�isdir�mkdir�_urlretrieve�
_open_dataset�load�remove)
�name�cache�	cache_dir�
github_url�kws�longdir�fullname�	localfile�url�dss
          �D/opt/cloudlinux/venv/lib/python3.11/site-packages/xarray/tutorial.py�load_datasetr"s���,�h�!�!�)�,�,�G��e�|�H�����g�x�0�1�1�I��8�?�?�9�%�%�%��x�~�~�g�&�&�	��I�g�����h�h�
�E�8�X�>�?�?���S�)�$�$�$�	�y�	(�	(�C�	(�	(�	-�	-�	/�	/�B����
�9����
�I�)
�__doc__�osr�backends.apirr�
core.pycompatrrrr�_default_cache_dirr"�r#r!�<module>r*s���������7�7�7�7�7�7�6�6�6�6�6�6��W�\�\�"@�A�A��"�-?�C�)�)�)�)�)�)r#