diff --git a/doc/tex/mod/Afterburner b/doc/tex/mod/Afterburner index 746bcaecc8fe484b978972bd805ef8a6725c3bf1..f027fda816cf784bbe11f613df47d37ad9058d58 100644 --- a/doc/tex/mod/Afterburner +++ b/doc/tex/mod/Afterburner @@ -20,6 +20,37 @@ The "afterburner" is the standard post processor for ECHAM data which provides t @Item = Vertical interpolation to pressure levels or height @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. + +Namelist parameter and there defaults: +@BeginListing + TYPE=0, CODE=-1, LEVEL=-1, MEAN=0, INTERVAL=0, TIMESEL=-1, UNITSEL=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: + +@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 +@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 diff --git a/src/Afterburner.c b/src/Afterburner.c index d7a9442f838c876bcab64d018efec8d2a8857488..bd98bbe3f4ae1536b4051c9a1b5d0976477f6cb1 100644 --- a/src/Afterburner.c +++ b/src/Afterburner.c @@ -1207,17 +1207,26 @@ void after_parini(struct Control *globs, struct Variable *vars) { char namelist[65536]; - if ( stdin_is_tty ) - fprintf(stdout, "\nEnter namelist parameter:\n"); - - fseek(stdin, 0L, SEEK_END); - long length = ftell(stdin); - if (length == 0L) + if ( stdin_is_tty ) { - fprintf(stderr,"\n stdin not connected\n"); - after_usage(); +#if defined(CDO) + fprintf(stderr, "Default namelist: \n"); + fprintf(stderr, " TYPE = 0, CODE = -1, LEVEL = -1, MULTI = 0, DAYIN = 30, MEAN = 0, TIMESEL = -1, UNITSEL = 0\n"); +#endif + fprintf(stdout, "Enter namelist parameter:\n"); + } + else + { + fseek(stdin, 0L, SEEK_END); + long length = ftell(stdin); + if ( length == 0L ) + { + fprintf(stderr,"\n stdin not connected\n"); + after_usage(); + } + fseek(stdin, 0L, SEEK_SET); } - fseek(stdin,0L,SEEK_SET); + int i = 1; namelist[0] = ' '; int c = getchar(); @@ -1233,11 +1242,11 @@ void after_parini(struct Control *globs, struct Variable *vars) c = getchar(); } namelist[i] = 0; + if ( globs->Debug ) { lprintf(stderr); - fprintf(stderr," Length of namelist:%4d bytes\n", - (int) strlen(namelist)); + fprintf(stderr," Length of namelist:%4d bytes\n", (int) strlen(namelist)); for (i = 0; i < (int)strlen(namelist); i += 60) fprintf(stderr," namelist[%02d]=%-60.60s\n", i, namelist+i); diff --git a/src/operator_help.h b/src/operator_help.h index 58d01f479e4874ab6526953974d15ea548e2a771..f748052cfa3b42a82278b38fc3b215c708b453f5 100644 --- a/src/operator_help.h +++ b/src/operator_help.h @@ -4045,7 +4045,33 @@ static char *AfterburnerHelp[] = { " - Transform spectral data to Gaussian grid representation", " - Vertical interpolation to pressure levels or height", " - Compute temporal means", - " - Write data in GRIB, NetCDF, SERVICE or EXTRA format", + " This operator reads selection parameters as namelist from stdin.", + " Use the UNIX redirection \"< namelistfile\" to read the namelist from file.", + " ", + " Namelist parameter and there defaults:", + " TYPE=0, CODE=-1, LEVEL=-1, MEAN=0, INTERVAL=0, TIMESEL=-1, UNITSEL=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", + " ", + " ", + " 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.", NULL };