mscross / pysplit

A package for HYSPLIT air parcel trajectory analysis.
BSD 3-Clause "New" or "Revised" License
149 stars 80 forks source link

Changing the hysplit model top height #72

Open benjaminesse opened 4 years ago

benjaminesse commented 4 years ago

Hi, I have been looking at using PySPLIT for handling hysplit back trajectories for volcanic plumes. These often go above 10000m so I would like to be able to raise the top height of the model, but I couldn't see a way of setting this in generate_bulktraj. On inspecting trajectory_generator I noticed that the top height is set in _populate_control and fixed to 10000 m.

If I wanted to change the top height of the model can I simply change this value? Would there be any problems with other pysplit functionality? I noticed there is a altitude check in _reversetraj_whilegen, are there any others that would need changing?

Thanks in advance.

Ben

mscross commented 4 years ago

There is a function in Trajectory that lets you generate a reverse traj for that Trajectory; it also contains an altitude check. So, if you wanted to directly alter the code to your specific model height, you'd need to change those two altitude checks and the "10000.0" in controltext in _populate_control() .

However, I'd welcome your contribution if you wanted to make a PR allowing the model height to be flexible!

benjaminesse commented 4 years ago

Thanks! I'll look into that and see about adding it as an option