Skip to content

Commit

Permalink
update instuctions
Browse files Browse the repository at this point in the history
  • Loading branch information
junzis committed Oct 29, 2023
1 parent 66b9b51 commit 97b60c4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@

A super-fast Python package to obtain meteorological parameters for your flight trajectories.


## Install

```
# stable version
pip install fastmeteo
# development version
pip install git+https://github.com/junzis/fastmeteo
```



## Usage

### Local mode

You can get the weather information for a given flight or position with the following code, which the basic information of time, latitude, longitude, and altitude.


```python
import pandas as pd
from fastmeteo import Grid

# define the location for local store
mmg = Grid(local_store="/tmp/era5-zarr")


flight = pd.DataFrame(
{
"timestamp": ["2021-10-12T01:10:00", "2021-10-12T01:20:00"],
Expand All @@ -22,15 +43,17 @@ flight = pd.DataFrame(
flight_new = mmg.interpolate(flight)
```

### Server-client mode

When running the tool in a server-client mode. The following script can be used to start a FastAPI service on the server, which handles the flight date request, obtaining Google ARCO data if the partition is not on the server, perform the interpolation of weather data, and return the final data to the client.

```
```sh
fastmeteo-serve --local-store /tmp/era5-zarr
```

At the client side, the following code can be used to submit and get the process flight with meteorology data.

```
```python
from fastmeteo import Client

client = Client()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "fastmeteo"
description = "Fast interpolation for ERA5 data with Zarr"
version = "0.1.0"
version = "0.1"
authors = ["Junzi Sun <[email protected]>"]
license = "GNU Lesser General Public License v3 (LGPLv3)"
readme = "README.md"
Expand Down

0 comments on commit 97b60c4

Please sign in to comment.