Skip to main content

Extension of the original ESGF data discovery, download, replication package, esgpull

Project description

esgpull - ESGF data management utility

Rye

This respository, esgpull-plus, modifies and extends the functionality of esgpull by adding an API allowing file download via a yaml configuration file. This aims to make the download process more streamlined and improve reproducibility.

In addition - and a work in progress - esgpull-plus uses xesmf and cdo to allow immediate regridding of downloaded CMIP files onto the desired projection. This is useful given that many CMIP models - especially those dealing with ocean variables - output data on unstructured grids.

Finally - also a work in progress - esgpull-plus allows file subsetting, both for specified levels and custom subsetting to extract variable conditions at the sea floor.

Installation and setup

  1. Clone this repository

Follow instructions in XX for installation.

  1. This includes needing to run esgpull self install (as specified here).

Everything below this is copied directly from the original esgpull repository.

from esgpull import Esgpull, Query

query = Query()
query.selection.project = "CMIP6"
query.options.distrib = True  # default=False
esg = Esgpull()
nb_datasets = esg.context.hits(query, file=False)[0]
nb_files = esg.context.hits(query, file=True)[0]
datasets = esg.context.datasets(query, max_hits=5)
print(f"Number of CMIP6 datasets: {nb_datasets}")
print(f"Number of CMIP6 files: {nb_files}")
for dataset in datasets:
    print(dataset)

Features

  • Command-line interface
  • HTTP download (async multi-file)

Installation

esgpull is distributed via PyPI:

pip install esgpull
esgpull --help

For isolated installation, uv or pipx are recommended:

# with uv
uv tool install esgpull
esgpull --help

# alternatively, uvx enables running without explicit installation (comes with uv)
uvx esgpull --help
# with pipx
pipx install esgpull
esgpull --help

Usage

Usage: esgpull [OPTIONS] COMMAND [ARGS]...

  esgpull is a management utility for files and datasets from ESGF.

Options:
  -V, --version  Show the version and exit.
  -h, --help     Show this message and exit.

Commands:
  add       Add queries to the database
  config    View/modify config
  convert   Convert synda selection files to esgpull queries
  download  Asynchronously download files linked to queries
  login     OpenID authentication and certificates renewal
  remove    Remove queries from the database
  retry     Re-queue failed and cancelled downloads
  search    Search datasets and files on ESGF
  self      Manage esgpull installations / import synda database
  show      View query tree
  status    View file queue status
  track     Track queries
  untrack   Untrack queries
  update    Fetch files, link files <-> queries, send files to download...

Useful links

Contributions

You can use the common github workflow (through pull requests and issues) to contribute.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

esgpull_plus-0.0.1-py3-none-any.whl (146.2 kB view details)

Uploaded Python 3

File details

Details for the file esgpull_plus-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: esgpull_plus-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 146.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for esgpull_plus-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d70db81305823f83a03c2cfe1dd3b778ad93aab42bb4f0b261404cebdbf86ad1
MD5 200f6d2d0fdd764772a4b06c5f024e23
BLAKE2b-256 3cbe799b15c7f88f5c4694debf774234f52bbbf7ad14957f992780e3fab3a102

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