Skip to content

Commit

Permalink
📝 add getting started in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
perillaroc committed Nov 12, 2024
1 parent 27bf5e8 commit 15420fa
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,45 @@
![GitHub License](https://img.shields.io/github/license/cemc-oper/cedarkit-comp)
![GitHub Action Workflow Status](https://github.com/cemc-oper/cedarkit-comp/actions/workflows/ci.yaml/badge.svg)

气象数据计算库
A calculation tool for meteorological data.

## 安装
## Install

Install using pip:

```bash
pip install cedarkit-comp
```

## 使用
Or download the latest source code from GitHub and install manually.

## Getting started

Load data from file:

```py
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`:

```py
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)
)
```

## LICENSE

Expand Down

0 comments on commit 15420fa

Please sign in to comment.