Extract particle path (start/stop) information
Posted: October 1st, 2018, 8:59 pm
I am running the dispersion model in a multi-processor environment.
I am interested in the particle path time series that Hysplit generates. I do not need the entire path, but I need to be able to associate the initial condition with the final location listed in, say, a PARDUMP file.
The problem I am running into is that Hysplit does not write the particle locations to the PARDUMP file in the same order as the initial conditions. It seems to sort them vertically in some sense, and keeps latitude/longitude clusters together.
The obvious solution is to run Hysplit many times, once for each specific starting location: then there is no ambiguity. This is suboptimal for two reasons: (1) the same random numbers will be used to simulate diffusion each time, introducing artificial correlation among particles of different runs, and (2) then we are essentially running Hysplit in serial mode, sacrificing much of the performance gain.
I am having trouble digging into the source to find out where the particle sorting/re-ordering takes place. It makes sense that it would occur prior to running the forward model in order to optimize the performance of a semi-Lagrangian simulation. It also might occur between each timestep.
Can someone suggest a simpler alternative to getting this particle path information that does not sacrifice performance, such as a Hysplit configuration setting I may have overlooked? Otherwise, can one of the developers/maintainers help me identify the subroutines where the sorting is taking place? If I can do that, then I can track and dump a mapping to the original particle input order.
I am interested in the particle path time series that Hysplit generates. I do not need the entire path, but I need to be able to associate the initial condition with the final location listed in, say, a PARDUMP file.
The problem I am running into is that Hysplit does not write the particle locations to the PARDUMP file in the same order as the initial conditions. It seems to sort them vertically in some sense, and keeps latitude/longitude clusters together.
The obvious solution is to run Hysplit many times, once for each specific starting location: then there is no ambiguity. This is suboptimal for two reasons: (1) the same random numbers will be used to simulate diffusion each time, introducing artificial correlation among particles of different runs, and (2) then we are essentially running Hysplit in serial mode, sacrificing much of the performance gain.
I am having trouble digging into the source to find out where the particle sorting/re-ordering takes place. It makes sense that it would occur prior to running the forward model in order to optimize the performance of a semi-Lagrangian simulation. It also might occur between each timestep.
Can someone suggest a simpler alternative to getting this particle path information that does not sacrifice performance, such as a Hysplit configuration setting I may have overlooked? Otherwise, can one of the developers/maintainers help me identify the subroutines where the sorting is taking place? If I can do that, then I can track and dump a mapping to the original particle input order.