Commit 477f5c29 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners

Merged changes from trunk

* r3976: afterburner.c: added globs->Verbose around some fprintf
* r3975: afterburner: docu update
parents eeef562d b13cf0ec
......@@ -6,7 +6,7 @@
2015-04-10 Uwe Schulzweida
* New operator: after - ECHAM afterburner
* New operator: after - ECHAM standard post processor
2015-04-02 Uwe Schulzweida
......
......@@ -5,6 +5,8 @@ Version 1.6.9 (26 September 2015):
New features:
* expr: added support for operator ?:,&&,||
New operators:
* after: ECHAM standard post processor
Version 1.6.8 (26 March 2015):
......
No preview for this file type
......@@ -58,6 +58,9 @@
%\setlength{\footskip}{-2cm}
%\renewcommand{\footnoterule}{\rule{0cm}{0cm}}
\usepackage[T1]{fontenc}
\usepackage[lighttt]{lmodern}
\usepackage{exscale}
\usepackage{array,colortbl} % color table
......@@ -178,7 +181,7 @@
\end{picture}
\begin{flushright}
\large\bf{Climate Data Operators \\ Version 1.6.8 \\ March 2015}
\large\bf{Climate Data Operators \\ Version 1.6.9 \\ May 2015}
\end{flushright}
\vfill
......
......@@ -14,7 +14,7 @@
\put(0,0.0){\line(1,0){3.95}}
\end{picture}
\begin{flushright}
{\small{Climate Data Operators \\ Version 1.6.8 \\ March 2015}}
{\small{Climate Data Operators \\ Version 1.6.9 \\ May 2015}}
\end{flushright}
\vspace*{0mm}
......
......@@ -532,9 +532,7 @@ while (<MOFILE>) {
print TRFILE "\n\\subsection*{Description}\n\n";
if ( $#moddeslines >= 0 ) {
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
begin_minipage();
}
# Add list of variables created by this operator. This can only be done for eca_* operators
......@@ -551,8 +549,7 @@ while (<MOFILE>) {
print_description(@moddeslines);
if ( $#moddeslines >= 0 ) {
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
end_minipage();
}
if ( $#hkeys > 0 ) {
......@@ -561,9 +558,7 @@ while (<MOFILE>) {
print TRFILE "\n\\subsection*{Operators}\n\n";
}
else {
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
begin_minipage();
}
$opercnt = 0;
......@@ -722,10 +717,40 @@ while (<MOFILE>) {
print TRFILE "\\end{defalist2}\n";
}
else {
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
end_minipage();
}
# Namelist
undef @deslines;
$lblock = 0;
foreach $tag (@doclines) {
($kword) = split(" ", $tag);
$kword = uc($kword);
if ( $lblock == 0 ) {
if ( "$kword" eq "\@BEGINNAMELIST" ) {
$lblock = 1;
next;
}
}
if ( $lblock == 1 ) {
if ( "$kword" eq "\@ENDNAMELIST" ) { last; }
push(@deslines, $tag);
}
}
if ( $lblock == 1 ) {
print HELPFILE " \"\",\n";
print HELPFILE " \"NAMELIST\",\n";
print TRFILE "\n\\subsection*{Namelist}\n\n";
begin_minipage();
print_description(@deslines);
end_minipage();
}
# Parameter
undef @parlines;
......@@ -768,9 +793,7 @@ while (<MOFILE>) {
print HELPFILE " \"PARAMETER\",\n";
print TRFILE "\n\\subsection*{Parameter}\n\n";
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
begin_minipage();
print TRFILE "\\begin{defalist}{\\sl $maxitem \\ }\n";
$lines = 0;
......@@ -805,8 +828,7 @@ while (<MOFILE>) {
}
}
print TRFILE "\\end{defalist}\n";
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
end_minipage();
}
# Environment
......@@ -851,9 +873,7 @@ while (<MOFILE>) {
print HELPFILE " \"ENVIRONMENT\",\n";
print TRFILE "\n\\subsection*{Environment}\n\n";
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
begin_minipage();
print TRFILE "\\begin{defalist}{\\tt $maxitem \\ }\n";
foreach $tag (@parlines) {
......@@ -888,8 +908,7 @@ while (<MOFILE>) {
}
}
print TRFILE "\\end{defalist}\n";
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
end_minipage();
}
# Note
......@@ -916,17 +935,14 @@ while (<MOFILE>) {
print HELPFILE " \"NOTE\",\n";
print TRFILE "\n\\subsection*{Note}\n\n";
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
begin_minipage();
$help_spaces = 0;
$help_print = 1;
print_description(@parlines);
$help_print = 1;
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
end_minipage();
}
# Example
......@@ -950,17 +966,14 @@ while (<MOFILE>) {
if ( $lblock == 1 ) {
print TRFILE "\n\\subsection*{Example}\n\n";
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
begin_minipage();
$help_spaces = 0;
$help_print = 0;
print_description(@parlines);
$help_print = 1;
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
end_minipage();
}
# See also
......@@ -1089,6 +1102,10 @@ sub print_description {
} elsif ( "$kword" eq "\@ENDLIST" ) {
print TRFILE "\\end{defalist}\n";
$list = 0;
} elsif ( "$kword" eq "\@BEGINTABLE5" ) {
print TRFILE "\\begin{tabular}[t]{|l|l|l|l|l|}\n";
print TRFILE "\\hline\n";
$table = 1;
} elsif ( "$kword" eq "\@BEGINTABLE4" ) {
print TRFILE "\\begin{tabular}[t]{|l|l|l|l|}\n";
print TRFILE "\\hline\n";
......@@ -1191,6 +1208,7 @@ sub print_description {
$line =~ s/\@ref\{([^}]*)\}/{\\htmlref{\1}{\1}}/og;
$line =~ s/\@env\{([^}]*)\}/{\\tt \1}/og;
$line =~ s/\@cite\{([^}]*)\}/\\cite{\1}/og;
$line =~ s/\@boldtt\{([^}]*)\}/{\\ttfamily \\bfseries \1}/og;
$line =~ s/\@bold\{([^}]*)\}/{\\bf \1}/og;
$line =~ s/\@celsius/{\\textcelsius}/og;
$line =~ s/</\$<\$/og;
......@@ -1212,6 +1230,7 @@ sub print_description {
$docline =~ s/\@ref\{([^}]*)\}/\1/og;
$docline =~ s/\@env\{([^}]*)\}/\1/og;
$docline =~ s/\@cite\{([^}]*)\}/\1/og;
$docline =~ s/\@boldtt\{([^}]*)\}/\1/og;
$docline =~ s/\@bold\{([^}]*)\}/\1/og;
$docline =~ s/\@celsius/°C/og;
$docline =~ s/\\_/_/g;
......@@ -1231,3 +1250,23 @@ sub print_description {
}
}
}
sub begin_minipage {
print TRFILE "\\vspace{-1.5ex}\n";
print TRFILE "\\begin{addmargin}[8mm]{0mm}\n";
}
sub end_minipage {
print TRFILE "\\end{addmargin}\n";
}
sub begin_minipage_old {
print TRFILE "\\setlength{\\miniwidth}{\\textwidth}\n";
print TRFILE "\\addtolength{\\miniwidth}{-8mm}\n";
print TRFILE "\\hspace*{8mm}\\begin{minipage}{\\miniwidth}\n";
}
sub end_minipage_old {
print TRFILE "\\end{minipage}\n";
print TRFILE "\\addtolength{\\miniwidth}{8mm}\n";
}
......@@ -12,48 +12,101 @@
@Title = ECHAM standard post processor
@BeginDescription
The "afterburner" is the standard post processor for ECHAM data which provides the following operations:
The "afterburner" is the standard post processor for @cite{ECHAM} data which provides the following operations:
@BeginItemize
@Item = Extract specified variables and levels
@Item = Compute derived variables
@Item = Transform spectral data to Gaussian grid representation
@Item = Vertical interpolation to pressure levels or height
@Item = Vertical interpolation to pressure levels
@Item = Compute temporal means
@EndItemize
This operator reads selection parameters as namelist from stdin.
Use the UNIX redirection "< namelistfile" to read the namelist from file.
Use the UNIX redirection "<namelistfile" to read the namelist from file.
@EndDescription
@EndOperator
@BeginNamelist
Namelist parameter and there defaults:
@BeginListing
TYPE=0, CODE=-1, LEVEL=-1, MEAN=0, INTERVAL=0, TIMESEL=-1, UNITSEL=0, EXTRAPOLATE=0
TYPE=0, CODE=-1, LEVEL=-1, INTERVAL=0, MEAN=0, EXTRAPOLATE=0
@EndListing
TYPE controls the transformation and vertical interpolation. Transforming spectral data to Gaussian grid representation
and vertical interpolation to pressure levels or height are performed in a chain of steps. The TYPE parameter may be used
to stop the chain at a certain step. Valid values are:
@boldtt{TYPE} controls the transformation and vertical interpolation. Transforming spectral data to Gaussian grid
representation and vertical interpolation to pressure levels are performed in a chain of steps.
The @boldtt{TYPE} parameter may be used to stop the chain at a certain step. Valid values are:
@BeginListing
TYPE = 0 : Hybrid level spectral coefficients
TYPE = 10 : Hybrid level fourier coefficients
TYPE = 11 : Hybrid level zonal mean sections
TYPE = 20 : Hybrid level gauss grids
TYPE = 30 : Pressure or Height level gauss grids
TYPE = 40 : Pressure or Height level fourier coefficients
TYPE = 41 : Pressure or Height level zonal mean sections
TYPE = 50 : Pressure or Height level spectral coefficients
TYPE = 60 : Pressure or Height level fourier coefficients
TYPE = 61 : Pressure or Height level zonal mean sections
TYPE = 70 : Pressure or Height level gauss grids
TYPE = 0 : Hybrid level spectral coefficients
TYPE = 10 : Hybrid level fourier coefficients
TYPE = 11 : Hybrid level zonal mean sections
TYPE = 20 : Hybrid level gauss grids
TYPE = 30 : Pressure level gauss grids
TYPE = 40 : Pressure level fourier coefficients
TYPE = 41 : Pressure level zonal mean sections
TYPE = 50 : Pressure level spectral coefficients
TYPE = 60 : Pressure level fourier coefficients
TYPE = 61 : Pressure level zonal mean sections
TYPE = 70 : Pressure level gauss grids
@EndListing
Vorticity, divergence, streamfunction and velocity potential need special treatment in the vertical transformation.
They are not available as types 30, 40 and 41. If you select one of these combinations, type is automatically
switched to the equivalent types 70, 60 and 61. The type of all other variables will be switched too, because
the type is a global parameter.
@EndDescription
@EndOperator
@boldtt{CODE} selects the variables by the ECHAM GRIB1 code number (1-255). The default value @boldtt{-1} processes all detected codes.
Derived variables computed by the afterburner:
@BeginTable5
@bold{Code} & @bold{Name} & @bold{Longname} & @bold{Level} & @bold{Needed Codes/Computation}
34 & low_cld & low cloud & single & 223 on modellevel
35 & mid_cld & mid cloud & single & 223 on modellevel
36 & hih_cld & high cloud & single & 223 on modellevel
131 & u & u-velocity & atm (ml+pl) & 138, 155
132 & v & v-velocity & atm (ml+pl) & 138, 155
135 & omega & vertical velocity & atm (ml+pl) & 138, 152, 155
148 & stream & streamfunction & atm (ml+pl) & 131, 132
149 & velopot & velocity potential & atm (ml+pl) & 131, 132
151 & slp & mean sea level pressure & surface & 129, 130, 152
156 & geopoth & geopotential height & atm (ml+pl) & 129, 130, 133, 152
157 & rhumidity & relative humidity & atm (ml+pl) & 130, 133, 152
189 & sclfs & surface solar cloud forcing & surface & 176-185
190 & tclfs & surface thermal cloud forcing & surface & 177-186
191 & sclf0 & top solar cloud forcing & surface & 178-187
192 & tclf0 & top thermal cloud forcing & surface & 179-188
259 & windspeed & windspeed & atm (ml+pl) & sqrt(u*u+v*v)
260 & precip & total precipitation & surface & 142+143
@EndTable
@boldtt{LEVEL} selects the hybrid or pressure levels. The allowed values depends on the parameter @boldtt{TYPE}.
The default value @boldtt{-1} processes all detected levels.
@boldtt{INTERVAL} selects the processing interval. The default value @boldtt{0} process data on monthly intervals.
@boldtt{INTERVAL=1} sets the interval to daily.
@boldtt{MEAN=1} compute and write monthly or daily mean fields. The default value @boldtt{0} writes out all timesteps.
@boldtt{EXTRAPOLATE=0} switch of the extrapolation of missing values during the interpolation from model to pressure
level (only available with @boldtt{MEAN=0} and @boldtt{TYPE=30}). The default value @boldtt{1} extrapolate missing values.
Possible combinations of TYPE, CODE and MEAN:
@BeginTable
@bold{TYPE} & @bold{CODE} & @bold{MEAN}
0/10/11 & 130 temperature & 0
0/10/11 & 131 u-velocity & 0
0/10/11 & 132 v-velocity & 0
0/10/11 & 133 specific humidity & 0
0/10/11 & 138 vorticity & 0
0/10/11 & 148 streamfunction & 0
0/10/11 & 149 velocity potential & 0
0/10/11 & 152 LnPs & 0
0/10/11 & 155 divergence & 0
>11 & all codes & 0/1
@EndTable
@EndNamelist
@BeginExample
To interpolate ECHAM hybrid model level data to pressure levels of 925, 850, 500 and 200 hPa, use:
......
......@@ -770,7 +770,7 @@ void after_setLevel(struct Control *globs)
{
if ( globs->unitsel == 0 )
{
fprintf(stdout," Default pressure level selected:\n");
if ( globs->Verbose ) fprintf(stdout," Default pressure level selected:\n");
globs->NumLevelRequest = numplevelDefault;
for ( l = 0; l < globs->NumLevelRequest; l++ ) globs->LevelRequest[l] = plevelDefault[l];
oVertID = zaxisCreate(ZAXIS_PRESSURE, globs->NumLevelRequest);
......@@ -778,7 +778,7 @@ void after_setLevel(struct Control *globs)
}
else
{
fprintf(stdout," Default height level selected:\n");
if ( globs->Verbose ) fprintf(stdout," Default height level selected:\n");
globs->NumLevelRequest = numhlevelDefault;
for ( l = 0; l < globs->NumLevelRequest; l++ ) globs->LevelRequest[l] = hlevelDefault[l];
oVertID = zaxisCreate(ZAXIS_HEIGHT, globs->NumLevelRequest);
......
......@@ -240,8 +240,9 @@ void cdoPrintHelp(char *phelp[]/*, char *xoperator*/)
(strcmp(*phelp, "SYNOPSIS") == 0) ||
(strcmp(*phelp, "DESCRIPTION") == 0) ||
(strcmp(*phelp, "OPERATORS") == 0) ||
(strcmp(*phelp, "ENVIRONMENT") == 0) ||
(strcmp(*phelp, "NAMELIST") == 0) ||
(strcmp(*phelp, "PARAMETER") == 0) ||
(strcmp(*phelp, "ENVIRONMENT") == 0) ||
(strcmp(*phelp, "EXAMPLES") == 0) )
{
set_text_color(stdout, BRIGHT, BLACK);
......
......@@ -4040,38 +4040,87 @@ static char *AfterburnerHelp[] = {
"",
"DESCRIPTION",
" The \"afterburner\" is the standard post processor for ECHAM data which provides the following operations:",
" ",
" - Extract specified variables and levels",
" - Compute derived variables",
" - Transform spectral data to Gaussian grid representation",
" - Vertical interpolation to pressure levels or height",
" - Vertical interpolation to pressure levels",
" - Compute temporal means",
" This operator reads selection parameters as namelist from stdin.",
" Use the UNIX redirection \"< namelistfile\" to read the namelist from file.",
" ",
" This operator reads selection parameters as namelist from stdin.",
" Use the UNIX redirection \"<namelistfile\" to read the namelist from file.",
"",
"NAMELIST",
" Namelist parameter and there defaults:",
" TYPE=0, CODE=-1, LEVEL=-1, MEAN=0, INTERVAL=0, TIMESEL=-1, UNITSEL=0, EXTRAPOLATE=0",
" TYPE=0, CODE=-1, LEVEL=-1, INTERVAL=0, MEAN=0, EXTRAPOLATE=0",
" ",
" TYPE controls the transformation and vertical interpolation. Transforming spectral data to Gaussian grid representation",
" and vertical interpolation to pressure levels or height are performed in a chain of steps. The TYPE parameter may be used ",
" to stop the chain at a certain step. Valid values are:",
" ",
" TYPE = 0 : Hybrid level spectral coefficients",
" TYPE = 10 : Hybrid level fourier coefficients",
" TYPE = 11 : Hybrid level zonal mean sections",
" TYPE = 20 : Hybrid level gauss grids",
" TYPE = 30 : Pressure or Height level gauss grids",
" TYPE = 40 : Pressure or Height level fourier coefficients",
" TYPE = 41 : Pressure or Height level zonal mean sections",
" TYPE = 50 : Pressure or Height level spectral coefficients",
" TYPE = 60 : Pressure or Height level fourier coefficients",
" TYPE = 61 : Pressure or Height level zonal mean sections",
" TYPE = 70 : Pressure or Height level gauss grids",
" TYPE controls the transformation and vertical interpolation. Transforming spectral data to Gaussian grid",
" representation and vertical interpolation to pressure levels are performed in a chain of steps.",
" The TYPE parameter may be used to stop the chain at a certain step. Valid values are:",
" ",
" TYPE = 0 : Hybrid level spectral coefficients",
" TYPE = 10 : Hybrid level fourier coefficients",
" TYPE = 11 : Hybrid level zonal mean sections",
" TYPE = 20 : Hybrid level gauss grids",
" TYPE = 30 : Pressure level gauss grids",
" TYPE = 40 : Pressure level fourier coefficients",
" TYPE = 41 : Pressure level zonal mean sections",
" TYPE = 50 : Pressure level spectral coefficients",
" TYPE = 60 : Pressure level fourier coefficients",
" TYPE = 61 : Pressure level zonal mean sections",
" TYPE = 70 : Pressure level gauss grids",
" ",
" Vorticity, divergence, streamfunction and velocity potential need special treatment in the vertical transformation.",
" They are not available as types 30, 40 and 41. If you select one of these combinations, type is automatically",
" switched to the equivalent types 70, 60 and 61. The type of all other variables will be switched too, because ",
" the type is a global parameter.",
" ",
" CODE selects the variables by the ECHAM GRIB1 code number (1-255). The default value -1 processes all detected codes.",
" Derived variables computed by the afterburner:",
" ",
" Code & Name & Longname & Level & Needed Codes/Computation",
" 34 & low_cld & low cloud & single & 223 on modellevel ",
" 35 & mid_cld & mid cloud & single & 223 on modellevel ",
" 36 & hih_cld & high cloud & single & 223 on modellevel ",
" 131 & u & u-velocity & atm (ml+pl) & 138, 155 ",
" 132 & v & v-velocity & atm (ml+pl) & 138, 155 ",
" 135 & omega & vertical velocity & atm (ml+pl) & 138, 152, 155 ",
" 148 & stream & streamfunction & atm (ml+pl) & 131, 132 ",
" 149 & velopot & velocity potential & atm (ml+pl) & 131, 132 ",
" 151 & slp & mean sea level pressure & surface & 129, 130, 152 ",
" 156 & geopoth & geopotential height & atm (ml+pl) & 129, 130, 133, 152 ",
" 157 & rhumidity & relative humidity & atm (ml+pl) & 130, 133, 152 ",
" 189 & sclfs & surface solar cloud forcing & surface & 176-185 ",
" 190 & tclfs & surface thermal cloud forcing & surface & 177-186 ",
" 191 & sclf0 & top solar cloud forcing & surface & 178-187 ",
" 192 & tclf0 & top thermal cloud forcing & surface & 179-188 ",
" 259 & windspeed & windspeed & atm (ml+pl) & sqrt(u*u+v*v) ",
" 260 & precip & total precipitation & surface & 142+143 ",
" ",
" LEVEL selects the hybrid or pressure levels. The allowed values depends on the parameter TYPE.",
" The default value -1 processes all detected levels.",
" ",
" INTERVAL selects the processing interval. The default value 0 process data on monthly intervals.",
" INTERVAL=1 sets the interval to daily.",
" ",
" MEAN=1 compute and write monthly or daily mean fields. The default value 0 writes out all timesteps.",
" ",
" EXTRAPOLATE=0 switch of the extrapolation of missing values during the interpolation from model to pressure",
" level (only available with MEAN=0 and TYPE=30). The default value 1 extrapolate missing values.",
" ",
" Possible combinations of TYPE, CODE and MEAN:",
" ",
" TYPE & CODE & MEAN",
" 0/10/11 & 130 temperature & 0",
" 0/10/11 & 131 u-velocity & 0",
" 0/10/11 & 132 v-velocity & 0",
" 0/10/11 & 133 specific humidity & 0",
" 0/10/11 & 138 vorticity & 0",
" 0/10/11 & 148 streamfunction & 0",
" 0/10/11 & 149 velocity potential & 0",
" 0/10/11 & 152 LnPs & 0",
" 0/10/11 & 155 divergence & 0",
" >11 & all codes & 0/1",
NULL
};
......
Markdown is supported
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