Trajectory data in NetCDF format

Trajectories are stored as bundles of trajectories (class MTrajectories). A single trajectory in a bundle consists of a simple list of positions in longitude-latitude-pressure space that resemble the trajectory. All trajectories in a bundle share the same time information, i.e. the time for position n is the same for all trajectories. This data layout corresponds to the smallest data entity being the bundle of all trajectories computed for a single ensemble member for the same time steps.

Description

Since the CF-conventions only provide limited support for trajectory data (in particular no ensemble dimension), we’re currently using a custom NetCDF layout that follows the CF-versions. There are a few limitations:

  • There is only one time dimension per NetCDF file, which corresponds to the time of the particle positions along the trajectories. If you have a series of trajectory bundles started at different times (i.e., a bundle of trajectories for each forecast time step as used for WCB detection_), you need one NetCDF file per trajectory bundle.

The following example contains a NetCDF header of a file containing trajectories computed from an ensemble forecast:

 1netcdf sometrajectorydata {
 2dimensions:
 3    time = 17 ;
 4    trajectory = 215332 ;
 5    ensemble = 51 ;
 6    start_lon = 101 ;
 7    start_lat = 41 ;
 8    start_isobaric = 52 ;
 9    time_interval = 8 ;
10variables:
11    double time(time) ;
12            time:standard_name = "time" ;
13            time:long_name = "time" ;
14            time:units = "hours since 2012-10-19 06:00:00" ;
15            time:trajectory_starttime = "2012-10-19 06:00:00" ;
16            time:forecast_inittime = "2012-10-17 00:00:00" ;
17
18    float lon(ensemble, trajectory, time) ;
19            lon:standard_name = "longitude" ;
20            lon:long_name = "longitude" ;
21            lon:units = "degrees_east" ;
22    float lat(ensemble, trajectory, time) ;
23            lat:standard_name = "latitude" ;
24            lat:long_name = "latitude" ;
25            lat:units = "degrees_north" ;
26    float pressure(ensemble, trajectory, time) ;
27            pressure:standard_name = "air_pressure" ;
28            pressure:long_name = "pressure" ;
29            pressure:units = "hPa" ;
30            pressure:positive = "down" ;
31            pressure:axis = "Z" ;
32
33    float temperature(ensemble, trajectory, time) ;
34            temperature:standard_name = "temperature" ;
35            temperature:long_name = "temperature" ;
36            temperature:auxiliary_data = "yes" ;
37            temperature:units = "K" ;
38
39    float start_lon(start_lon) ;
40            start_lon:long_name = "longitude of start grid" ;
41            start_lon:units = "degrees_east" ;
42    float start_lat(start_lat) ;
43            start_lat:long_name = "latitude of start grid" ;
44            start_lat:units = "degrees_north" ;
45    float start_isobaric(start_isobaric) ;
46            start_isobaric:long_name = "Isobaric surface of start grid" ;
47            start_isobaric:units = "hPa" ;
48            start_isobaric:positive = "down" ;
49            start_isobaric:axistype = "pressure levels" ;
50
51    float time_interval(time_interval) ;
52            time_interval:long_name = "time interval" ;
53            time_interval:units = "hours" ;
54    float delta_pressure_per_time_interval(ensemble, trajectory, time_interval) ;
55            delta_pressure_per_time_interval:long_name = "max. delta pressure of trajectory in time interval around start time" ;
56            delta_pressure_per_time_interval:units = "hPa" ;
57}

Required and optional data are:

  • Required: In addition to the air parcel time, Met.3D requires the two attributes trajectory_starttime and forecast_inittime for the time variable that define the time at which the trajectory was started, as well as the forecast initialisation/base time of the forecast data on which the trajectory was computed.

  • Required: The vertices / particle positions of the trajectories need to specified in the variables lon, lat, and pressure.

  • Optional: Additional variables traced along the trajectories (e.g., temperature in the example above) need to be identifyable by the attribute auxiliary_data = "yes".

    • You can put an arbitrary number of auxiliary trace variables into your file.

  • Optional: The start_lon, start_lat and start_isobaric variables are optional and define the grid from which the trajectory bundle was started (used for WCB detection).

  • Optional: Similarly, the time_interval and delta_pressure_per_time_interval variables are optional and define pre-computed values for WCB detection. Contact us if you’re interested.

Implementation

If you want to further understand, how NetCDF files with trajectory data are implemented, you can read the following source files of the MTrajectoryReader: