Functions and types

TravellingSailorProblem.DestinationType
Destination{NF} <: SpeedyWeather.AbstractCallback

A callback structure representing a geographical destination that particles can reach. Tracks when particles arrive within a specified radius of the destination. Fields are

  • lonlat::Tuple{NF, NF} where NF: [OPTION] Longitude and latitude coordinates of the destination

  • name::Symbol: [OPTION] Name of the destination

  • radius::Any: [OPTION] Radius (in meters) around the destination for arrival detection

  • verbose::Bool: [OPTION] Whether to print messages when destination is reached

  • reached::Bool: [DERIVED] Flag indicating whether the destination has been reached

  • particle::Int64: [DERIVED] Index of the particle that reached the destination

  • closest_distance::Any: [DERIVED] Minimum distance from any particle to the destination

  • closest_particle::Int64: [DERIVED] Index of the particle currently closest to the destination

  • points::Int64: [DERIVED] Points given for this destination (computed during evaluation)

source
TravellingSailorProblem.DestinationMethod
Destination(
    SG::SpectralGrid;
    kwargs...
) -> Destination{<:AbstractFloat}

Constructor for creating a Destination with a specific number format (NF) from a SpectralGrid.

source
Base.showMethod
show(
    io::IO,
    ds::NTuple{N, var"#s13"} where var"#s13"<:Destination
)

Pretty-print a tuple of destinations on separate lines.

source
RingGrids.globeMethod
globe(particle_tracker::ParticleTracker; ...) -> Figure
globe(
    particle_tracker::ParticleTracker,
    destinations::Union{Nothing, NTuple{N, var"#s8"} where var"#s8"<:Destination};
    kwargs...
) -> Figure

Make destinations and particle_tracker arguments commutative by calling the main implementation with swapped argument order.

source
RingGrids.globeMethod
globe(; ...) -> Figure
globe(
    destinations::Union{Nothing, NTuple{N, var"#s3"} where var"#s3"<:Destination};
    ...
) -> Figure
globe(
    destinations::Union{Nothing, NTuple{N, var"#s2"} where var"#s2"<:Destination},
    particle_tracker::Union{Nothing, ParticleTracker};
    background,
    coastlines,
    shadows,
    track_labels,
    track_numbers,
    legend,
    altitude_destinations,
    altitude_tracks,
    altitude_shadows,
    perspective,
    altitude,
    size,
    greyscale_transform
) -> Figure

Create a 3D interactive or static globe visualization of particle tracks and destinations.

Displays a spherical Earth background with particle trajectories and destination markers. Destinations are shown as hexagons (unreached) or filled (reached), with the first letter as a marker. Particle tracks are drawn as 3D lines with optional shadows and track endpoints.

Arguments

  • destinations::NTuple{N, <:Destination}: Tuple of destination objects to display
  • particle_tracker::Union{Nothing, ParticleTracker}: Optional particle trajectory data from NetCDF file
  • background::Bool: Show Earth background image (default: true)
  • coastlines::Bool: Draw coastlines (default: true)
  • interactive::Bool: Enable interactive 3D globe (GlobeAxis) or static orthographic view (default: true)
  • shadows::Bool: Draw ground shadows for tracks and destinations (default: true)
  • track_labels::Bool: Show particle endpoint markers and numbers (default: true)
  • track_numbers::Bool: Display particle numbers at endpoints (default: true)
  • legend::Bool: Show legend with reached/missed status (default: true)
  • altitude_tracks: Altitude offset for particle tracks in meters (default: 200000)
  • altitude_destinations: Altitude offset for destination markers in meters (default: 200000)
  • perspective: View center as (lon, lat) tuple or Destination object (default: (0, 0))
  • altitude: Camera altitude for interactive view in meters (default: 1.2e7)
  • size::Tuple: Figure size as (width, height) in pixels (default: (500, 500))
  • return_figure::Bool: Return figure object instead of displaying (default: false)

Returns

  • Figure if return_figure=true, otherwise displays the figure and returns nothing
source
SpeedyWeather.add!Method
add!(
    model::AbstractModel,
    destinations::Destination...
) -> Any

Add one or more destinations as callbacks to a model.

source
SpeedyWeather.add!Method
add!(
    callbacks::Dict{Symbol, SpeedyWeather.AbstractCallback},
    destinations::Destination...
)

Add one or more destinations to the callbacks dictionary using their name as the key.

source
SpeedyWeather.callback!Method
callback!(
    destination::Destination,
    progn::PrognosticVariables,
    diagn::DiagnosticVariables,
    model::AbstractModel
)

Main callback function that checks if any particle has reached the destination. Tracks closest particle and deactivates it when reaching the destination.

source
TravellingSailorProblem.childrenMethod
children(; ...) -> Tuple{Vararg{Destination{Float32}}}
children(n; ...) -> Tuple
children(n, ::Type{T}; kwargs...) -> Tuple

Create a tuple of n destinations with predefined locations and names from PLACES and NAMES.

source