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. Directly rerunning the script skips files already present on PyPI and continues uploading the remaining archives.

Standard atmosphere datasets

xr_atmos_dataset builds any supported combination of wind, 2 metre air temperature, per-period precipitation, mean sea-level pressure, visibility, entire-atmosphere total cloud cover, hourly sunshine duration, 2 metre relative humidity, surface wind gust, 2 metre dew point temperature, and 2 metre apparent temperature. The single-element xr_wind_dataset, xr_air_temperature_dataset, xr_precipitation_dataset, and xr_slp_dataset interfaces use the same metadata and encoding path. Integer packing is enabled by default and can be disabled with _COMPRESS=False when a caller needs to apply it after merging. _TIME_type="str" writes a NetCDF string variable, while "char" writes a fixed character matrix with a DateStr dimension. write_netcdf uses zlib by default; write_netcdf(ds, path, compression="zstd") selects standard HDF5 Zstd filter 32015 with byte shuffle and fails clearly when its reader/writer plugin is unavailable.

run_storage_fallback executes an explicit storage method or an ordered AUTO method list. Applications provide their own operations and recoverable error boundary, so input staging and output publication can share fallback policy without sharing incompatible lifecycle code.

open_netcdf_input adds a shared single-file NetCDF reader for direct, local SSD, memory, named-file, and Linux O_TMPFILE modes. For xarray.open_mfdataset, stage_netcdf_inputs preserves input order while copying through a bounded worker pool and removes only its own staged files when the context exits.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alaea-2.6.3.tar.gz (105.5 kB view details)

Uploaded Source

Built Distribution

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

alaea-2.6.3-py3-none-any.whl (104.6 kB view details)

Uploaded Python 3

File details

Details for the file alaea-2.6.3.tar.gz.

File metadata

  • Download URL: alaea-2.6.3.tar.gz
  • Upload date:
  • Size: 105.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for alaea-2.6.3.tar.gz
Algorithm Hash digest
SHA256 b243098571ee2b661111b3d660a6b02b0cd4601312573d51634f510727ca5a42
MD5 8ae11a44241fa09b39153585dde9fab4
BLAKE2b-256 3939441cbfa9e4ef043f10302f026af01a9732552cc6c4016a5d42eb33f9ea2c

See more details on using hashes here.

File details

Details for the file alaea-2.6.3-py3-none-any.whl.

File metadata

  • Download URL: alaea-2.6.3-py3-none-any.whl
  • Upload date:
  • Size: 104.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for alaea-2.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4052d014d2f5975b3cf7ea8e431736c264695d3dde6a58815fa18691363082a5
MD5 4c9bdd52a63536e1714c8a6dc7378319
BLAKE2b-256 2630ef3d3031193ecedb73875ff434ae93ae11f1e2d560f31557a91876c87c1a

See more details on using hashes here.

Release history Release notifications | RSS feed

2.6.5

2 files

2.6.4

2 files

This release

2.6.3 This release

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

2 files

2.5.9

2 files

2.5.8

2 files

2.5.7

2 files

2.5.6

2 files

2.5.5

2 files

2.5.4

2 files

2.5.3

2 files

2.5.2

2 files

2.5.1

2 files

2.5.0

2 files

2.4.4

2 files

2.4.3

2 files

2.4.2

2 files

2.4.1

2 files

2.4.0

2 files

2.3.9

2 files

2.3.8

2 files

2.3.7

2 files

2.3.6

2 files

2.3.5

2 files

2.3.4

2 files

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.3

2 files

2.2

2 files

2.1

2 files

2.0

2 files

1.0.2

2 files

1.0.0

2 files

0.0.1

2 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