Skip to main content

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.drop(columns="fco2"), nitrite=0)

Note nitrite=0 - 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, and because we dropped the "fco2" column, when passing the DataFrame directly to PyCO2SYS as above, the system will be solved from DIC and alkalinity, not pH nor fCO2.

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.

Citation

If using GLODAP data, please cite the paper corresponding to the version you used:

Metadata

Release files for glodap 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glodap 0.4
File Size Uploaded
glodap-0.4.tar.gz 21.6 kB Details

Release files / glodap-0.4.tar.gz

Download URL glodap-0.4.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d66a3ee96f458733a5c07df0558bb74a0e6f6ff632e0a87a56d936626a96f3cc
BLAKE2b-256 checksum
How to use checksums
b7a6341f0566808551237225d007b2a1ab00e2524d810497527f0952e23da6dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.4 This release

1 release file

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page