Skip to main content

The modules available in this package are designed to capture and proccess satellite data from Copernicus

Project description

Satellite Weather Downloader

Xarray Copernicus
Xarray Copernicus

SWD is a system for downloading, transforming and analysing Copernicus weather data using Xarray. It consists in two major apps, satellite_downloader and satellite_weather. downloader is responsible for extracting NetCDF4 files from Copernicus API, and the weather implements Xarray extensions for transforming and visualizing the files.

Installation

The app is available on PYPI, you can use the package without deploying the containers with the command in your shell:

$ pip install satellite-weather-downloader

Requirements

For downloading data from Copernicus API, it is required an account. The credentials for your account can be found in Copernicus' User Page, in the API key section. User UID and API Key will be needed in order to request data. Paste them when asked in satellite_downloader connection methods.

Notes

Python Versions = [3.10, 3.11]

Version 1.X includes only methods for Brazil's data format and cities.

Create requests via Interactive shell

Since SWT version 1.5, it is possible to create dynamic requests using the interactive python shell or via method call:

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.

Extract Brazil NetCDF4 file from a date range

from satellite import downloader

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

Load the dataset

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

Usage of copebr extension

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

It is also possible to create a dataframe directly from the National-wide dataset:

br_dataset.copebr.to_dataframe(rio_geocode)

All Xarray methods are extended when using the copebr extension:

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

Usage of DSEI extension

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

List all DSEIs

ds.DSEI.DSEIs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

satellite_weather_downloader-1.9.6.tar.gz (8.2 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file satellite_weather_downloader-1.9.6.tar.gz.

File metadata

  • Download URL: satellite_weather_downloader-1.9.6.tar.gz
  • Upload date:
  • Size: 8.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.8.0-76060800daily20240311-generic

File hashes

Hashes for satellite_weather_downloader-1.9.6.tar.gz
Algorithm Hash digest
SHA256 48e16e920a315473bd1f39201d5148336d5764d6bd8ef2587e6fa5a4cb4dc215
MD5 2a48aaed93640522eb5bc83001c13e03
BLAKE2b-256 0e0e95157ce6ea6bb718e9a414e8471b670cf15261b50aaa85fdbdf8f5333e56

See more details on using hashes here.

File details

Details for the file satellite_weather_downloader-1.9.6-py3-none-any.whl.

File metadata

File hashes

Hashes for satellite_weather_downloader-1.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8b5676e194dcfc913e913f12000dae2fd70f9d2c5b17ab95127e4254b6ebf12e
MD5 879fd295a642754f188cbfac7b30764c
BLAKE2b-256 8347356feaf05a138f8d40c43261d37ac8448a38e9098068eb401c6ca8a47dc7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page