To conclude the trajectory option section we will do a simple exercise.  In this exercise, what I would like to do, is redo the trajectory error calculation that we had done earlier, but this time instead of using the mid boundary layer height of 750 m, do the calculation using an initial height of 10 m. 

Now the easiest way to do this, is to just run the batch file. Which batch file to run?  The tutorial section on the error calculation shows that you can do it, there is a batch file available for windows PCs as well as a Linux script that can be used on a Mac, and the name would of course be traj_error.  So go ahead and open up the file explorer, go to the tutorial, and go to batch, and scroll down to traj_error.  I'm going to open this in Notepad, but actually before we do this, but just make sure that it works, so go ahead and run this batch file, and you can see the first time it did the forward trajectory and then it did the backward trajectory and superimposed the results on the forward trajectory. So we show here that there is very little computational error in the calculation that was done at 750 meters.

So now go ahead and open the script in Notepad and we really need to make just a few changes. And just to review how this works, we are setting different variables, the starting location, height and so on, starting time, we write the CONTROL file, we run the model, we plot the trajectories, and then we extract from the forward endpoints file, the tdump_fwrd, we extract the last height, lat, lon, and level of the last record, which would be the end point of that trajectory, and we put that information into a new CONTROL file, running a trajectory backwards with the negative sign now, here's the trajectory run, and then superimposing and plotting the two trajectories.  So that's how that batch file works.  

So as you can see the only thing we really need to do this is to change this to a 10, save, and now we just run. And here is now the 10 m forward trajectory, which as you recall was one of the examples that we have done very early on, when we started the trajectory sections.  Go ahead and hit continue, and now we have the forward and the backward trajectories superimposed upon each other.  Now in this case you might say that there is a lot of computational error.  So why should the trajectory at 10 m be any different than the trajectory at 750 m? And the answer to this lies in the intersection with terrain.  We explored that issue a little bit in an artificial example, where we had a trajectory intersect a mountain range in the west, but that was rather arbitrary, but this is a very realistic example which will happen all the time, that the forward trajectory, in this case stayed near the ground, because of downward vertical motion, so would suppress the rise.  But in the backward component, they were identical until this point here, essentially here, where the backward calculation intersected the downward vertical motion, so, in a backward calculation, the trajectory would rise, so we get this departure between the forward and the backward calculation.  So what we really don't know, what the backward calculation doesn't know, is where the equivalent forward trajectory, where the trajectory first encountered this downward motion that kept it near the ground.  So that that information was lost and that is why there is this error that occurs, if you will, more uncertainty, well it really is error, at the point where the trajectories are forced to intersect ground.  

And this problem would be, maybe a quite common issue, for backward calculations.  For instance, backward calculations from the eastern coast of the United States, where the winds are from the west, so backward calculations will tend to go to the west, but the terrain rises as you get away from the coast, to the central part of the US, so that trajectories will almost always intersect the terrain resulting in a level of uncertainty that would be added to the calculation.

Anyway, this concludes the exercise number five.