Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward trajectories wind direction circular plot #3

Open
td296 opened this issue Oct 8, 2024 · 3 comments
Open

Forward trajectories wind direction circular plot #3

td296 opened this issue Oct 8, 2024 · 3 comments

Comments

@td296
Copy link

td296 commented Oct 8, 2024

Hi Eric,

When running forward trajectories I have noticed that the circualr histogram wind plots show the wrong wind direction. They are the exact opposite to what that should be so I guess this would be a minor fix.

Cheers

Toby

@etd530
Copy link
Owner

etd530 commented Oct 19, 2024

Hi Toby,

Could you provide an example please? I did some runs now and it seems to work fine, but perhaps there is some specific case for which the script breaks.

In general, please be more specific when reporting issues, it is difficult to fix a bug without being able to reproduce it.

Thanks,

Eric

@td296
Copy link
Author

td296 commented Oct 22, 2024

Hi Eric,

Thanks for your reply. Here is an example of the issue. Below is a forward trajectory, this shows our insects travelling north on a southerly wind over a 24 hrs period.

Screenshot (138)

However, when you look at the circular histograms the bars are all orientated to the north instead of the south

image

Does that make sense?

For reference this is what the backward trajectories show which make sense to me.

image
image

Cheers
Toby

@etd530
Copy link
Owner

etd530 commented Oct 23, 2024

Hi Toby,
The plots are as intended, they show the direction at which the trajectories "end" (in the case of forward trajectories) or the points at which trajectories "start" (in the case of backwards trajectories).

Each trajectory consists in a series of coordinates (one per hour) that trace the path the wind followed. The script computes, for each position at each time point of each trajectory, the bearing of a straight line connecting the start coordinates and the coordinates at which the trajectory was found at that specific time. Unless a time is specified, all time points of each trajectory are used.

For example, for a single trajectory running 48 hours backwards, there are 48 pairs of coordinates computed, plus the origin. So there are 48 bearings that can be calculated and, by default, all 48 are plotted. So if this trajectory spiraled around the origin, you would get a circular histogram with bars pointing in many directions.

If you were to specify a given time point (e.g. 24 hours) with the --windrose_times option, only the bearing corresponding to where this trajectory was 24 hours backwards would be represented in the histogram. So, with the same trajectory as before, only a single bar would appear in the circular histogram. This can be useful if, for example, you are unsure how far back in time you want to run your trajectories: you can just compute for, say, 100 hours backwards, and then plot at 24h, 48h, etc. or all time points together.

However, the plots do not indicate the local winds blowing at the point of origin of the trajectories, although you could get that (at a perhaps somewhat coarse level) by computing trajectories backwards and specifying --windrose_times 1 to plot the bearings just one hour before the time at which the calculation starts.

Sorry this was not clear, hopefully it makes sense now.

Cheers,

Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants