Skip to main content

Alaea

Installation

pip3 install Alaea

KML 转 Shapefile 是可选功能,需要 GDAL:

pip3 install 'Alaea[gdal]'

Release

Direct execution cleans old artifacts, builds the package, uploads it with Twine, and cleans the artifacts after a successful upload:

./run_twine.py

Use --repository NAME to select a configured Twine repository. A failed build does not attempt upload; a failed upload retains the new archives for diagnosis and retry.

Unified spatial interpolation

s2s, g2s, s2g, and g2g use the same argument order. s means scattered points and g means a grid. Grid coordinates may be one-dimensional longitude/latitude axes or matching two-dimensional coordinate arrays.

import numpy as np
from Alaea.exutils import g2s, s2g

lon = np.array([120.0, 121.0])
lat = np.array([30.0, 31.0])
value = np.array([[1.0, 2.0], [3.0, 4.0]])

point_value = g2s(lon, lat, value, 120.5, 30.5)

station_lon = np.array([120.0, 121.0, 120.0, 121.0])
station_lat = np.array([30.0, 30.0, 31.0, 31.0])
station_value = np.array([1.0, 2.0, 3.0, 4.0])
grid_value = s2g(station_lon, station_lat, station_value, lon, lat)

All four functions accept method="linear", method="nearest", method="cubic", or method="idw". IDW also accepts neighbors (default 8) and power (default 2). Data may have leading dimensions such as (time, lat, lon) or (time, point); these dimensions are preserved in the result.

Coastline filling

from Alaea.baysalt.erosion_coastline import erosion_cal_id, erosion_via_id

weight = erosion_cal_id(lon, lat, value, k=4, judge_num=1, method='np.nan')
filled = erosion_via_id(weight, value)

method may be np.nan, nc.mask, or txt.mask. The input used to calculate weights must be two-dimensional; applying weights supports any data whose last two dimensions are latitude and longitude.

Legacy file-generation helpers remain available from their explicit modules, for example Alaea.exutils.Interp.Interp_g2s.Grid2Sca, but are no longer re-exported from Alaea.exutils; new interpolation code should use the four unified functions above.

Metadata

Release files for Alaea 2.5.7

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

Source distribution (sdist)

Source distribution for Alaea 2.5.7
File Size Uploaded Provenance Actions
alaea-2.5.7.tar.gz 77.4 kB Without provenance Details for alaea-2.5.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Alaea 2.5.7
File Interpreter ABI Platform Actions
alaea-2.5.7-py3-none-any.whl Python 3 none any Details for alaea-2.5.7-py3-none-any.whl

Total release size: 162.0 kB

Release files / alaea-2.5.7.tar.gz

Download URL alaea-2.5.7.tar.gz
Size 77.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a5048e57c691ecd705ad8fe0688d9b128e077c17752cc73e3d50060eaccafb0f
BLAKE2b-256 checksum
How to use checksums
434b2aa514bb6cddaa6a87e481ade0bb034ad9f31bb636a5d183dda410b0959f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / alaea-2.5.7-py3-none-any.whl

Download URL alaea-2.5.7-py3-none-any.whl
Size 84.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6811eb5842ae4737a5d7afbf8c3f9266446b9f60b477e3552488d6f4702ea4e5
BLAKE2b-256 checksum
How to use checksums
cf7c4b78cfcc839f6f9da1b3245e061dacfdb56cc9c6824ef49361a27879a080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for Alaea 2.5.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.5.7 This release

2 release files No provenance

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