ts2tab

Calling sequence

ts2tab  -s tsfile1 [tsfile2 ... tsfile80]

-var var_name1 [var_name1 ... var_name100]

[


-d output file name

-stat station_number1 ... station_number100

-start start_date(YYYYMMDD)

-end end_date(YYYYMMDD)

-mulf factor1 ... factor100

-addf factor1 ... factor100

-pres pressure_level1 ... pressure_level100 [hPa]

-ptop top pressure [Pa] (def 1000.)

-pref ref pressure [Pa] (def 80000.)

-coef transition: pres -> sig (def 1.6)

-satu water/ice phase for saturation

-min minutes added to time

-gnu no blancs in date/time

-head header written in first line

-nolev level number and unit not written

-nosig sigma levels not written

-noclim  time series not written in climate mode

-help
prints small description

]


Description

Author:       Katja Winger - Mar 2006  (Katja.Winger@ec.gc.ca)
 
ts2tab creates an ASCII table for 1 variable and up to 100 stations OR for 1 station and up to 100 variables for a given time interval from a series of RPN standard time series files. The output will be in a form:
 
  YYYYMMDDHH   level   level_unit    station1    station2 ...
 
resp.
 
  YYYYMMDDHH   level   level_unit   variable1   variable2 ...
 
If the key '-min' is specified the minutes will be added to the output date and time: YYYYMMDDHHMM

If the key '-gnu' is specified the date and time will be written without blanks: YYYYMMDDHHMM

If the key '-head' is specified the first output line will contain the station number(s) and variable name(s).

If the key '-nolev' is specified level and level_unit will not be written.

Note that also simple calculations (+,-,*,/) between two fields can be performed. The variable name would than be i.e. AB-AU.

 

Parameter explications

General information: if more than 1 file/variable/station/factor is given, they must be written in quotes!

s Input file(s), list of 1 to 80 RPN standard time series files
d Output file name (of ASCII table)
var Names of the 1 to 100 variables to be written. If more than 1 variable is requested they must be written n quotes: "TT UU ...".
Note: Only variables with the same number of vertical levels can be written in one output file.
Note: Also simple calculations (+,-,*,/) between two fields can be performed. The variable name would than be i.e. AB-AU. If mulf and/or addf are used, the value of the field would than be '(AB-AU) * mulf + addf'.
See also 'Special variables' below.
stat Numbers of the 1 to 100 stations to be written. Default is station 1. If more than 1 station is requested they must be written in quotes: "1 15 6 ...".
start Start date of requested time interval (YYYYMMDD). Default is the start of the files.
end End date of requested time interval (YYYYMMDD). Default is the end of the files.
mulf Multiplication factors "factor1 ... factor100". There is one factor per variable. Default is 1.
Note: If one factor is specified, all of them need to be specified.
The value of the field will be 'field * mulf + addf'.
addf Additional factors "factor1 ... factor100". There is one factor per variable. Default is 0.
Note: If one factor is specified, all of them need to be specified.
The value of the field will be 'field * mulf + addf'.
pres Profile fields can be interpolated to up to 100 pressure levels "pressure_level1 ... pressure_level100". The pressure is to be given in hPa.
ptop Pressure at model top; needed for interpolation on pressure levels. Default is 1000. Pa unless the HY record exists. If the HY record exist, ptop will always be read from there.
pref Reference pressure; needed for interpolation on pressure levels. Default is 80000. Pa unless the HY record exists. If the HY record exist, pref will always be read from there.
coef Controls the continuous transition from sigma to pressure surfaces. Needed for interpolation on pressure levels.
Range: 1. <= rcoef <= 2. . Default is 1.6 unless the HY record exists. If the HY record exist, coef will always be read from there.
satu If the program is called with the key '-satu' the water/ice phase is used for saturation otherwise only the water phase is used. If you want to reproduce model results you must set 'satu' depending on 'P_cond_satu_L' in your gem_settings.nml resp. gemclim_settings.nml.
min If the program is called with the key '-min' the minutes will be added to the output date and time (YYYY MM DD HH MM)
gnu If the program is called with the key '-gnu' the date and time will be written without blanks (YYYYMMDDHH)
head If the program is called with the key '-head' the first output line will contain the station number(s) and variable name(s)
nolev The level will not be written in the output file.
nosig Sigma levels will not be written if it is asked for pressure levels.
noclim  GEM was not ran in climate mode to obtain time series => accumulators never got reset. The program will recalculate the  accumulated amount per time series output time step.
help Prints short description
 

Special variables

MF Filtered Topography = MF / 9.80665
GZ Geopotential

"Denormed" using MF
EVAP Evaporation = AV / 2510400 / 1000 * 1000

AV : Accumulated surface flux of latent heat

Latent heat of vaporization = 2510400 J/kg
PN Mean sea level pressure

Calculated from TT, GZ, MF, and P0
IWC Vert. integrated water content (vapor & cloud) (IH+IE)
T2M 2 meter temperature (sigma surface level from TT profile)
U10M 10 meter u-wind (sigma surface level from UU profile)
V10M 10 meter v-wind (sigma surface level from VV profile)
HU2M 2 meter specific humidity (sigma surface level from HU profile)
HR2M 2 meter relative humidity (sigma surface level from HR profile)
PRES pressure at each sigma level in hPa
THETA  Potential temperature, calculated from TT
 
In case 'HU', 'HU2M', 'HR' or 'HR2M' is asked for but not available, the program will calculate it from 'HR' resp. 'HU', 'TT' and 'P0' as long as these fields exist.




Author: Katja Winger
Last update: July 2006