跳转到主要内容

本软件包中提供的模块旨在从Copernicus捕获和处理卫星数据。

项目描述

卫星天气下载器

Xarray Copernicus
Xarray Copernicus

SWD是一个用于使用Xarray下载、转换和分析Copernicus天气数据的系统。它由两个主要应用程序组成,即satellite_downloadersatellite_weatherdownloader负责从Copernicus API提取NetCDF4文件,而weather实现了Xarray扩展,用于转换和可视化文件。

安装

该应用可在PYPI上找到,您可以使用该包而无需部署容器,只需在您的shell中输入命令即可。

$ pip install satellite-weather-downloader

要求

要从Copernicus API下载数据,需要一个账户。您账户的凭据可以在Copernicus的用户页面的API密钥部分找到。请求数据需要用户UID和API密钥。在satellite_downloader连接方法中请求时,请粘贴它们。

注意

Python版本 = [3.10, 3.11]

1.X版本仅包含巴西数据格式和城市的处理方法。

通过交互式shell创建请求

自SWT版本1.5起,可以使用交互式Python shell或通过方法调用创建动态请求。

from satellite.downloader import request

file = request.ERA5_reanalysis(
    filename = 'my_dataset_file'
    # Any ERA5 Reanalysis option can be passed in the method
)
NOTE: This feature is still in experimental versions, please submit an issue if you find any bug.

从日期范围提取巴西NetCDF4文件

from satellite import downloader

file = downloader.download_br_netcdf('2023-01-01', '2023-01-07')

加载数据集

from satellite import weather as sat
br_dataset = sat.load_dataset(file)

copebr扩展的使用

rio_geocode = 3304557 # Rio de Janeiro's geocode (IBGE)
rio_dataset = br_dataset.copebr.geocode_ds(rio_geocode)
rio_dataset.to_dataframe(rio_geocode)

还可以直接从全国数据集创建dataframe。

br_dataset.copebr.to_dataframe(rio_geocode)

使用copebr扩展时,所有Xarray方法都将扩展。

rio_dataset.precip_med.to_array()
rio_dataset.temp_med.plot()

DSEI扩展的使用

yanomami_ds = ds.DSEI['Yanomami']
yanomami_polygon = ds.DSEI.get_polygon('Yanomami')

列出所有DSEI

ds.DSEI.DSEIs

项目详情


下载文件

下载适用于您平台的应用文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

satellite_weather_downloader-1.10.1.tar.gz (8.2 MB 查看哈希值)

上传日期 源代码

构建分发

satellite_weather_downloader-1.10.1-py3-none-any.whl (8.3 MB 查看哈希值)

上传日期 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面