Functions and types
TravellingSailorProblem.DESTINATION_RADIUSTravellingSailorProblem.NAMESTravellingSailorProblem.NCHILDRENTravellingSailorProblem.PLACESTravellingSailorProblem.DEFAULT_NFTravellingSailorProblem.DestinationTravellingSailorProblem.DestinationBase.showRingGrids.globeRingGrids.globeSpeedyWeather.add!SpeedyWeather.add!SpeedyWeather.callback!TravellingSailorProblem.childrenTravellingSailorProblem.destination_formatTravellingSailorProblem.shortstring
TravellingSailorProblem.DESTINATION_RADIUS — Constant
DESTINATION_RADIUS = 100_000The default radius (in meters) around a destination that a particle must reach to be considered as having arrived at the destination.
TravellingSailorProblem.NAMES — Constant
Predefined names for destinations, sorted alphabetically.
TravellingSailorProblem.NCHILDREN — Constant
NCHILDREN = 10The default number of destinations/particles to create when using the children() function.
TravellingSailorProblem.PLACES — Constant
Predefined places (lon, lat) for destinations.
TravellingSailorProblem.DEFAULT_NF — Type
NF = Float32The default numeric type (Float32) for destination coordinates.
TravellingSailorProblem.Destination — Type
Destination{NF} <: SpeedyWeather.AbstractCallbackA 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 destinationname::Symbol: [OPTION] Name of the destinationradius::Any: [OPTION] Radius (in meters) around the destination for arrival detectionverbose::Bool: [OPTION] Whether to print messages when destination is reachedreached::Bool: [DERIVED] Flag indicating whether the destination has been reachedparticle::Int64: [DERIVED] Index of the particle that reached the destinationclosest_distance::Any: [DERIVED] Minimum distance from any particle to the destinationclosest_particle::Int64: [DERIVED] Index of the particle currently closest to the destinationpoints::Int64: [DERIVED] Points given for this destination (computed during evaluation)
TravellingSailorProblem.Destination — Method
Destination(
SG::SpectralGrid;
kwargs...
) -> Destination{<:AbstractFloat}
Constructor for creating a Destination with a specific number format (NF) from a SpectralGrid.
RingGrids.globe — Method
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.
RingGrids.globe — Method
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 displayparticle_tracker::Union{Nothing, ParticleTracker}: Optional particle trajectory data from NetCDF filebackground::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
Figureifreturn_figure=true, otherwise displays the figure and returns nothing
SpeedyWeather.add! — Method
add!(
model::AbstractModel,
destinations::Destination...
) -> Any
Add one or more destinations as callbacks to a model.
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.
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.
TravellingSailorProblem.children — Method
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.
TravellingSailorProblem.destination_format — Method
destination_format(
d::Destination
) -> Tuple{String, String, String}
Format a destination's information for display as (name, lon, lat) strings.
TravellingSailorProblem.shortstring — Method
shortstring(d::Destination) -> String
Generate a compact string representation of a destination.