Commit ae9f4980 authored by Ralf Mueller's avatar Ralf Mueller
Browse files

Added documentation for stdatm operator (refs #1192)

parent f80b96a9
......@@ -445,6 +445,7 @@ Operator catalog:
Timsort timsort Sort over the time
Vargen const Create a constant field
Vargen random Create a field with random numbers
Vargen stdatm Create values for pressure and temperature for hydrostatic atmosphere
Rotuv rotuvb Backward rotation
Mastrfu mastrfu Mass stream function
Histogram histcount Histogram count
......
......@@ -3,7 +3,7 @@
@Title = Generate a field
@Section = Miscellaneous
@Arguments = ofile
@Operators = const random
@Operators = const random stdatm
@BeginDescription
Generates a dataset with one field. The size of the field
......@@ -35,6 +35,52 @@ Creates a field with rectangularly distrubuted random numbers in the interval [0
@EndOperator
@BeginOperator_stdatm
@Title = Create values for pressure and temperature for hydrostatic atmosphere
@Parameter = levels
@BeginDescription
Creates pressure and temperature values for the given list of vertical levels.
The formulars are:
@IfMan
P(z) = P_0 * exp(-1 * g/R * H/T_0 * log( (exp(z/H)*T_0 + T_Delta)/(T_0 + T_Delta))
@EndifMan
@IfMan
T(z) = T_0 + T_Delta * (exp(-z/H) - 1))
@EndifMan
@IfDoc
@BeginMath
P(z) = P_0 \exp \left(- \frac{g}{R} \frac{H}{T_0} \log \left( \frac{\exp \left( \frac{z}{H} \right) T_0 + \Delta T}{T_0 + \Delta T} \right) \right)
@EndMath
@BeginMath
T(z) = T_0 + \Delta T \left(\exp \left(- \frac{z}{H} \right) - 1 \right)
@EndMath
@EndifDoc
with the following constants
@IfMan
T_0 = 288.15 K surface temperature
T_Delta = -75 K Temperature lapse rate for 10Km
P_0 = 1013.25 hPa surface pressure
H = 10000.0 m scale height
g = 9.81 m/s**2 earth gravity
R = 287.05 J/kg*K gas constant for air
@EndifMan
@IfDoc
@BeginEqnAry
T_0 =& 288.15 \mbox{K} &: \mbox{surface temperature} \\
\Delta T=& -75 \mbox{K} &: \mbox{Temperature lapse rate for 10Km} \\
P_0 =& 1013.25 \mbox{hPa} &: \mbox{surface pressure} \\
H =& 10000.0 \mbox{m} &: \mbox{scale height} \\
g =& 9.81 \frac{\mbox{m}}{\mbox{s}^2} &: \mbox{earth gravity} \\
R =& 287.05 \frac{\mbox{J}}{\mbox{kgK}} &: \mbox{gas constant for air} \\
@EndEqnAry
@EndifDoc
@EndDescription
@EndOperator
@BeginParameter
@Item = const
FLOAT Constant
......@@ -42,4 +88,6 @@ FLOAT Constant
INTEGER The seed for a new sequence of pseudo-random numbers [default: 1]
@Item = grid
STRING Target grid description file or name
@Item = levels
FLOAT Target levels
@EndParameter
......@@ -117,7 +117,7 @@ void *Vargen(void *argument)
TOPO = cdoOperatorAdd("topo", 0, 0, NULL);
TEMP = cdoOperatorAdd("temp", 0, 0, NULL);
MASK = cdoOperatorAdd("mask", 0, 0, NULL);
STDATM = cdoOperatorAdd("stdatm", 0, 0, "list of z-levels");
STDATM = cdoOperatorAdd("stdatm", 0, 0, "levels");
operatorID = cdoOperatorID();
......
......@@ -3629,11 +3629,12 @@ static char *TimsortHelp[] = {
static char *VargenHelp[] = {
"NAME",
" const, random - Generate a field",
" const, random, stdatm - Generate a field",
"",
"SYNOPSIS",
" const,const,grid ofile",
" random,grid[,seed] ofile",
" stdatm,levels ofile",
"",
"DESCRIPTION",
" Generates a dataset with one field. The size of the field",
......@@ -3647,11 +3648,27 @@ static char *VargenHelp[] = {
" have the same value.",
" random Create a field with random numbers",
" Creates a field with rectangularly distrubuted random numbers in the interval [0,1].",
" stdatm Create values for pressure and temperature for hydrostatic atmosphere",
" Creates pressure and temperature values for the given list of vertical levels.",
" The formulars are:",
" ",
" P(z) = P_0 * exp(-1 * g/R * H/T_0 * log( (exp(z/H)*T_0 + T_Delta)/(T_0 + T_Delta))",
" T(z) = T_0 + T_Delta * (exp(-z/H) - 1))",
" ",
" with the following constants",
" ",
" T_0 = 288.15 K surface temperature",
" T_Delta = -75 K Temperature lapse rate for 10Km",
" P_0 = 1013.25 hPa surface pressure",
" H = 10000.0 m scale height",
" g = 9.81 m/s**2 earth gravity",
" R = 287.05 J/kg*K gas constant for air",
"",
"PARAMETER",
" const FLOAT Constant",
" seed INTEGER The seed for a new sequence of pseudo-random numbers [default: 1]",
" grid STRING Target grid description file or name",
" const FLOAT Constant",
" seed INTEGER The seed for a new sequence of pseudo-random numbers [default: 1]",
" grid STRING Target grid description file or name",
" levels FLOAT Target levels",
NULL
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment