Skip to main content

Facilitate OPeNDAP download

Project description

OPeNDAP downloader

Library to facilitate data downloads from OPeNDAP services configured with a file size limitation.

This module will check if your requested file has a size under or above the file size limitation. If the size is under this limit, the file will be downloaded. Otherwise, the module will split the file (over time coordinates) in many files respecting the size limitation and download them. If output-file option is given, all the downloaded files will be concatenated into one and then be removed.

Installation

With pip:

pip install opendap-downloader

Usage

Command Line Interface (CLI)

Check-out usage and examples:

> opendap-downloader --help
Usage: opendap_downloader.py [OPTIONS]

  Downloads OPeNDAP dataset as NetCDF files taking into account the server
  data query limit.

  Example:

    opendap-downloader --dataset-url https://nrt.cmems-du.eu/thredds/dodsC/METOFFICE-GLO-SST-L4-NRT-OBS-SST-V2 --variable analysed_sst --variable sea_ice_fraction --temporal-subset 2021-01-01 2021-01-02 --geographical-subset 0.0 0.1 0.0 0.1

    opendap-downloader -u https://nrt.cmems-du.eu/thredds/dodsC/METOFFICE-GLO-SST-L4-NRT-OBS-SST-V2 -v analysed_sst -v sea_ice_fraction -t 2021-01-01 2021-01-02 -g 0.0 0.1 0.0 0.1  

Options:
  -u, --dataset-url TEXT          The full OPeNDAP dataset URL  [required]
  -v, --variable TEXT             Specify dataset variables
  -g, --geographical-subset <FLOAT RANGE FLOAT RANGE FLOAT RANGE FLOAT RANGE>...
                                  The geographical subset as minimal latitude,
                                  maximal latitude, minimal longitude and
                                  maximal longitude
  -t, --temporal-subset <DATETIME DATETIME>...
                                  The temporal subset as start datetime and
                                  end datetime
  -d, --depth-range <FLOAT RANGE FLOAT RANGE>...
                                  The depth range in meters, if depth is a dataset
                                  coordinate
  -o, --output-path PATH          The destination path for the downloaded
                                  files. Default is the current directory
                                  [required]
  -f, --output-file PATH          Concatenate the downloaded data in the given
                                  file name (under the output path)
  -l, --login TEXT
  --password TEXT
  --help

Contribute

Follow these instructions.

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

opendap-downloader-0.2.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opendap_downloader-0.2.0-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file opendap-downloader-0.2.0.tar.gz.

File metadata

  • Download URL: opendap-downloader-0.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 CPython/3.9.2

File hashes

Hashes for opendap-downloader-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f51ea88b54b553f9d96701120584d5691fe6d77bf2993ead9416856f0561f391
MD5 da9f07e504055c4a4c892d21497b3161
BLAKE2b-256 d649cd0b1d7d5f244844c1146be1eb712365c914d20be59c53c38900103be63f

See more details on using hashes here.

File details

Details for the file opendap_downloader-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for opendap_downloader-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 525e38d871ed8a7a2d61daaa15dab4a65a598a93eb699d47cc1bcfdb520c1174
MD5 8f6ef14b2ba0f1373931f64ca84745b9
BLAKE2b-256 3e99d634512c007f1cf63d188a4cf4d605cd972ccb3e70fa00c1a9309d05e20b

See more details on using hashes here.

Supported by

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