Skip to main content

GLODAP downloader and importer in Python

Project description

glodap

Tests pypi badge Conda Version License: GPL v3 Ruff

Download GLODAP datasets and import them as pandas DataFrames.

Install

pip install glodap
conda install conda-forge::glodap

Use

The functions arctic, atlantic, indian, pacific and world import the latest version of the GLODAP dataset for the corresponding region, first downloading the file if it's not already saved locally. For example:

import glodap
df_atlantic = glodap.atlantic()

Files are saved by default at "~/.glodap", but this can be controlled with the kwarg gpath. See the function docstrings for more information.

The columns of the imported DataFrames can be passed directly into PyCO2SYS v2:

import PyCO2SYS as pyco2
co2s_atlantic = pyco2.sys(data=df_atlantic, nitrite=None)

Note nitrite=None - this means PyCO2SYS will ignore the "nitrite" column, which is necessary because while PyCO2SYS includes the nitrite-nitrous acid equilibrium, its equilibrium constant is valid only under lab conditions.

Because of how the columns are named, when passing the DataFrame directly to PyCO2SYS as above, the system will be solved from DIC and alkalinity, not pH.

The columns are the same as in the original GLODAP .mat files available from glodap.info, except:

  • The "G2" at the start of each parameter has been removed.
  • Flags end with "_f" instead of just "f".
  • There is a "datetime" column, which combines the "year", "month" and "day" but NOT the "hour" and "minute" (because some of these are missing).

The functions download and read can also be used for finer control, such as specifying a particular GLODAP version rather than using the latest one. See their function docstrings for more information.

The .mat files from the GEOMAR mirrors are downloaded, and the SHA256 checksum of each downloaded file is checked before the file is written to disk.

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

glodap-0.3.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

glodap-0.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file glodap-0.3.tar.gz.

File metadata

  • Download URL: glodap-0.3.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for glodap-0.3.tar.gz
Algorithm Hash digest
SHA256 85b4e3769652f074368e4e002990d7214f5d86a7c47f790bf655fd0392b608cb
MD5 a9d8783a2718c49b7e9b9d182035c0ad
BLAKE2b-256 d0a363a62aca8a982be623c6b32686683efcce66343ab1df97e0bc46a4875037

See more details on using hashes here.

File details

Details for the file glodap-0.3-py3-none-any.whl.

File metadata

  • Download URL: glodap-0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for glodap-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d71e3944153a5bdce86a5ae834ce83c0ddd9fe829e4526d5016947bbcc7fb1b2
MD5 1ad049939603c1dad545bdacc79d1754
BLAKE2b-256 13ada29eb63849368301d3389988043bf856a78807a603ca28330cc1544dde6c

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