 ### Corrected values for standard atmosphere temperature and pressure

Improved documentation (refs #1192)
parent f7d2ff76
 ... ... @@ -6,7 +6,7 @@ @Operators = const random stdatm @BeginDescription Generates a dataset with one field. The size of the field Generates a dataset with one or more fields. The field size is specified by the user given grid description. According to the chosen operator all field elements are constant or filled with random numbers. ... ... @@ -47,38 +47,50 @@ 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)) @EndifMan @IfMan T(z) = T_0 + T_Delta * (exp(-z/H) - 1)) T(z) = T_0 + T_Delta * exp(-z/H) @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) T(z) = T_0 + \Delta T \exp \left(- \frac{z}{H} \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 T_0 = 213 K Offset to get a surface temperature of 288K T_Delta = 75 K Temperature lapse rate for 10Km P_0 = 1013.25 hPa Surface pressure H = 10000.0 m Scale height g = 9.80665 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} \\ T_0 =& 213 \mbox{K} &: \mbox{offset to get a surface temperature of 288K} \\ \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} \\ g =& 9.80665 \frac{\mbox{m}}{\mbox{s}^2} &: \mbox{earth gravity} \\ R =& 287.05 \frac{\mbox{J}}{\mbox{kgK}} &: \mbox{gas constant for air} \\ @EndEqnAry @EndifDoc This is the solution for the hydrostatic equations and is only valid for the troposphere (constant positive lapse rate). The temperature increase in the stratosphere and other effects of the upper atmosphere are not taken into account. @EndDescription @BeginExample To create a standard atmosphere dataset on a given horizontal grid: @BeginVerbatim cdo enlarge,gridfile -stdatm,10000,8000,5000,3000,2000,1000,500,200,0 ofile @EndVerbatim @EndExample @EndOperator @BeginParameter ... ...
 ... ... @@ -20,6 +20,8 @@ Vargen const Create a constant field Vargen random Field with random values Vargen stdatm Field values for pressure and temperature for the standard atmosphere */ #include ... ... @@ -57,8 +59,8 @@ #endif /* some Constants for creating temperatur and pressure for the standard atmosphere */ #define T_ZERO (288.15) /* sea level standard temperature [K] */ #define T_DELTA (-75.0) #define T_ZERO (213.0) #define T_DELTA (75.0) #define SCALEHEIGHT (10000.0) /* [m] */ #define P_ZERO (1013.25) /* surface pressure [hPa] */ #define C_EARTH_GRAV (9.80665) ... ... @@ -72,14 +74,7 @@ std_atm_temperatur(double height) Compute the temperatur for the given height (in meters) according to the solution of the hydrostatic atmosphere */ /* return (T_ZERO + T_DELTA * exp((-1)*(height/SCALEHEIGHT))); I suspect an error in the formular above, because * it does not reproduce the surface temperatur at height 0 * temperatur is increasing with height */ return (T_ZERO - T_DELTA * (exp((-1)*(height/SCALEHEIGHT)) - 1)); return (T_ZERO + T_DELTA * exp((-1)*(height/SCALEHEIGHT))); } static double ... ...
 ... ... @@ -3637,7 +3637,7 @@ static char *VargenHelp[] = { " stdatm,levels ofile", "", "DESCRIPTION", " Generates a dataset with one field. The size of the field", " Generates a dataset with one or more fields. The field size", " is specified by the user given grid description.", " According to the chosen operator all field elements", " are constant or filled with random numbers.", ... ... @@ -3653,16 +3653,21 @@ static char *VargenHelp[] = { " 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))", " T(z) = T_0 + T_Delta * exp(-z/H)", " ", " 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", " T_0 = 213 K Offset to get a surface temperature of 288K", " T_Delta = 75 K Temperature lapse rate for 10Km", " P_0 = 1013.25 hPa Surface pressure", " H = 10000.0 m Scale height", " g = 9.80665 m/s**2 Earth gravity", " R = 287.05 J/kg*K Gas constant for air", " ", " This is the solution for the hydrostatic equations and is only valid for the", " troposphere (constant positive lapse rate). The temperature increase in the", " stratosphere and other effects of the upper atmosphere are not taken into", " account.", "", "PARAMETER", " const FLOAT Constant", ... ...
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