Differences between revisions 4 and 49 (spanning 45 versions)
Revision 4 as of 2008-01-15 09:20:22
Size: 3045
Editor: NicoleThomas
Comment:
Revision 49 as of 2024-08-12 09:05:40
Size: 7449
Editor: NicoleThomas
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#acl ClamsUserGroup:read,write,delete,revert All:read
Line 2: Line 4:
The package ''traj'' allows to determine the trajectories of an ensemble of air parcels. Using assimilated winds and temperatures derived from meteorological data (currently UKMO or ECMWF), both forward and backward can be calculated. The numerical integration is based on the 4th order Runge-Kutta schema.
Line 3: Line 6:
The package ''traj'' allows to determine the trajectories of an ensemble of air parcels. Using assimilated winds and temperatures derived from meteorological data (currently UKMO or ECMWF), both forward and backward can be calculated.
The numerical integration is based on the 4th order Runge-Kutta schema.
Information about input/output data, the data structures and program structure:
[[attachment:CLaMS_Traj.pdf]]
Line 7: Line 11:
The options for the execution of ''traj'' can be set in the configuration file '''traj.inp''':
Line 8: Line 13:
The options for the execution of ''traj'' can be set in the configuration file '''traj.inp''':
Line 10: Line 14:
example1/pos_EXP_97032512.nc ! Name of initial positions file
/dat_icg1/rad/example         ! Input directory
I3U
! Prefix of wind files
outdir ! Output directory
TRU ! Prefix for output file
24 ! 1/2/3/4/6/8/12/24 -> Data every n hours  y ! y/n - Backward/Forward trajectories  y ! y/n - 3d(with theta_dot)/2d(without theta_dot) run
1 ! eq. starts (a=0) diff. starts: a=1/2 same end/length
12 23 03 1997 ! Endtime(hh dd mm yy) for a=0/1, lenght (hrs) for a=2
1800 ! First timestep in seconds
60  ! Second timestep in seconds
0 1 0 ! Writing frequency (minutes hours days)  N.Thomas ! user name
4 ! number of output parameters
TEMP ! output parameters (one short name per line)  PRESS  ! possible parameters are: TEMP,PRESS,U,V,PV,SZA
PV
SZA
1) example1/pos_EXP_97032512.nc ! Name of initial positions file
2) /usr/nfs/data/data_on_just/met_data/ecmwf/era_interim/nc/hybrid/yymm ! Input directory
3) ecmwf ! Prefi
x of wind files
4) outdir ! Output directory
5) abc
! Prefix for output file
6)
24 ! 1/2/3/4/6/8/12/24 -> Data every n hours
7)
y ! y/n - Backward/Forward trajectories
8)
y ! y/n - 3d(with theta_dot)/2d(without theta_dot) run
9) ZETA_DOT ! short name of variable containing THETA/ZETA-DOT information
10)
1 ! eq. starts (a=0) diff. starts: a=1/2 same end/length
11) 12 23 03 1997 ! Endtime(hh dd mm yy) for a=0/1, lenght (hrs) for a=2
12) 1800 ! First timestep in seconds
13) 300 ! Second timestep in seconds
14) 0 1 0 ! Writing frequency (minutes hours days)
15)
N.Thomas ! user name
16) 3 ! number of output parameters
17) TEMP ! output parameters (one short name per line)
    
PRESS
    
PV
Line 30: Line 34:
Remarks:

 1. Name of initial positions file (if it is not in current directory the path must be specified)
 1. Directory with wind files <<BR>> If ''yymm'' or ''yyyy/mm'' is specified, it will be replaced by the current year and month.
 1. Prefix of wind files: <<BR>> The filenames of the wind files must correspond to the format ''prefix_yymmddhh.nc''. ''prefix'' must be specified in this line.
 1. Output directory
 1. Prefix for output file consisting of three characters: <<BR>> The output filename corresponds to the format ''traj_xxx_3d_yymmddhh_yymmddhh.nc''. The characters ''xxx'' must be specified in this line.
 1. Interval between wind files in hours
 1. Specification, if forward or backward trajectories should be calculated: <<BR>> y = backward trajectories <<BR>> n = forward trajectories
 1. 2d or 3d run <<BR>> y = 3d run (with theta_dot) <<BR>> n = 2d run (without theta_dot)
 1. Short name of variable containing THETA-DOT information
 1. If the trajectories start at different times, in this line is specified if they should all end at the same time or if they should have the same length: <<BR>> 1 = same end time for all trajectories <<BR>> 2 = same length for all trajectories <<BR>> If all trajectories start at the same time, this specification is ignored.
 1. If all trajectories start at the same time or if the trajectories start at different times but should end at the same time, the end time must be specified (hour, day, month, year). If the trajectories start at different times and should have the same length, the lenght of trajectories must be specified (in hours).
 1. Timestep for calculation in seconds
 1. This specification is only considered if the trajectories start at different times. The timestep is used in the period between the first starting and the last starting trajectory.
 1. Writing frequency in the format ''mm hh dd'', e. g. if ''0 0 1'' is specified, the data will be written out every 24 hours.
 1. User name
 1. Number of output parameters
 1. List of output parameters
Line 32: Line 56:
This file includes the starting positions of the trajectories (longitudes, latitudes and levels) and the corresponding starting times. To create it the package [[pos]] can be used. It has to be a file in NetCDF data format with the following variables:
Line 33: Line 58:
This file includes the starting positions of the trajectories (longitudes, latitudes and theta) and
the corresponding starting times.
To create it the package [[pos]] can be used.
It has to be a file in NetCDF data format with the following variables:
 * LAT: latitudes in deg N, valid range [-90,90]
 * LON: longitudes in deg O, valid range [0,360]
 * THETA: potential temperature in K
 * TIME_INIT: time in Julian Seconds
 * ''TIME_INIT'': time in Julian Seconds
 * ''LAT'': latitudes in deg N, valid range [-90,90]
 * ''LON'': longitudes in deg E, valid range [0,360]
 * ''THETA''|''ZETA'': potential temperature in K or <<BR>> ''PRESS'': pressure in hPa
Line 42: Line 63:
The filename must correspond to the following format: If the vertical coordinate ZETA is used, there must be a global attribute ''exp_VERTCOOR_name'' which is set to "zeta".
Line 44: Line 65:
  ''pos''_`xxx`_`yymmddhh`''.nc'' <<BR>>
  `xxx` : 1-3 characters<<BR>>
  `yymmddhh` : starting time<<BR>>
  e.g.: ''pos_ABC_99022812.nc''

[[Example for initial positions file]]
[[/InitExample | Example for init file ]]
Line 53: Line 68:
The data files with meteorological data used by the trajectory program must contain the coordinate variables:
Line 54: Line 70:
The data files with meteorological data used by the trajectory program must contain the coordinate variables:
 * LAT: latitudes in deg N, valid range [-90,90]
 * LON: longitudes in deg O, valid range [0,360]
 * THETA: potential temperature in K (in ascending order)
 * time: (one) time in julian seconds
 * ''time'': (one) time in julian seconds
 * ''lat'': latitudes in deg N, valid range [90,-90] (in decreasing order)
 * ''lon'': longitudes in deg E, valid range [0,360]
 * ''theta''|''zeta'': potential temperature in K (in ascending order) or <<BR>> ''press'': pressure levels in hPa (in descending order) or <<BR>> ''hybrid'': model levels
Line 63: Line 78:
 * U: westerly wind
 * V: southerly wind
 * THETA_DOT: vertical velocity (for 3d-runs)
 * TEMP: temperature
 * PRESS: pressure
 * PV: potential vorticity

 * ''U'': westerly wind
 * ''V'': southerly wind
 * for 3d runs: ''THETA_DOT''|''ZETA_DOT'': vertical velocity in K/day or <<BR>> ''OMEGA'': vertical velocity in Pa/sec <<BR>> The name of this variable is specified in line 9 of ''traj.inp''.
 * for wind files on model levels: vertical coordinate used in initial positions file (THETA|ZETA|PRESS)
 * output parameters (listed in line 17)
Line 71: Line 86:
  ''isen''_`xxx`_`yymmddhh`.''nc''<<BR>>
  `xxx` : 3 characters <<BR>>
  `yymmddhh` : valid time <<BR>>
  e. g.: ''isen_ABC_99022812.nc''
Line 76: Line 87:
[[Example for isentropic file]]  . ''prefix''_`yymmddhh`.''nc''<<BR>> ''prefix'' : specified in line 3 <<BR>> `yymmddhh` : valid time <<BR>> e. g.: ''ecmwf_99022812.nc''

[[/WindfileExample | Example for isentropic file]]

[[/WindfileExampleHybrid | Example for wind file on model levels ]]

=== Output file ===
The output file is created in NetCDF data format and is named:

 . traj_xxx_3d_yymmddhh_yymmddhh.nc

The characters `xxx` are read from the configuration file (line 5) and the two times are the start and end time of trajectory calculation.

The dimensions in the trajectory output file are:

 * ''time'': number of written timesteps
 * ''NPARTS'': number of start positions/trajectories

The file contains the following variables:

 * ''time''(time): output times in julian seconds
 * ''DATE_TIME''(time,7): readable time (year, month, day, hour, minute, second, millisecond)
 * ''LAT''(time,NPARTS): latitudes in deg N
 * ''LON''(time,NPARTS): longitudes in deg E
 * ''THETA''|''ZETA''(time,NPARTS): potential temperature in K or <<BR>> ''PRESS'': pressure in hPa

It also contains the variables specified in the configuration file (line 17). Possible output variables are ''TEMP, U, V, PV, SZA'' and for isentropic files also ''PRESS''.

Further variables can be added to the trajectory output file using the program [[traj_add]].

If there are different starting times for the trajectories the data set also contains variables with the prefix ''start_'' (''start_time, start_LAT, start_LON'' etc.). These are arrays with the dimension ''NPARTS'' containing the values at the starting times of the trajectories.

If the trajectories end at different times, the values at the end times will be written on variables with the prefix ''end_'' (''end_time, end_LAT'' etc.).

[[/OutputExample | Example for trajectory output file]]

The package traj

The package traj allows to determine the trajectories of an ensemble of air parcels. Using assimilated winds and temperatures derived from meteorological data (currently UKMO or ECMWF), both forward and backward can be calculated. The numerical integration is based on the 4th order Runge-Kutta schema.

Information about input/output data, the data structures and program structure: CLaMS_Traj.pdf

Configuration file

The options for the execution of traj can be set in the configuration file traj.inp:

1)  example1/pos_EXP_97032512.nc  ! Name of initial positions file
2)  /usr/nfs/data/data_on_just/met_data/ecmwf/era_interim/nc/hybrid/yymm   ! Input directory
3)  ecmwf                         ! Prefix of wind files
4)  outdir                        ! Output directory
5)  abc               ! Prefix for output file
6)  24                ! 1/2/3/4/6/8/12/24 -> Data every n hours
7)  y                 ! y/n - Backward/Forward trajectories
8)  y                 ! y/n - 3d(with theta_dot)/2d(without theta_dot) run
9)  ZETA_DOT          ! short name of variable containing THETA/ZETA-DOT information
10) 1                 ! eq. starts (a=0) diff. starts: a=1/2 same end/length
11) 12 23 03 1997     ! Endtime(hh dd mm yy) for a=0/1, lenght (hrs) for a=2
12) 1800              ! First timestep in seconds
13) 300               ! Second timestep in seconds
14) 0 1 0             ! Writing frequency (minutes hours days)
15) N.Thomas          ! user name
16) 3                 ! number of output parameters
17) TEMP              ! output parameters (one short name per line)
    PRESS            
    PV

Remarks:

  1. Name of initial positions file (if it is not in current directory the path must be specified)
  2. Directory with wind files
    If yymm or yyyy/mm is specified, it will be replaced by the current year and month.

  3. Prefix of wind files:
    The filenames of the wind files must correspond to the format prefix_yymmddhh.nc. prefix must be specified in this line.

  4. Output directory
  5. Prefix for output file consisting of three characters:
    The output filename corresponds to the format traj_xxx_3d_yymmddhh_yymmddhh.nc. The characters xxx must be specified in this line.

  6. Interval between wind files in hours
  7. Specification, if forward or backward trajectories should be calculated:
    y = backward trajectories
    n = forward trajectories

  8. 2d or 3d run
    y = 3d run (with theta_dot)
    n = 2d run (without theta_dot)

  9. Short name of variable containing THETA-DOT information
  10. If the trajectories start at different times, in this line is specified if they should all end at the same time or if they should have the same length:
    1 = same end time for all trajectories
    2 = same length for all trajectories
    If all trajectories start at the same time, this specification is ignored.

  11. If all trajectories start at the same time or if the trajectories start at different times but should end at the same time, the end time must be specified (hour, day, month, year). If the trajectories start at different times and should have the same length, the lenght of trajectories must be specified (in hours).
  12. Timestep for calculation in seconds
  13. This specification is only considered if the trajectories start at different times. The timestep is used in the period between the first starting and the last starting trajectory.
  14. Writing frequency in the format mm hh dd, e. g. if 0 0 1 is specified, the data will be written out every 24 hours.

  15. User name
  16. Number of output parameters
  17. List of output parameters

Initial positions of air parcels

This file includes the starting positions of the trajectories (longitudes, latitudes and levels) and the corresponding starting times. To create it the package pos can be used. It has to be a file in NetCDF data format with the following variables:

  • TIME_INIT: time in Julian Seconds

  • LAT: latitudes in deg N, valid range [-90,90]

  • LON: longitudes in deg E, valid range [0,360]

  • THETA|ZETA: potential temperature in K or
    PRESS: pressure in hPa

If the vertical coordinate ZETA is used, there must be a global attribute exp_VERTCOOR_name which is set to "zeta".

Example for init file

Meteorological data

The data files with meteorological data used by the trajectory program must contain the coordinate variables:

  • time: (one) time in julian seconds

  • lat: latitudes in deg N, valid range [90,-90] (in decreasing order)

  • lon: longitudes in deg E, valid range [0,360]

  • theta|zeta: potential temperature in K (in ascending order) or
    press: pressure levels in hPa (in descending order) or
    hybrid: model levels

LAT and LON must build a regular grid.

Besides the files must include at least the four-dimensional data sets for the variables:

  • U: westerly wind

  • V: southerly wind

  • for 3d runs: THETA_DOT|ZETA_DOT: vertical velocity in K/day or
    OMEGA: vertical velocity in Pa/sec
    The name of this variable is specified in line 9 of traj.inp.

  • for wind files on model levels: vertical coordinate used in initial positions file (THETA|ZETA|PRESS)
  • output parameters (listed in line 17)

The filenames must correspond to the format:

  • prefix_yymmddhh.nc
    prefix : specified in line 3
    yymmddhh : valid time
    e. g.: ecmwf_99022812.nc

Example for isentropic file

Example for wind file on model levels

Output file

The output file is created in NetCDF data format and is named:

  • traj_xxx_3d_yymmddhh_yymmddhh.nc

The characters xxx are read from the configuration file (line 5) and the two times are the start and end time of trajectory calculation.

The dimensions in the trajectory output file are:

  • time: number of written timesteps

  • NPARTS: number of start positions/trajectories

The file contains the following variables:

  • time(time): output times in julian seconds

  • DATE_TIME(time,7): readable time (year, month, day, hour, minute, second, millisecond)

  • LAT(time,NPARTS): latitudes in deg N

  • LON(time,NPARTS): longitudes in deg E

  • THETA|ZETA(time,NPARTS): potential temperature in K or
    PRESS: pressure in hPa

It also contains the variables specified in the configuration file (line 17). Possible output variables are TEMP, U, V, PV, SZA and for isentropic files also PRESS.

Further variables can be added to the trajectory output file using the program traj_add.

If there are different starting times for the trajectories the data set also contains variables with the prefix start_ (start_time, start_LAT, start_LON etc.). These are arrays with the dimension NPARTS containing the values at the starting times of the trajectories.

If the trajectories end at different times, the values at the end times will be written on variables with the prefix end_ (end_time, end_LAT etc.).

Example for trajectory output file

traj (last edited 2024-08-12 09:05:40 by NicoleThomas)