auto_traj

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
zhy566
Posts: 3
Joined: July 2nd, 2017, 11:30 pm
Registered HYSPLIT User: No

auto_traj

Post by zhy566 » July 6th, 2017, 4:59 pm

Hi!
I need to generate trajectories from 1979-2014. I am running the PC version.
I learned from this forum that I can either run the special daily run month by month (which is time-consuming) or write a script to loop the run month by month (using a script similar with auto_traj?).
I want to follow the second option. However, I have no idea how to write this script. I found some information about auto_traj.tcl on the HYSPLIT website but it is not that helpful.

My question is:
1. Can somebody please explain more about the auto_traj.tcl file to me? The file is meant to create a loop, but I can't find any looping command. Maybe I missed it??
2. This one is related to question 1, how to change the lines in the auto_traj file so that it can run multiple years?
3. I am new to CMD, so I don't know how to run the auto_traj file... Should I run it through a complete batch file? If that is the case, how should I call auto_traj in the batch file?

Thank you so much for helping!!

Best
Yang

Here are the lines in the auto_traj.tcl file:
set Start_lat "0.0"
set Start_lon "0.0"

set Start_hgt "10.0"
set Traj_path "../exec"
set Start_time "00 00 00 00"
set Run_hours "24"
set Vert_coord "0"
set Top_model "10000.0"
set Meteo_path "./"
set Meteo_file "oct1618.BIN"
set Output_path "./"
set Output_base "tdump"

set Output_numb 1
foreach {Start_lat Start_lon} {35.0 -90.0 40.0 -90.0 45.0 -90.0} {

set Start_loc "$Start_lat $Start_lon $Start_hgt"
set Output_file "$Output_base$Output_numb"

file delete Control
set f [open Control w]
puts $f "$Start_time"
puts $f "1"
puts $f "$Start_loc"
puts $f "$Run_hours"
puts $f "$Vert_coord"
puts $f "$Top_model"
puts $f "1"
puts $f "$Meteo_path"
puts $f "$Meteo_file"
puts $f "$Output_path"
puts $f "$Output_file"
close $f

exec "$Traj_path/hyts_std"
#-----------------------------------------
# add additional post-processing exe here
# no quotes required for the arguments
# exec "program.exe" arguments
#-----------------------------------------
incr Output_numb
}

barbara.stunder
Posts: 200
Joined: November 9th, 2012, 4:23 pm
Registered HYSPLIT User: Yes

Re: auto_traj

Post by barbara.stunder » July 11th, 2017, 9:31 am


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest