Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
junzis committed Oct 29, 2023
1 parent a7ba839 commit 66b9b51
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# MetMesh
# Fast Meteo

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

```
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"],
"latitude": [40.3, 42.5],
"longitude": [4.2, 6.6],
"altitude": [25_000, 30_000],
}
)
# obtain weather information
flight_new = mmg.interpolate(flight)
```

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.

```
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.

```
from fastmeteo import Client
client = Client()
# send the flight and receive the new DataFrame
flight_new = client.submit_flight(flight)
```
2 changes: 1 addition & 1 deletion test/test_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pandas as pd
from metmesh import Grid
from fastmeteo import Grid

mmg = Grid(local_store="/tmp/era5-zarr")

Expand Down
2 changes: 1 addition & 1 deletion test/test_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas as pd

from metmesh import Client
from fastmeteo import Client

if __name__ == "__main__":
flight = pd.DataFrame(
Expand Down

0 comments on commit 66b9b51

Please sign in to comment.