A calculation tool for meteorological data.
Install using pip:
pip install cedarkit-comp
Or download the latest source code from GitHub and install manually.
Load data from file:
from reki.format.grib.eccode import load_field_from_file
file_path = "/some/path/to/grib2/file"
field_h_500 = load_field_from_file(
file_path,
parameter="gh",
level_type="pl",
level=500
) / 10.
Smooth using smth9
:
from cedarkit.comp.smooth import smth9
from cedarkit.comp.util import apply_to_xarray_values
field_h_500 = apply_to_xarray_values(
field_h_500,
lambda x: smth9(x, 0.5, 0.25, False)
)
Copyright © 2024, developers at cemc-oper.
cedarkit-comp
is licensed under Apache License V2.0