Skip to content

Commit 840cd1f

Browse files
committed
Merge branch 'develop'
2 parents f1aadb3 + 33c967d commit 840cd1f

11 files changed

Lines changed: 122 additions & 119 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to **LENAPY** will be documented in this file.
44

5+
## [1.1] - 2025-12-03
6+
- Performance improvement for climato functions
7+
- Typo correction in documentation, versions and README
8+
- Publication describing lenapy functionalities and applications to Journal of Open Source Software (JOSS)
9+
510
## [1.0] - 2025-07-15
611
Introduction of the first official release of lenapy
712

CITATION.cff

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
preferred-citation:
4+
type: article
5+
authors:
6+
- family-names: "Lecomte"
7+
given-names: "Hugo"
8+
orcid: "https://orcid.org/0000-0002-7007-4748"
9+
- family-names: "Fourest"
10+
given-names: "Sebastien"
11+
orcid: "https://orcid.org/0009-0001-3123-1026"
12+
- family-names: "Blazquez"
13+
given-names: "Alejandro"
14+
orcid: "https://orcid.org/0000-0002-7719-7468"
15+
title: "Lenapy: Enhancing xarray for multidimensional geophysical data analysis"
16+
journal: "Journal of Open Source Software"
17+
doi: "(submitted)"
18+
volume: xx
19+
issue: xx
20+
start: xxxx
21+
year: 2025

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
# Getting started with LENAPY
22

3+
[![Docs](https://img.shields.io/badge/documentation-darkgreen.svg)](https://lenapy.readthedocs.io/en/latest/)
4+
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/lenapy)](
5+
https://anaconda.org/conda-forge/lenapy)
6+
[![status](https://joss.theoj.org/papers/bee28b7acdd65939a408b1c8ce921111/status.svg)](https://joss.theoj.org/papers/bee28b7acdd65939a408b1c8ce921111)
7+
8+
`Lenapy` is a Python library designed to facilitate the processing and analysis of geophysical and climate datasets, such as those used in oceanography, geodesy, and Earth observation in general.
9+
Built on top of `xarray` and compatible with `dask`, it enables scalable workflows on multidimensional datasets using community standards for data formats (NetCDF) and metadata conventions (CF).
10+
11+
A key feature of `lenapy` is its ability to produce consistent computations of the Global Mean Sea Level components from various data sources, including satellite altimetry, GRACE/GRACE-FO, thermo-steric datasets, and climate model outputs.
12+
313
## Documentation
414

5-
Documentation can be found [here](https://lenapy.readthedocs.io/en/latest/)
15+
Documentation can be found at [https://lenapy.readthedocs.io/en/latest/](https://lenapy.readthedocs.io/en/latest/).
616

717
## Installation
818

@@ -27,7 +37,7 @@ conda --version
2737

2838
### Step 2: Install lenapy Using Conda
2939

30-
Once Conda is installed, you can install lenapy by following these steps:
40+
Once Conda is installed, you can install `lenapy` by following these steps:
3141

3242
#### 1. Create a new Conda environment (recommended):
3343
```bash
@@ -44,7 +54,7 @@ conda activate lenapy_env
4454
conda install -c conda-forge lenapy
4555
```
4656

47-
This installs lenapy and its dependencies from the conda-forge channel.
57+
This installs `lenapy` and its dependencies from the conda-forge channel.
4858

4959
## Use
5060

@@ -54,12 +64,20 @@ In your python code, simply import the library with ::
5464
import lenapy
5565
```
5666

57-
You can now use all the functionnalities of lenapy by adding the right suffixe after your Dataset or DataArray ::
67+
You can now use all the functionalities of `lenapy` by adding the right suffix after your Dataset or DataArray ::
5868
```
5969
import xarray as xr
6070
import lenapy
6171
ds = lenapy.utils.geo.rename_data(xr.tutorial.open_dataset('air_temperature'))
6272
ds.air.lngeo.mean(['latitude','longitude'],weights=['latitude']).lntime.climato().plot()
6373
```
64-
65-
74+
More complete notebooks tutorials and functions descriptions can be found in the documentation.
75+
76+
[Notebooks tutorials](https://lenapy.readthedocs.io/en/latest/tutorials.html)
77+
78+
[Functions reference](https://lenapy.readthedocs.io/en/latest/api/index.html)
79+
80+
## Contributing
81+
We welcome contributions to `lenapy`!
82+
83+
Guidelines: [https://lenapy.readthedocs.io/en/latest/contributing.html](https://lenapy.readthedocs.io/en/latest/contributing.html)

doc/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import os
99
import sys
1010

11+
import lenapy
12+
1113
__location__ = os.path.join(
1214
os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe()))
1315
)
@@ -25,7 +27,7 @@
2527
copyright = f"2023 - {curr_year}, Sebastien Fourest"
2628
author = "Sebastien Fourest"
2729
# The short X.Y version.
28-
version = "0.9"
30+
version = lenapy.__version__
2931
# The full version, including alpha/beta/rc tags.
3032
release = "First beta version on github"
3133

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Welcome to lenapy's documentation!
1313
* lenapy_time: common operations on time series (filtering, climatology, regressions, etc.)
1414
* lenapy_harmo: operations related to spherical harmonics decomposition and their projections on latitude/longitude grids
1515

16-
This library is based on the principle of class extension, i.e. functions can be applied directly to Datasets or DataArrays, by adding the extension of the module concerned and the name of the method. Ex: ds.lntime.filter(...), ds.lngeo.mean(...), de.lnocean.gohc, etc.
16+
This library is based on the principle of class extension, i.e. functions can be applied directly to Datasets or DataArrays, by adding the extension of the module concerned and the name of the method. Each module extension is an abbreviation of the module name with the logic **lenapy_xxx** abbreviate by **ds.lnxxx**. e.g.: ds.lntime.filter(...), ds.lngeo.mean(...), de.lnocean.gohc
1717

1818
Reading interfaces are implemented, enabling netcdf files to be opened with a compatible formalism from the **lenapy** library.
1919

doc/tutorials/Tutorial_lnharmo.ipynb

Lines changed: 53 additions & 62 deletions
Large diffs are not rendered by default.

lenapy/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import warnings
2+
from importlib.metadata import version as _version
23

34
from lenapy import constants, lenapy_geo, lenapy_harmo, lenapy_time
45

6+
try:
7+
__version__ = _version("lenapy")
8+
except Exception:
9+
# Local copy or not installed with setuptools.
10+
# Disable minimum version checks on downstream libraries.
11+
__version__ = "9999"
12+
513
try:
614
from lenapy import lenapy_ocean
7-
except:
15+
except Exception:
816
warnings.warn("To use lenapy_ocean, please install gsw : pip install gsw>=3.6.16")
917
import cf_xarray as cfxr
1018

lenapy/readers/gravi_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ def open_dataset(
949949

950950
# Read file with pandas, delim_whitespace for variable space delimiters
951951
data = pd.read_csv(
952-
file, delim_whitespace=True, header=None, names=col_names, engine="python"
952+
file, sep="\s+", header=None, names=col_names, engine="python"
953953
)
954954

955955
# test if gfct key then have to deal with time

lenapy/utils/geo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def rename_data(data, **kwargs):
2020
"""
2121
Standardization of coordinates names of a product.
2222
Looks for different possible names for latitude, longitude, and time, and turn them into a standardized name.
23-
Definitions are specified in setup.py and are based on standard cf attributes and units : https://cfconventions.org
23+
Definitions are based on standard cf attributes and units : https://cfconventions.org
2424
Custom names changes can also be performed with kwargs parameter.
2525
2626
Parameters

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "lenapy"
7-
version = "0.9"
8-
description = "Second beta release of lenapy on github"
7+
version = "1.1"
8+
description = "Geophysical analysis in Python with xarray"
99
readme = "README.md"
1010
authors = [
11-
{ name = "Sebastien Fourest & EMC2 team", email = "sebastien.fourest@cnes.fr" }
11+
{ name = "Sebastien Fourest & Hugo Lecomte & EMC2 team", email = "sebastien.fourest@cnes.fr" }
1212
]
1313
license = { text = "GPL-3.0" }
14-
requires-python = ">=3.7"
14+
requires-python = ">=3.11"
1515
dependencies = [
1616
"matplotlib>=3.6",
1717
"xesmf>=0.8.2",

0 commit comments

Comments
 (0)