GLODAP downloader and importer in Python
Project description
glodap
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 are renamed so that they 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 PyCO2SYS includes the nitrite-nitrous acid
equilibrium but its equilibrium constant is valid only under lab conditions.
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). -
For compatibility with PyCO2SYS:
"tco2"=>"dic""talk"=>"alkalinity""phts25p0"=>"ph_lab""phtsinsitutp"=>"ph_insitu"
Therefore when passing the DataFrame directly to PyCO2SYS as in the example above, the system will be solved from DIC and alkalinity, not pH.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glodap-0.1.tar.gz.
File metadata
- Download URL: glodap-0.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf551530ba98b03f1b1cd09134aae56c79def1dd27bf731a063ad78e454551e
|
|
| MD5 |
4c1b1a7d9947c357f68ff02a82d6e542
|
|
| BLAKE2b-256 |
0e0ceca5b394d28ef1498fd97aac2af8c1ae9ab7379893976ad44033a0bbcf2d
|
File details
Details for the file glodap-0.1-py3-none-any.whl.
File metadata
- Download URL: glodap-0.1-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
788174f3274028a52802dd69e91352ac8fd6c33731a5edf6c48acb8dc13f13f4
|
|
| MD5 |
609312f3096d94835faa90234ccb861d
|
|
| BLAKE2b-256 |
8b4af9b6dbaab23ef586499ce68b617bdd9a34d444621d869e79795619124b15
|