Flight plan - HALO-20240924a

Contents

Flight plan - HALO-20240924a#

ec_under ec_track c_north c_mid c_south c_atr

Crew#

Job

Name

PI

Anna Weber

WALES

Georgios Dekoutsidis

HAMP

Luca Schmidt

Dropsondes

Nina Robbins

Smart/VELOX

Kevin Wolf

SpecMACS

Tobias Kölling

Flight Documentation

Antonio Ciadamidaro

Ground contact

Tobias Zinner, Julia Windmiller

Flight plan#

from datetime import datetime
import orcestra.sat
from orcestra.flightplan import tbpb, bco, point_on_track, LatLon, IntoCircle, FlightPlan

# Some fixed coordinates

lon_min, lon_max, lat_min, lat_max = -65, -5, -5, 25

airport = tbpb

radius = 72e3*1.852

# Define dates for flight

flight_time   = datetime(2024, 9, 24, 12, 0, 0)
flight_index = f"HALO-{flight_time.strftime('%Y%m%d')}a"

# Load satellite tracks 

ec_fcst_time  = "2024-09-18"
ec_track = orcestra.sat.SattrackLoader("EARTHCARE", ec_fcst_time, kind="PRE",roi="BARBADOS") \
    .get_track_for_day(f"{flight_time:%Y-%m-%d}")\
    .sel(time=slice(f"{flight_time:%Y-%m-%d} 14:00", None))

# Use PACE_loader once only

pace_track = orcestra.sat.pace_track_loader() \
    .get_track_for_day(f"{flight_time:%Y-%m-%d}")

pace_track = pace_track.where(
    (pace_track.lat >lat_min)&
    (pace_track.lat <lat_max)&
    (pace_track.lon >-60)&
    (pace_track.lon <-30), 
    drop = True) \
    .sel(time=slice(f"{flight_time:%Y-%m-%d} 11:00", f"{flight_time:%Y-%m-%d} 21:00"))
Hide code cell source
# Create elements of track

c_west_in = LatLon(11.8,-56.0).assign(label = "c_west_in")
c_east_out = LatLon(10,-50).assign(label = "c_east_out")

c_west = c_west_in.towards(c_east_out, distance = radius).assign(label = "c_west")
c_east = c_west.towards(c_east_out, distance = 2*radius+radius).assign(label = "c_east")

ec_north = point_on_track(ec_track,lat= 16.50).assign(label = "ec_north") 
ec_south = point_on_track(ec_track,lat=  12.50).assign(label = "ec_south")
ec_under = point_on_track(ec_track, lat= 14.50, with_time=True).assign(label = "ec_under", note = "meet EarthCARE")

#ec_north_north = point_on_track(ec_track,lat= 16.50).assign(label = "ec_north") 
#c_pirouette = ec_north.towards(ec_north_north, distance = radius *0.2).assign(label = "c_pirouette")
c_pirouette = (c_west.towards(c_east_out, distance = radius)).towards(ec_north, fraction = 0.5).assign(label = "c_pirouette")

# Define Flight Paths

waypoints = [
     airport.assign(fl=0),
     c_west_in.assign(fl = 410),
     IntoCircle(c_west.assign(fl=410), radius, -360),
     IntoCircle(c_east.assign(fl=430), radius, -360), 
     IntoCircle(c_east.assign(fl=430), radius, -360), 
     IntoCircle(c_west.assign(fl=450), radius, -360), 
     IntoCircle(c_pirouette.assign(fl=450), radius*0.3, -360),
     ec_north.assign(fl=450),  
     ec_under.assign(fl=450),
     ec_south.assign(fl=450),
     c_west_in.assign(fl = 450),
     IntoCircle(c_west.assign(fl=450), radius, -360), 
     airport.assign(fl=0),
     ]

# Crew

crew = {'Mission PI': 'Anna Weber',
        'DropSondes': 'Nina Robbins',
        'HAMP': 'Luca Schmidt',
        'SMART/VELOX': 'Kevin Wolf',
        'SpecMACS': 'Tobias Kölling',
        'WALES' : 'Georgios Dekoutsidis',
        'Flight Documentation': 'Antonio Ciadamidaro',
        'Ground Support': 'Tobias Zinner, Julia Windmiller',
        }

# Plan

plan = FlightPlan(waypoints, flight_index, crew=crew, aircraft="HALO")
print(f"Flight index: {plan.flight_id}")
print(f"Take-off: {plan.takeoff_time:%H:%M %Z}\nLanding:  {plan.landing_time:%H:%M %Z}\n")
print(f"Duration: {plan.duration}\n")
Flight index: HALO-20240924a
Take-off: 11:27 UTC
Landing:  20:12 UTC

Duration: 8:45:27.077597
Hide code cell source
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import easygems.healpix as egh
import intake
from orcestra.flightplan import plot_cwv, plot_path

forecast_overlay = True

plt.figure(figsize = (14, 8))
ax = plt.axes(projection=ccrs.PlateCarree())
ax.set_extent([lon_min, lon_max, lat_min, lat_max], crs=ccrs.PlateCarree())
ax.coastlines(alpha=1.0)
ax.gridlines(draw_labels=True, dms=True, x_inline=False, y_inline=False, alpha = 0.25)

if (forecast_overlay):
    ifs_fcst_time = datetime(2024, 9, 18, 0, 0, 0)
    ds = intake.open_catalog("https://tcodata.mpimet.mpg.de/internal.yaml").HIFS(datetime = ifs_fcst_time).to_dask().pipe(egh.attach_coords)
    cwv_flight_time = ds["tcwv"].sel(time=flight_time, method = "nearest")
    plot_cwv(cwv_flight_time, levels = [48.0, 50.0, 52.0, 54.0, 56.0, 58.0, 60.0], ax=ax)
    plt.title(f"{flight_time}\n(CWV forecast issued on {ifs_fcst_time})")

plt.plot(ec_track.lon, ec_track.lat, c='k', ls='dotted')
plt.scatter(pace_track.lon, pace_track.lat, s=10, color='darkgreen')
plt.fill_betweenx(pace_track.lat, pace_track.lon,pace_track.lon+1,color='limegreen',alpha=0.2)
plt.fill_betweenx(pace_track.lat, pace_track.lon,pace_track.lon-1,color='limegreen',alpha=0.2)

plot_path(plan, ax, color="C1")
/home/runner/miniconda3/envs/orcestra_book/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_physical/ne_50m_coastline.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
../_images/4ccb527dacb0c725e0b38f692c7dec8e02e27b6495f0d85bf99f8445f925de42.png
Hide code cell source
from orcestra.flightplan import vertical_preview

vertical_preview(waypoints)
../_images/5377ad502dec89e90a49e21e6e0269a1a5e860b8763b89cb2b2004df6c3f999e.png
Hide code cell source
plan.show_details()
plan.export()
Detailed Overview:
              TBPB         N13 04.48, W059 29.55, FL000, 11:27:07 UTC, 
to            c_west_in    N11 48.00, W056 00.00, FL410, 12:01:32 UTC, 
circle around c_west       N11 27.55, W054 49.63, FL410, 12:01:32 UTC - 13:01:06 UTC, radius: 72 nm, 360° CCW, enter from west
circle around c_east       N10 24.56, W051 19.50, FL430, 13:29:25 UTC - 14:28:26 UTC, radius: 72 nm, 360° CCW, enter from west
circle around c_east       N10 24.56, W051 19.50, FL430, 14:28:26 UTC - 15:27:26 UTC, radius: 72 nm, 360° CCW, enter from west
circle around c_west       N11 27.55, W054 49.63, FL450, 15:36:48 UTC - 16:35:21 UTC, radius: 72 nm, 360° CCW, enter from east
circle around c_pirouette  N13 49.03, W055 50.43, FL450, 16:59:14 UTC - 17:16:48 UTC, radius: 22 nm, 360° CCW, enter from south east
to            ec_north     N16 30.00, W058 04.49, FL450, 17:46:17 UTC, 
to            ec_under     N14 30.00, W058 27.98, FL450, 18:02:02 UTC, meet EarthCARE
to            ec_south     N12 30.00, W058 51.19, FL450, 18:17:46 UTC, 
to            c_west_in    N11 48.00, W056 00.00, FL450, 18:40:08 UTC, 
circle around c_west       N11 27.55, W054 49.63, FL450, 18:40:08 UTC - 19:38:41 UTC, radius: 72 nm, 360° CCW, enter from west
to            TBPB         N13 04.48, W059 29.55, FL000, 20:12:34 UTC,