TRACMASS is a Lagrangian trajectory code for ocean and atmospheric general circulation models. The code makes it possible to estimate water paths, Lagrangian stream functions (barotropic, overturning, etc.), exchange times, etc. TRACMASS has been used in studies of the global ocean circulation, of sea circulation in the Baltic Sea, the Mediterranean Sea and in coastal regions.
The code is written in FORTRAN 90 with modules and runs on UNIX platforms such as MAC OS X and Linux.
TRACMASS has been set up to run with velocities integrated with models such as NEMO or IFS-ECMWF, of satellite datasets such as AVISO.
For more information check our website: https://www.tracmass.org/.
You can find documentation about TRACMASS here
git clone https://github.com/TRACMASS/Tracmass.gitcd TracmassYou will need to set ARCH - name of your system, (i.e. tetralith) - which is used to set the Fortran compiler and flags.
You also need to configure how TRACMASS should find the netCDF libraries, if at all, using NETCDFLIBS.
For most HPC systems, we recommend setting netCDF libraries using either the NETCDFLIBS = automatic-44 option for netCDF version >4.4 or NETCDFLIBS = automatic otherwise.
The simplest way to get started with TRACMASS on a local machine or HPC system is to use a conda virtual environment.
To do this:
-
Create a new virtual environment using miniforge - a minimal installer for Conda and Mamba:
conda create -n env_tracmass
-
Next, install the gfortran and netcdf-fortran libraries required by TRACMASS from the conda-forge open-source package manager.
conda activate env_tracmass conda install gfortran netcdf-fortran
-
Verify gfortran and netCDF libraries are available.
which gfortran nf-config --all
-
Update the Makefile
ARCHandNETCDFLIBSoptions.# Project and case definition ... ARCH = conda NETCDFLIBS = conda #=============================
makeWe recommend testing that TRACMASS was properly compiled by letting PROJECT and CASE be "Theoretical" in the Makefile (which is the default).
In this case, TRACMASS will use a simple oscillating velocity field to trace trajectories.
-
Make sure in Makefile both
PROJECTandCASEare set toTheoretical.# Project and case definition PROJECT = Theoretical CASE = Theoretical ... -
Recompile TRACMASS
make clean make
-
Run TRACMASS
./runtracmass
You can find example input data for testing the code here: https://stockholmuniversity.box.com/s/pyc29hjumxuvf0nf84ym5zs0vrnqbswr
This includes data from NEMO, IFS and AVISO. Before doing any analysis we recommend to download some of the test data and make sure TRACMASS is working properly.
For example, in order to set up TRACMASS to run trajectories using NEMO model output data, you will need to change PROJECT and CASE to NEMO, and then re-compile the code.
make clean
make
./runtracmassIf you wish to run another case or a very specific case of the above models, you will need create your own project in the projects directory.
For example, to run with your own IFS data, you will need to modify the namelist_IFS.in namelist in the projects/IFS/ directory to suit your needs.
Previous versions of TRACMASS are stored in the following repository:
https://github.com/TRACMASS/Tracmass_previous.git
The following features from older versions are not available yet in this version:
- Subgrid turbulence parameterisations
