Metadata-Version: 2.1
Name: fastmeteo
Version: 0.1
Summary: Fast interpolation for ERA5 data with Zarr
License: GNU Lesser General Public License v3 (LGPLv3)
Author: Junzi Sun
Author-email: j.sun-1@tudelft.nl
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: click
Requires-Dist: dask
Requires-Dist: fastapi
Requires-Dist: fsspec
Requires-Dist: gcsfs
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: uvicorn
Requires-Dist: xarray
Requires-Dist: zarr
Description-Content-Type: text/markdown

# Fast Meteo

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


## Install



## Usage
Once the library is installed, you ca get the weather information for a given flight or position with the following code, which the basic information of time, latitude, longitude, and altitude.


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

