Introduction

The purpose of this set of modules is to implement post processing of the Lagrangian label fields output by MONC (currently in the Circle-A code branch). The theory behind this is given in this pdf. Essentially, Lagrangian labels are advected by the MONC TVD advection scheme, initialized to fields from which the position can be uniquely retrieved at start of run and after each output.

The objective of this code is to construct sets of back and forward trajectories that pass through specific regions at a reference time (currently cloud points), and ‘families’ of such sets with different reference times. Tools to create and further process these are documented in The trajectory_compute module.

Some functions have been written to display and animate the results. They can be found in The trajectory_plot module. A very simple script to run and plot an example dataset is provided in the file ‘back_traj.py’.

Version History

Latest version is 0.4.

New at 0.4

  1. An alternative pair of functions to select initial trajectory points is included. This is based upon George Efstathiou’s code to study coherent structures in the boundary layer. See trajectory_compute.trajectory_cstruct_ref() and trajectory_compute.in_cstruc() (which both use trajectory_compute.cstruct_select()).

  2. Some derived variables can be specfied, such as ‘th_L’. Variables can have have operators (such as spatial derivatives, deviation from mean) applied. See documentation for trajectory_compute.get_data() for more detail. Users are encouraged to expand this functionality, or suggest required expansions.

  3. The code now handles a variable vertical grid if z or zn are found in the source data files. Otherwise, a uniform grid is assumed, using the supplied deltaz. (Note, the horizontal grid spacing still has to be supplied as the netCDF files appear not to include this information).

  4. The forward trajectory calculation has been made more efficient and a bug fixed which caused problems when trectories came close to the surface.

  5. The interpolation to trajectory points now (hopefully) correctly takes account of the grid staggering.

  6. The cloud analysis code has been moved to its own module, documented in The compute_cloud_properties module.

  7. Some minor changes to the trajectory_compute.Trajectories class to simplify the number of attributes.