Training in TRACMASS trajectory modeling code 14-24 July 2009
The Institute of Cybernetics (IoC) and the Department of Meteorology, University of Stockholm (MISU) organized a two-week intensive course about the TRACMASS trajectory simulation system in the framework of Work Package 3 of the BalticWay project. This software, developed mainly by Kristofer Döös (MISU), is the project’s key tool for analyzing the patterns of current-induced transport of water particles and pollution based on precomputed data from circulations models for the Baltic Sea.
The TRACMASS code calculates Lagrangian trajectories of fluid particles in the ocean or atmosphere. The analysis is carried out off-line, i.e. after a relevant circulation model has been integrated and the velocity fields have been stored. This makes it possible to calculate many more trajectories than what could be done simultaneously with the circulation models.
The code was originally written in Fortran 77 for the FRAM ocean model at the Institute of Oceanographic Sciences, Deacon Laboratory (IOSDL) in Wormley (UK) in the early 1990’s. TRACMASS has been set up to run with velocities integrated with a number of different ocean and atmosphere models. The system is based on papers by Döös (1995), Blanke and Raynaud (1997) and Vries and Döös (2001) and has been further developed during the years and used in many studies.
TRACMASS for the BalticWay team
The training was performed under the guidance of Anders Anbo (MISU) who visited the Wave Engineering Laboratory at IoC for a two-week period in July 2009. The members of the IoC BalticWay team Nicole Delpeche, Raul Isotamm and Bert Viikmäe participated in the entire course while IoC PhD students Inga Zaitseva-Pärnaste and Loreta Kelpšaite took part in the basic training.
The topics covered during the training course were:
- Installation of TRACMASS on different operating systems
such as a Unix cluster, Linux systems and Windows machines. Since TRACMASS is intended to be used on Unix machines, Cygwin was used to simulate a Unix-like environment under Windows. For TRACMASS to work in Cygwin, use of the unzipping program gunzip had to be changed to gzip in order to make it work. This was performed with the readfields.f95 subroutine].
- The theory for the calculation of trajectories
and the foundations of TRACMASS. This included a short introduction into the basic principles of general circulation models, the finite difference method and the governing equations. Different applications were also introduced.
- Detailed instructions on how to launch
and handle the TRACMASS system and how to prescribe and adjust the most important variables in the script files before starting a trajectory simulation. In particular, it was discussed in detail how to submit the seeding position, the number of seeded trajectories, the number of time step- or day iterations and input/output directories.
- The possibilities for the organization
and use of the output data of the simulations and the structure of the data files, including examples
of how the data could be visualized using the Matlab environment.
- An introduction into the basic syntax
and structure of the Fortran programming language such as the use of subroutines and modules, declaring variables and the use of multidimensional arrays.
- Introduction into the basics of the usage
of Fortran-based systems under different operational systems. This section covered more specific topics such as the usage of Makefile and the important flag options that set the conditions of a simulation, like the diffusion or twodim flags.
- Insight into the TRACMASS Fortran code
and an introduction into the code structure of most of the files included in TRACMASS such as the main-, loop-, readfields-, cross- and pos-file. All the important loops in the loop file and the purpose of the loops were explained in some detail.
- How to extract more information
from the archived results of the circulation model data, e.g. temperature and salinity.
- Techniques for the visualization
of the output data in the Matlab environment.
The entire course consisted of approximately 48 academic contact hours for each participant and about 32 hours of individual work.