---
jupytext:
  text_representation:
    extension: .md
    format_name: myst
    format_version: 0.12
    jupytext_version: 1.7.1
kernelspec:
  display_name: Python 3
  language: python
  name: python3
platform: ATR
flight_id: ATR-20240826b
takeoff: "2024-08-26 18:00:00Z"
landing: "2024-08-26 21:30:00Z"
departure_airport: GVAC
arrival_airport: GVAC
crew:
  - name: D Duchanoy
    job: Pilot
  - name: G Seurat
    job: Pilot
  - name: T André
    job: Mechanics
  - name: M Cluzeau
    job: Expé Principal
  - name: B Celou
    job: Expé 
  - name: Louis Jaffeux
    job: PI
  - name: S Bounissou
    job: LNG
  - name: F Lally
    job: aWALI
  - name: P Coutris
    job: Microphys 1
  - name: G Fevre
    job: Microphys 2
  - name: J Delanoë
    job: RASTA
  - name: B McKim
    job: BASTA
categories: []
orphan: true
---

{logo}`MAESTRO`

# Flight plan - {front}`flight_id`

```{badges}
```

## Flight plan
* The flight is planned to take off at {front}`takeoff` UTC and land at {front}`landing` UTC.
* Flight track designed to sample conditions behind the African Easterly Wave Trough
* Previous flight followed the same track and sampled conditions ahead of the African Easterly Wave Trough (the trough passed by in-between flights)
* NOTE: flight plan was modified in-flight to sample deep convection further to the south of the planned waypoints


```{code-cell} python3
:tags: [hide-input]
from orcestra.flightplan import sal, bco, LatLon, IntoCircle, path_preview, plot_cwv
from datetime import datetime
import intake

cat = intake.open_catalog("https://tcodata.mpimet.mpg.de/internal.yaml")

date_time = datetime(2024, 8, 23, 12, 0, 0)
date_time_str = date_time.strftime('%Y-%m-%d')
flight_time = datetime(2024, 8, 26, 12, 0, 0)

radius = 70e3 # units: km

airport = sal
wp1 = LatLon(lat=16.766, lon=-22.749, label='wp1')
wp2 = LatLon(lat=15.618, lon=-21.242, label='wp2')

path = [airport, wp1, wp2, wp1, airport]

ds = cat.HIFS(refdate=date_time_str, reftime=date_time.hour).to_dask()
cwv_flight_time = ds["tcwv"].sel(time=flight_time, method = "nearest")

ax = path_preview(path)
ax.set_extent([-24, -21, 14.8, 17])

plot_cwv(cwv_flight_time)


```
![Flight Levels](./LEVELS-ATR-20240826a.jpg)

<!-- * SAFIRE Flight Plan submitted to Air Traffic Control (ATC)

![Page 1](./SAFIRE-ATR-20240813b.png) -->

```{code-cell} python3
:tags: [hide-input]
import pandas as pd
from dataclasses import asdict

pd.DataFrame.from_records(map(asdict, path)).set_index("label")
```

## Crew

```{crew}
```