Skip to main content

Predict tropical cyclone intensity using pre-trained Input-Output Hidden Markov Models

Project description

pepc-global-intensity

Predict tropical cyclone intensity using pre-trained Input-Output Hidden Markov Models.

Installation

pip install --upgrade pepc-global-intensity

Usage

import pandas as pd
from pepc_global_intensity import predict_intensity

# DataFrame for a single storm with required columns:
#   step, time, year, mode, ILD, grd, ut, pi, shr, rh600,
#   ocean, ocean_next, mean_stl1, mean_fsr, mean_swvl1
df = pd.DataFrame({
    "step":       [0, 1, 2],
    "time":       pd.to_datetime(["2000-07-01", "2000-07-01 06:00", "2000-07-01 12:00"]),
    "year":       [2000, 2000, 2000],
    "mode":       ["ocean", "ocean", "ocean"],
    "ILD":        [50.0, 50.0, 50.0],
    "grd":        [1e-4, 1e-4, 1e-4],
    "ut":         [5.0, 5.0, 5.0],
    "pi":         [70.0, 70.0, 70.0],
    "shr":        [10.0, 10.0, 10.0],
    "rh600":      [0.7, 0.7, 0.7],
    "ocean":      [True, True, True],
    "ocean_next": [True, True, True],
    "mean_stl1":  [0.0, 0.0, 0.0],
    "mean_fsr":   [0.0, 0.0, 0.0],
    "mean_swvl1": [0.0, 0.0, 0.0],
})

result = predict_intensity(
    basin="NA",
    df=df,
    experiment="historical",
    model="ACCESS-ESM1-5",
    variant="r1i1p1f1",
    seed=42,
)

Parameters

  • basin: str — one of "AS", "BoB", "WNP", "ENP", "NA", "SI", "SP"
  • df: pandas.DataFrame — pre-prepared data for a single storm with columns:
    • step — track point index within the storm (0 at genesis)
    • time — timestamp
    • year — calendar year
    • mode"ocean", "land", or "not"
    • ILD — isothermal layer depth (m)
    • grd — ocean temperature gradient
    • ut — storm translation speed (m/s)
    • pi — potential intensity (kt)
    • shr — wind shear (m/s)
    • rh600 — relative humidity at 600 hPa
    • ocean — whether the current point is over ocean
    • ocean_next — whether the next point is over ocean
    • mean_stl1 — land-weighted soil temperature
    • mean_fsr — land-weighted fraction of sunshine radiation
    • mean_swvl1 — land-weighted soil water volume
  • experiment: str"historical" or "ssp585"
  • model: str — CMIP6 model name (used for ssp585 upper-bound schedule lookup)
  • variant: str — CMIP6 variant label (used for ssp585 upper-bound schedule lookup)
  • seed: int or None — random seed for reproducibility

Returns

  • pandas.DataFrame — copy of the input with added columns: pre_wind, pre_delta_wind_b, pre_delta_wind_f, pre_ocn, state

Model Weights

Model weights (HMM parameters and land-mode regression coefficients) are bundled with the package.

Project details


Download files

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

Source Distribution

pepc_global_intensity-0.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

pepc_global_intensity-0.1.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file pepc_global_intensity-0.1.0.tar.gz.

File metadata

  • Download URL: pepc_global_intensity-0.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for pepc_global_intensity-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c6736f6b26237576bf4e28d8ac1953be61c00ce13e7dccfd7a22b2239a94c1de
MD5 bf3277a651ce793115640100427edf76
BLAKE2b-256 eb5231168d3295171eec8f3972d9b79652e84a9d5342731d84674ccceb1fd307

See more details on using hashes here.

File details

Details for the file pepc_global_intensity-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pepc_global_intensity-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5038c20607f60ec9cfa303f1793c6876a248e51fb77b4e9177f32477287570c
MD5 f4c3783c49cb24040481cb2f03dd2331
BLAKE2b-256 e5cda4bd10cb87150c0b50775e2a6c7762ab57472567f7e97cd971c9ebd83a27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page