Possible?: Multiple start times for a matrix of endpoints

General questions and postings pertaining to the use of HYSPLIT regardless of the platform. For platform specific questions, use the HYSPLIT Platform forums.
Post Reply
mwj202
Posts: 9
Joined: June 8th, 2015, 11:49 am
Registered HYSPLIT User: No

Possible?: Multiple start times for a matrix of endpoints

Post by mwj202 »

Hi all,

I'm trying to produce multiple trajectories starting at different, regular times for a matrix of endpoints. I have successfully generated my endpoints in the control file using the matrix calculation feature.

I have tried to produce trajectories for all endpoints in the matrixes by two approaches: (1) running the "daily" script after generating the matrix and checking that all endpoints are present in the control file and; (2) changing the "multiple trajectories in time" (restart interval and restart duration) and "trajectory points output frequency" (max traj duration) settings in advanced configuration. When I try these two options, trajectories are only generated for the first point of the matrix and the matrix of endpoints is lost from the control file.

My question is, does anyone know if it's actually possible to generate multiple trajectories for multiple endpoints using HYSPLIT? If so, am I approaching this in a vaguely correct manner?

Any help much appreciated!!

Best wishes,
Matt
mwj202
Posts: 9
Joined: June 8th, 2015, 11:49 am
Registered HYSPLIT User: No

Re: Possible?: Multiple start times for a matrix of endpoint

Post by mwj202 »

I have very kindly been supplied with this batch script that creates a CONTROL file, runs the model, creates the postScript file and then creates the line shapefile output (thanks go to glenn.rolph).

Code: Select all

echo 00 00 00 %1 >CONTROL
echo 1 >>CONTROL
echo 40.0 -90.0 10.0 >>CONTROL
echo 48 >>CONTROL
echo 0 >>CONTROL
echo 10000.0 >>CONTROL
echo 1 >>CONTROL
echo ./ >>CONTROL
echo oct1618.BIN >>CONTROL
echo ./ >>CONTROL
echo tdump.%1 >>CONTROL

\hysplit4\exec\hyts_std.exe
\hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1
\hysplit4\exec\ascii2shp.exe -i trajplot lines <GIS_traj_ps_01.txt
rem \hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, GIS_traj_ps_01.att trajplot.dbf
I can see that it may be possible to add a foreach loop so that the model is run and appropriately named shapefiles are exported for all of the endpoints (>200) that I wish to run the model for. However I am a coding novice (it's my first time using tcl) and do not know where to place the foreach code. I have had a crack below:

Code: Select all

foreach {EPid lat lon} [list 001 40.0 -90.0 002 39.0 -89.0 003 38.0 -88.0] {
    echo 00 00 00 %1 >CONTROL
    echo 1 >>CONTROL
    echo[b] $lat $lon [/b]10.0 >>CONTROL
    echo 48 >>CONTROL
    echo 0 >>CONTROL
    echo 10000.0 >>CONTROL
    echo 1 >>CONTROL
    echo ./ >>CONTROL
    echo oct1618.BIN >>CONTROL
    echo ./ >>CONTROL
    echo tdump.%1 >>CONTROL

    \hysplit4\exec\hyts_std.exe
    \hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1
    \hysplit4\exec\ascii2shp.exe -i trajplot lines <"$EPid"_oct1618.txt
    rem \hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, "$EPid"_oct1618.att "$EPid"_oct1618.dbf
}
Also, as I mentioned in my previous post I would like to generate multiple trajectories. I think this could be done by using the above script to define values for variables in the SETUP.CFG file or TRAJ.CFG that would otherwise be produced in the GUI by advanced configuration settings. My thinking is that extra echo commands such as echo nstr = 24 >> SETUP.CFG (= initiate new traj every 24 hours) should be added to the list of echo commands in the code above and that hyts_std.exe will run with SETUP.CFG automatically... Would that make sense?

Now if the script I've shown above is correct I would classify it as a miracle... and there may be an alternative way such as using a for loop... but if anyone could help me out I would be SO grateful.

Best wishes,
Matt
Post Reply

Return to “Users”