Technical Report No. ? - DKRZ
Technical Report No. ? - DKRZ
Technical Report No. ? - DKRZ
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Technical</strong> <strong>Report</strong> <strong>No</strong>. ?<br />
DRAFT<br />
Description of programs<br />
handling files in<br />
WMO GRIB<br />
and<br />
EXTRA<br />
format<br />
H. Borgert and W. Welke,<br />
Max-Planck-Institut für Meteorologie,<br />
Bundesstraße 55, D-20146 Hamburg<br />
Edited by: Modellbetreuungsgruppe<br />
Hamburg, December 1993
1. INTRODUCTION<br />
1.1 BACKGROUND<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The Max-Planck-Institut für Meteorologie (MPI) has a number of meteorological and oceanic data,<br />
including both observed data and model simulations. A programming package has been set up that will<br />
enable a user to do data extractions and analyses with little effort. This manual describes the two standard<br />
data formats used, lists the programs available and gives instructions to use them. A comprehensive<br />
list of observed data available at Hamburg and their structure should refer to:<br />
<strong>DKRZ</strong> <strong>Technical</strong> <strong>Report</strong> <strong>No</strong>.1, Inventory of Available Observed Data Sets, by Ingo Jessel.<br />
1.2 PURPOSE OF THIS MANUAL<br />
This manual will enable scientists to extract the data they require from the sets, and to perform their analyses<br />
quickly and easily. It describes a number of programs for doing simple arithmetic, statistic, selection<br />
or display of data from the data sets.<br />
Some of the programs have been provided by the Canadian Climate Centre (CCC) and have been modified<br />
in Hamburg to cater for the specific Hamburg data structure.<br />
1.3 CONTENTS OF THIS MANUAL<br />
This manual comprises three sections:<br />
• Outline of the system.<br />
• The GRIB-Format: Description of the format, outline of some of the data sets available, and full<br />
details of the programs that work with GRIB-Format data sets.<br />
• The EXTRA-Format: Description of the format, outline of some of the data sets available, and full<br />
details of the programs that work with EXTRA-Format data sets.<br />
PAGE 1.0.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 1.0.2
2. OUTLINE OF THE SYSTEMS<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
A system has been devised involving two standardised data formats and a library of programs which perform<br />
basic arithmetic, statistics or extraction on any dataset that is in one of these formats. The purpose<br />
of the system is to enable users to extract the data they need without having to write programs or do long<br />
complicated data manipulations. These programs also include some complex data analysis routines such<br />
like EOF’s, canonical correlation and spectral analysis.<br />
The two data formats are called EXTRA-Format and GRIB-Format. The EXTRA-Format was designed<br />
by E. Kirk (University of Hamburg). The GRIB-Format was devised by WMO. One set of programs convert<br />
between EXTRA- and GRIB-Format.<br />
2.1 THE GRIB-FORMAT<br />
2.1.1 Outline<br />
The GRIB-Format was devised by WMO for use in weatherforecasting. It is used in Hamburg for model<br />
output data. Its data structure is readable on any computer and also provides a highly dense packaging.<br />
Further details can be found in<br />
WMO-<strong>No</strong>. 306 Manual on Codes, Volume 1, International Codes, Part B - Binary Codes<br />
2.1.2 The System<br />
The GRIB-Format system comprises a set of program modules.<br />
The GRIB-Format program names are listed in section 3.1 . The method of calling the programs is given<br />
in section 3.2 . An introduction to the GRIB-Format is given in section 3.3 . The details of all the program<br />
modules can be found in section 3.4 . In section 3.5 some examples of program calls are shown.<br />
2.1.3 Method of Use<br />
The user should be familiar with the use of the procedure EXTRACT and with UNIX before using the<br />
GRIB program modules. Use of EXTRACT is described in section 3.4.1 . The user runs the program<br />
modules under UNIX. The procedure EXTRACT itself makes use of the GRIB system, hiding details of<br />
the GRIB-Format to the user.<br />
PAGE 2.1.1
2.2 THE EXTRA-FORMAT<br />
2.2.1 Outline<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The EXTRA-Format was created at the Meteorologisches Institut der Universität Hamburg for the data<br />
output of its T21-General Circulation Model. It has been adopted by the MPI for their model outputs and<br />
many of their sets of observational data.<br />
The EXTRA-Format has an extremely simple structure, which allows for a wide range of types of data<br />
to be included. The data sets classified this way include: Spatial fields of one variable; Sequences of spatial<br />
fields of several variables; Time sequences of spatial fields; Sets of a given field over several levels;<br />
Time series of single variables.<br />
This simplicity makes for versatility, enabling a relatively small number of program modules to do a very<br />
wide range of processing options and enables a user to transfer every dataset into the EXTRA-Format.<br />
However, the simplicity also means that much information important to the data sets is not included in<br />
the sets themselves. For example, data that represent spatial fields are not indicated as such, nor is the<br />
geographical location of the points indicated. The user must therefore obtain the relevant information<br />
about the data sets before using them.<br />
2.2.2 The System<br />
The EXTRA-Format system comprises Data sets and Program modules. The structure of the data sets is<br />
described in section 3.1 . The program modules are listed in section 4.2 . The method of calling the programs<br />
is given in section 4.3 . Information about the implementation on all computers at the <strong>DKRZ</strong> and<br />
at the KNMI in DeBilt are given in section 4.4 . A description of the online help system is given in section<br />
4.5 and some examples pointed out in section 4.7 . The details of all the program modules can be<br />
found in section 4.6 .<br />
2.2.3 Method of Use<br />
• The user establishes which data set(s) he wants to use, and clarifies their structure.<br />
• The user runs the program modules using very simple UNIX calls. This will result in various<br />
derived data sets.<br />
• The user may, if desired, write programs that read the derived data sets (or the originals) and<br />
generate further results. It is recommended that the user writes his programs in such a way that they<br />
will read any EXTRA-Format file, and writes their output also in EXTRA-Format, when<br />
appropriate.<br />
• The EXTRA-Format data sets can be displayed with the included plot programs, isolines can be<br />
plotted easily with the ISO plot package.<br />
PAGE 2.2.1
3. GRIB-FORMAT PROGRAMS<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
In this section programs for computation of GRIB files are described.<br />
It is recommended to use the programs in the bourne shell. They are available after execution of the command<br />
PATH=$PATH:$GRIB<br />
All programs have upper case and lower case names. This is useful, if there are other programs with conflicting<br />
names.<br />
The directory containing these programs can be specified in the execution path environment variable<br />
PATH prior to the directory mentioned above; then both programs will be available.<br />
The general calling sequence for all programs is<br />
prog [+|-] file1 file2 file3 ...<br />
where prog is the name of the program and file1, file2, ... are names of data files.<br />
Standard files INPUT and OUTPUT can be redirected by the UNIX mechanism using ’’ for OUTPUT. See UNIX manual page ’sh’ for further information.<br />
Some programs can read parameter lists from standard INPUT; this can be suppressed by a ’-’ or forced<br />
by a ’+’ as first parameter. For default action see single program descriptions.<br />
Meaningless specifications of ’-’ and ’+’ as first parameter are ignored.<br />
PAGE 3.0.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 3.0.2
3.1 LIST OF AVAILABLE PROGRAMS<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
a) in alphabetical order<br />
3.4.6.1 ABS outfile = abs(infile)<br />
3.4.12.4 ACCU Accumulate time series<br />
3.4.7.1 ADD outfile = infile1 + infile2<br />
3.4.10.5 ANOMAL Subtract multi-year monthly time averages from a time series.<br />
3.4.8.3 CATEXTF Concatenate up to 88 files in blocked extra format<br />
3.4.8.3 CATSRVF Concatenate up to 88 files in blocked service/afterburner format<br />
3.4.12.5 CHEAD Change grib header specifications<br />
3.4.8.1 GRB2EXF File conversion - grib to formatted extra format<br />
3.4.8.1 GRB2EXP File conversion - grib to unblocked extra format<br />
3.4.8.1 GRB2EXT File conversion - grib to blocked extra format<br />
3.4.8.1 GRB2SRF File conversion - grib to formatted service/afterburner format<br />
3.4.8.1 GRB2SRP File conversion - grib to unblocked service/afterburner format<br />
3.4.8.1 GRB2SRV File conversion - grib to blocked service/afterburner format<br />
3.4.8.2 EXF2GRB File conversion - formatted extra to grib format<br />
3.4.8.2 EXP2GRB File conversion - unblocked extra to grib format<br />
3.4.8.2 EXT2GRB File conversion - blocked extra to grib format<br />
3.4.8.2 SRF2GRB File conversion - formatted service/afterburner to grib format<br />
3.4.8.2 SRP2GRB File conversion - unblocked service/afterburner to grib format<br />
3.4.8.2 SRV2GRB File conversion - blocked service/afterburner to grib format<br />
3.4.12.1 CORREL Calculate correlation<br />
3.4.12.2 CORRWM Calculate correlation to window mean<br />
3.4.11.3 CRETAN Create annual cycle (1st and 2nd annual harmonic) of daily data.<br />
3.4.4.1 DAMSEL Select a day range within each month from infile<br />
3.4.4.1 DAYSEL Select a day range within each year from infile<br />
3.4.7.1 DIV outfile = infile1 / infile2 (x/0:=0)<br />
3.4.4.1 DMDSEL Select equidistant days within each month from infile<br />
3.4.6.1 EXPONE outfile = e infile<br />
3.4.1.1 EXTRACT User interface to extraction module EXTRAKT<br />
3.4.1.2 EXTRAKT Extraction of GCM data residing on tapes to disk<br />
3.4.11.1 FINDAN Determine annual cycle (1st and 2nd annual harmonic) of daily data.<br />
3.4.9.2 FLDAVG Compute mean of input fields<br />
3.4.9.2 FLDMAX Compute maxima of input fields<br />
3.4.9.2 FLDMIN Compute minima of input fields<br />
3.4.6.4 FMASK Create floating point mask according to arithmetic comparison<br />
3.4.6.3 FPOW outfile = infile pow (0 pow =0)<br />
PAGE 3.1.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.7.3 GADD outfile = infile1 + (first record of) infile2<br />
3.4.3.3 GGDIFF Print statistics over differences of two files<br />
3.4.3.1 GGSTAT Print header information and simple statistics for each field in a file.<br />
3.4.3.2 GGSTATM Print number of fields per month in a file.<br />
3.4.3.1 GGSTATS Print header information for each field in a file.<br />
3.4.3.2 GGSTATT Print number of fields per date in a file.<br />
3.4.7.3 GDIV outfile = infile1 / (first record of) infile2<br />
3.4.9.1 GLOBAVG Compute the surface mean of input fields using weight factors for latitudes<br />
3.4.7.3 GMLT outfile = infile1 * (first record of) infile2<br />
3.4.12.3 GSCOPY File conversion from one-level to multi-level sets<br />
3.4.7.3 GSUB outfile = infile1 - (first record of) infile2<br />
3.4.4.1 HOURSEL Select a hour range within each day from infile<br />
3.4.6.1 INV outfile = 1/infile (1/0=0)<br />
3.4.10.4 LMEAN Compute multi-year monthly averages.<br />
3.4.10.4 LMMAX Compute multi-year monthly maxima.<br />
3.4.10.4 LMMIN Compute multi-year monthly minima.<br />
3.4.10.7 LMSTDV Compute multi-year monthly standard deviations.<br />
3.4.6.1 LOGE outfile = ln(infile) (ln(0):=0)<br />
3.4.6.1 LOG10 outfile = log10 (infile) (log10 (0) := 0)<br />
3.4.9.3 MERAVG Compute meridional averages of input fields<br />
3.4.9.3 MERMAX Compute meridional maxima of input fields<br />
3.4.9.3 MERMIN Compute meridional minima of input fields<br />
3.4.7.1 MLT outfile = infile1 * infile2<br />
3.4.2 MOD21 Read, unpack, transform and select data generated by ECHAM-T21.<br />
3.4.2 MOD42 Read, unpack, transform and select data generated by ECHAM-T42.<br />
3.4.2 MOD63 Read, unpack, transform and select data generated by ECHAM-T63.<br />
3.4.2 MOD106 Read, unpack, transform and select data generated by ECHAM-T106.<br />
3.4.10.2 MONAVG Compute monthly averages.<br />
3.4.10.2 MONMAX Compute monthly maxima.<br />
3.4.10.2 MONMIN Compute monthly minima.<br />
3.4.4.1 MONSEL Select a month range within each year from infile<br />
3.4.5.2 POINT Extract single points from grid fields<br />
3.4.7.4 PSADD (set of) outfile = (set of) infile2 + (field of) infile1<br />
3.4.7.4 PSDIV (set of) outfile = (set of) infile2 / (field of) infile1<br />
3.4.7.4 PSMLT (set of) outfile = (set of) infile2 * (field of) infile1<br />
3.4.7.4 PSSUB (set of) outfile = (set of) infile2 - (field of) infile1<br />
3.4.5.4 ROTATE Rotate grid fields<br />
3.4.10.3 SELAVG Compute time range averages.<br />
PAGE 3.1.2
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.4.1 SELECT Select from infile fields according to specified codes, levels and timesteps.<br />
3.4.10.3 SELMAX Compute time range maxima.<br />
3.4.10.3 SELMIN Compute time range minima.<br />
3.4.6.1 SIGN outfile = sign(infile)<br />
3.4.5.3 SLICE Extract slices from grid fields<br />
3.4.4.5 SPLITC Split file to several files, one for each code<br />
3.4.4.2 SPLITD Split file to several files, one for each day of month<br />
3.4.4.2 SPLITH Split file to several files, one for each hour of day<br />
3.4.4.5 SPLITL Split file to several files, one for each level<br />
3.4.4.2 SPLITM Split file to several files, one for each month of year<br />
3.4.4.4 SPLITS Split file to several files with equal numbers of sets<br />
3.4.4.3 SPLITY Split file to several files, one for each year<br />
3.4.6.1 SQUARE outfile = infile 2<br />
3.4.6.1 SQROOT outfile =sqrt(infile)<br />
3.4.10.6 STDDEV Calculate local standard deviation<br />
3.4.7.1 SUB outfile = infile1 - infile2<br />
3.4.11.2 SUBTAN Subtract annual cycle (1st and 2nd annual harmonic) from daily data.<br />
3.4.10.1 TIMAVG Compute time average.<br />
3.4.10.8 TIMDEV Compute deviation from time average<br />
3.4.10.1 TIMMAX Compute time maximum.<br />
3.4.10.1 TIMMIN Compute time minimum.<br />
3.4.5.1 WINDOW Extract windows from grid fields<br />
3.4.6.2 XLIN outfile = a * infile + b<br />
3.4.7.2 XYLIN outfile = a * infile1 + b * infile2 + c<br />
3.4.10.2 YEARAVG Compute yearly averages.<br />
3.4.10.2 YEARMAX Compute yearly maxima.<br />
3.4.10.2 YEARMIN Compute yearly minima.<br />
3.4.4.1 YEARSEL Select a year range from infile<br />
3.4.9.3 ZONAVG Compute zonal averages of input fields<br />
3.4.9.3 ZONMAX Compute zonal maxima of input fields<br />
3.4.9.3 ZONMIN Compute zonal minima of input fields<br />
3.4.5.5 ZXCOLC Collect slices or small windows of same level and combine them to<br />
two-dimensional fields<br />
3.4.5.5 ZXCOLD Collect slices or small windows and combine them to two-dimensional fields<br />
3.4.5.5 ZXCOLL Collect slices or small windows of same code and combine them to<br />
two-dimensional fields<br />
PAGE 3.1.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
b) in thematic order<br />
Listing of file contents<br />
3.4.3.1 GGSTAT Print header information and simple statistics for each field in a file.<br />
3.4.3.1 GGSTATS Print header information for each field in a file.<br />
3.4.3.2 GGSTATT Print number of fields per date in a file.<br />
3.4.3.2 GGSTATM Print number of fields per month in a file.<br />
3.4.3.3 GGDIFF Print statistics over differences of two files<br />
Selection of fields and splitting of files according to miscellaneous criteria<br />
3.4.4.1 SELECT Select from infile fields according to specified codes, levels and timesteps.<br />
3.4.4.1 YEARSEL Select a year range from infile<br />
3.4.4.1 MONSEL Select a month range within each year from infile<br />
3.4.4.1 DAYSEL Select a day range within each year from infile<br />
3.4.4.1 DAMSEL Select a day range within each month from infile<br />
3.4.4.1 HOURSEL Select a hour range within each day from infile<br />
3.4.4.2 SPLITM Split file to several files, one for each month of year<br />
3.4.4.2 SPLITD Split file to several files, one for each day of month<br />
3.4.4.2 SPLITH Split file to several files, one for each hour of day<br />
3.4.4.3 SPLITY Split file to several files, one for each year<br />
3.4.4.4 SPLITS Split file to several files with equal numbers of sets<br />
3.4.4.5 SPLITC Split file to several files, one for each code<br />
3.4.4.5 SPLITL Split file to several files, one for each level<br />
Selection and conversion of parts of fields<br />
3.4.5.1 WINDOW Extract windows from grid fields<br />
3.4.5.2 POINT Extract single points from grid fields<br />
3.4.5.3 SLICE Extract slices from grid fields<br />
3.4.5.4 ROTATE Rotate grid fields<br />
3.4.5.5 ZXCOLL Collect slices or small windows of same code and combine them to<br />
two-dimensional fields<br />
3.4.5.5 ZXCOLC Collect slices or small windows of same level and combine them to<br />
two-dimensional fields<br />
3.4.5.5 ZXCOLD Collect slices or small windows and combine them to two-dimensional fields<br />
PAGE 3.1.4
3.4.6.1 ABS outfile = abs(infile)<br />
3.4.6.1 SIGN outfile = sign(infile)<br />
3.4.6.1 INV outfile = 1/infile (1/0=0)<br />
3.4.6.1 SQUARE outfile = infile 2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Unary operators<br />
3.4.6.1 SQROOT outfile =sqrt(infile)<br />
3.4.6.1 EXPONE outfile = e infile<br />
3.4.6.1 LOGE outfile = ln(infile) (ln(0):=0)<br />
3.4.6.1 LOG10 outfile = log10 (infile) (log10 (0) := 0)<br />
3.4.6.2 XLIN outfile = a * infile + b<br />
3.4.6.3 FPOW outfile = infile pow (0 pow =0)<br />
3.4.6.4 FMASK Create floating point mask according to arithmetic comparison<br />
Binary operators<br />
3.4.7.1 ADD outfile = infile1 + infile2<br />
3.4.7.1 SUB outfile = infile1 - infile2<br />
3.4.7.1 MLT outfile = infile1 * infile2<br />
3.4.7.1 DIV outfile = infile1 / infile2 (x/0:=0)<br />
3.4.7.2 XYLIN outfile = a * infile1 + b * infile2 + c<br />
Binary operators, first field of second operand used only<br />
3.4.7.3 GADD outfile = infile1 + (first record of) infile2<br />
3.4.7.3 GSUB outfile = infile1 - (first record of) infile2<br />
3.4.7.3 GMLT outfile = infile1 * (first record of) infile2<br />
3.4.7.3 GDIV outfile = infile1 / (first record of) infile2<br />
Binary operators, one field of first file used for each set of second file<br />
3.4.7.4 PSADD (set of) outfile = (set of) infile2 + (field of) infile1<br />
3.4.7.4 PSSUB (set of) outfile = (set of) infile2 - (field of) infile1<br />
3.4.7.4 PSMLT (set of) outfile = (set of) infile2 * (field of) infile1<br />
3.4.7.4 PSDIV (set of) outfile = (set of) infile2 / (field of) infile1<br />
PAGE 3.1.5
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Conversion and concatenation of files in extra and service/afterburner format<br />
3.4.8.1 GRB2EXT File conversion - grib to blocked extra format<br />
3.4.8.1 GRB2SRV File conversion - grib to blocked service/afterburner format<br />
3.4.8.1 GRB2EXP File conversion - grib to unblocked extra format<br />
3.4.8.1 GRB2SRP File conversion - grib to unblocked service/afterburner format<br />
3.4.8.1 GRB2EXF File conversion - grib to formatted extra format<br />
3.4.8.1 GRB2SRF File conversion - grib to formatted service/afterburner format<br />
3.4.8.2 EXT2GRB File conversion - blocked extra to grib format<br />
3.4.8.2 SRV2GRB File conversion - blocked service/afterburner to grib format<br />
3.4.8.2 EXP2GRB File conversion - unblocked extra to grib format<br />
3.4.8.2 SRP2GRB File conversion - unblocked service/afterburner to grib format<br />
3.4.8.2 EXF2GRB File conversion - formatted extra to grib format<br />
3.4.8.2 SRF2GRB File conversion - formatted service/afterburner to grib format<br />
3.4.8.3 CATEXTF Concatenate up to 88 files in blocked extra format<br />
3.4.8.3 CATSRVF Concatenate up to 88 files in blocked service/afterburner format<br />
Computation of averages, minima and maxima over fields or time series<br />
3.4.9.1 GLOBAVG Compute the surface mean of input fields using weight factors for latitudes<br />
3.4.9.2 FLDAVG Compute mean of input fields<br />
3.4.9.2 FLDMIN Compute minima of input fields<br />
3.4.9.2 FLDMAX Compute maxima of input fields<br />
3.4.9.3 ZONAVG Compute zonal averages of input fields<br />
3.4.9.3 ZONMIN Compute zonal minima of input fields<br />
3.4.9.3 ZONMAX Compute zonal maxima of input fields<br />
3.4.9.3 MERAVG Compute meridional averages of input fields<br />
3.4.9.3 MERMIN Compute meridional minima of input fields<br />
3.4.9.3 MERMAX Compute meridional maxima of input fields<br />
3.4.10.1 TIMAVG Compute time average.<br />
3.4.10.1 TIMMIN Compute time minimum.<br />
3.4.10.1 TIMMAX Compute time maximum.<br />
3.4.10.2 MONAVG Compute monthly averages.<br />
3.4.10.2 MONMIN Compute monthly minima.<br />
3.4.10.2 MONMAX Compute monthly maxima.<br />
3.4.10.2 YEARAVG Compute yearly averages.<br />
3.4.10.2 YEARMIN Compute yearly minima.<br />
3.4.10.2 YEARMAX Compute yearly maxima.<br />
3.4.10.3 SELAVG Compute time range averages.<br />
PAGE 3.1.6
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.10.3 SELMIN Compute time range minima.<br />
3.4.10.3 SELMAX Compute time range maxima.<br />
3.4.10.4 LMEAN Compute multi-year monthly averages.<br />
3.4.10.4 LMMIN Compute multi-year monthly minima.<br />
3.4.10.4 LMMAX Compute multi-year monthly maxima.<br />
Deviation programs<br />
3.4.10.5 ANOMAL Subtract multi-year monthly time averages from a time series.<br />
3.4.10.6 STDDEV Calculate local standard deviation<br />
3.4.10.7 LMSTDV Compute multi-year monthly standard deviations.<br />
3.4.10.8 TIMDEV Compute deviation from time average<br />
Annual cycle programs<br />
3.4.11.1 FINDAN Determine annual cycle (1st and 2nd annual harmonic) of daily data.<br />
3.4.11.2 SUBTAN Subtract annual cycle (1st and 2nd annual harmonic) from daily data.<br />
3.4.11.3 CRETAN Create annual cycle (1st and 2nd annual harmonic) of daily data.<br />
Others<br />
3.4.12.1 CORREL Calculate correlation<br />
3.4.12.2 CORRWM Calculate correlation to window mean<br />
3.4.12.3 GSCOPY File conversion from one-level to multi-level sets<br />
3.4.12.4 ACCU Accumulate time series<br />
3.4.12.5 CHEAD Change grib header specifications<br />
Extraction modules<br />
3.4.1.1 EXTRACT User interface to extraction module EXTRAKT<br />
3.4.1.2 EXTRAKT Extraction of GCM data residing on tapes to disk<br />
Afterburner<br />
3.4.2 MOD21 Read, unpack, transform and select data generated by ECHAM-T21.<br />
3.4.2 MOD42 Read, unpack, transform and select data generated by ECHAM-T42.<br />
3.4.2 MOD63 Read, unpack, transform and select data generated by ECHAM-T63.<br />
3.4.2 MOD106 Read, unpack, transform and select data generated by ECHAM-T106.<br />
PAGE 3.1.7
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 3.1.8
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.2 EXAMPLES FOR LEGAL PROGRAM CALLS<br />
#<br />
# === Input < and params outfile’ appends to an already existing file<br />
# or creates a new one.<br />
#<br />
PAGE 3.2.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 3.2.2
3.3 THE GRIB-FORMAT<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The programs described below use the following specifications.<br />
- TYPE Data representation type<br />
0 latitude / longitude grid<br />
4 gaussian latitude / longitude grid<br />
-4 0 or 4<br />
50 spherical harmonic coefficients<br />
-1 any<br />
- TIME Time step number<br />
Time steps have decimal format YYMMDDHH<br />
Day of year is specified as MMDD, hour of day as HH, etc.<br />
Time ranges are specified as parameters NT1 and NT2.<br />
- CODE Data code, please refer to Table 1.<br />
Codes greater than 256 are folded to fit in one byte.<br />
Programs treat codes equal, if they have equivalent representation, e.g. codes 263 and 7 match.<br />
- LEVEL Either Isobaric level, pressure specified in hPa, or Sigma level number.<br />
Ranges are specified as parameters LV1 and LV2.<br />
For full details about the internal byte structure of grib code data see inline comments of the conversion<br />
program package and the appropriate pages of documentation ‘MARS USER GUIDE’.<br />
PAGE 3.3.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The following code-list is available from /pf/k/k204003/doc/codes<br />
type: g=grid, s=spectral, m=mean over output interval, p=packed<br />
code levels<br />
Table 1 Code numbers of the ECHAM-Models (Sheet 1 of 5)<br />
internal<br />
name<br />
type variable unit<br />
------------------ clear sky diagnostics (method II), not available in standard model ----------------------<br />
101 1 SRAFS g m net surface solar radiation (clear sky) [W/m**2]<br />
102 1 TRAFS g m net surface thermal radiation (clear sky) [W/m**2]<br />
103 1 SRAFO g m net top solar radiation (clear sky) [W/m**2]<br />
104 1 TRAFO g m net top thermal radiation (clear sky) [W/m**2]<br />
105 1 SRAFOU g m top solar radiation upward (clear sky) [W/m**2]<br />
106 1 SRAFSU g m surface solar radiation upward (clear sky) [W/m**2]<br />
107 1 TRAFSU g m surface thermal radiation upward (clear sky) [W/m**2]<br />
-----------------------------------------------------------------------------------------------------------------------<br />
129 1 GEOSP g surface geopotential (orography) [m**2/s**2]<br />
130 19 STP s temperature [K]<br />
131 19 g u-velocity [m/s]<br />
132 19 g v-velocity [m/s]<br />
133 19 SQ s specific humidity [kg/kg]<br />
134 1 APS g surface pressure [Pa]<br />
135 1 9 g vertical velocity [Pa/s]<br />
138 19 SVO s vorticity [1/s]<br />
139 1 TS g surface temperature [K] (see also 169)<br />
140 1 WS g soil wetness [m]<br />
141 1 SN g snow depth I [m]<br />
142 1 APRL g m large scale precipitation [m/s]<br />
143 1 APRC g m convective precipitation [m/s]<br />
144 1 APRS g m snow fall [m/s]<br />
145 1 VDIS g m boundary layer dissipation [W/m**2]<br />
146 1 AHFS g m surface sensible heat flux [W/m**2]<br />
147 1 AHFL g m surface latent heat flux [W/m**2]<br />
148 19 g streamfunction [m**2/s]<br />
PAGE 3.3.2
code levels<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
149 19 g velocity potential [m**2/s]<br />
151 1 g mean sea level pressure [Pa]<br />
152 1 STP(20) s log surface pressure<br />
153 19 SX s liquid water content [kg/kg] (see 161, 222)<br />
154<br />
Table 1 Code numbers of the ECHAM-Models (Sheet 2 of 5)<br />
internal<br />
name<br />
type variable unit<br />
155 19 SD s divergence [1/s]<br />
156 19 g geopotential height [gpm]<br />
157 19 g relative humidityII [fract.]<br />
158 1 g tendency of surface pressureII [Pa/s]<br />
159 1 USTAR3 g m ustar**3 [m**3/s**3]<br />
160 1 RUNOFF g m surface runoff (not ECHAM1 !) III [m/s] (see also 271)<br />
161 19 ALWC g liquid water content [kg/kg] (see also 222)<br />
162 19 ACLC g cloud cover [fract.] (see also 223)<br />
163 1 ACLCV g total cloud cover [fract.] (see also 164)<br />
164 1 ACLCOV g m total cloud cover [fract.]<br />
165 1 U10 g m 10m u-velocity [m/s]<br />
166 1 V10 g m 10m v-velocity [m/s]<br />
167 1 TEMP2 g m 2m temperature [K]<br />
168 1 DEW2 g m 2m dew point temperature [K]<br />
169 1 TSURF g m surface temperature [K] (see also 139)<br />
170 1 TD g deep soil temperature IV [K]<br />
171 1 WIND10 g m 10m windspeed [m/s]<br />
172 1 SLM g land sea mask [0: sea, 1: land]<br />
173 1 AZ0 g surface roughness [m]<br />
174 1 ALB g surface background albedo [fract.]<br />
175 1 ALBEDO g surface albedo [fract.]<br />
176 1 SRADS g m surface solar radiation [W/m**2]<br />
177 1 TRADS g m surface thermal radiation [W/m**2]<br />
178 1 SRAD0 g m top solar radiation [W/m**2]<br />
179 1 TRAD0 g m top thermal radiation [W/m**2]<br />
PAGE 3.3.3
code levels<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 1 Code numbers of the ECHAM-Models (Sheet 3 of 5)<br />
internal<br />
name<br />
180 1 USTR g m u-stress [Pa]<br />
181 1 VSTR g m v-stress [Pa]<br />
182 1 EVAP g m Evaporation [m/s]<br />
183 1 TDCL g soil temperature IV [K]<br />
194 1 WLM1 g skin reservoir content of plants [m]<br />
195 1 USTRGW g m u-gravity wave stress [Pa]<br />
196 1 VSTRGW g m v-gravity wave stress [Pa]<br />
197 1 VDISGW g m gravity wave dissipation [W/m**2]<br />
201 1 T2MAX g maximum 2m-temperature [K]<br />
202 1 T2MIN g minimum 2m-temperature [K]<br />
203 1 SRAD0U g m top solar radiation upward [W/m**2]<br />
204 1 SRADSU g m surface solar radiation upward [W/m**2]<br />
205 1 TRADSU g m surface thermal radiation upward [W/m**2]<br />
206 1 TSN g snow temperature IV [K]<br />
207 1 TD3 g soil temperature IV [K]<br />
208 1 TD4 g soil temperature IV [K]<br />
209 1 TD5 g soil temperature IV [K]<br />
210 1 SEAICE g sea ice cover [fract.]<br />
211 1 SICED g sea ice depth [m]<br />
212 1 FOREST g vegetation type<br />
type variable unit<br />
213 1 TEFF g (effective) sea-ice skin temperature [K]<br />
214 1 TSMAX g maximum surface temperature [K]<br />
215 1 TSMIN g minimum surface temperature K]<br />
216 1 WIMAX g maximum 2m-wind speed [m/s]<br />
217 1 TOPMAX g maximum convective cloud tops [m]<br />
218 1 SNMEL g m snow melt [m/s]<br />
220 1 TSLIN g m land: residual surface heat budget<br />
sea-ice: conductive heat flux<br />
PAGE 3.3.4<br />
[W/m**2]<br />
[W/m**2]
code levels<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
221 1 DSNAC g m snow depth change [m/s]<br />
222 19 ALWCAC g m liquid water content [kg/kg]<br />
223 19 ACLCAC g m cloud cover [fract.]<br />
------------------ clear/overcast sky diagnostics (method I) -----------------------<br />
224 1 SRAD0F g m top solar radiation in clear-sky areas [W/m**2]<br />
225 1 TRAD0F g m top thermal radiation in clear-sky areas [W/m**2]<br />
226 1 ACCNTF g number of clear-sky events<br />
227 1 SRAD0C g m top solar radiation in overcast areas [W/m**2]<br />
228 1 TRAD0C g m top thermal radiation in overcast areas [W/m**2]<br />
229 1 ACCNTC g number of overcast events<br />
------------------------------------------------------------------------------------------------------------------------<br />
230 1 QVI g m vertically integrated specific humidity [kg/m**2]<br />
231 1 ALWCVI g m vertically integrated liquid water cont. [kg/m**2]<br />
232 1 GLAC g glacier mask [0: no, 1: yes]<br />
241 19 XT(1) s tracer gas<br />
. .<br />
Table 1 Code numbers of the ECHAM-Models (Sheet 4 of 5)<br />
internal<br />
name<br />
255 19 XT(15) s tracer gas<br />
type variable unit<br />
259 19 g windspeed ((u**2+v**2) 1/2 )<br />
260 1 g m total precipitation (142+143)<br />
261 1 g m total top radiation (178+179)<br />
262 1 g m total surface radiation (176+177)<br />
263 1 g m net surface heat flux (146+147+176+177-220)<br />
264 1 g m total surface water (142+143+182-160)<br />
265 1 g m top solar cloud forcing (method I) (178-224)<br />
266 1 g m top thermal cloud forcing (method I) (179-225)<br />
267 1 g m total top cloud forcing (method I) (178+179-224-225)<br />
268 1 g m atmospheric solar radiation (178-176)<br />
269 1 g m atmospheric thermal radiation (179-177)<br />
270 1 g m total atmospheric radiation (178+179-176-177)<br />
271 1 g m surface runoff (only ECHAM1 !) (142+143+182-221)<br />
PAGE 3.3.5
code levels<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 1 Code numbers of the ECHAM-Models (Sheet 5 of 5)<br />
internal<br />
name<br />
272 19 g mass stream function<br />
type variable unit<br />
273 1 g dp s /dλ zonal derivative of surface pressure<br />
274 1 g dp s /dφ meridional derivative of surface pressure<br />
275 1 g m precipitation - evaporation (142+143+182)<br />
------------------ cloud forcing (method II), not available in the standard model ----------------------<br />
364 g m top solar cloud forcing (178-103)<br />
365 g m top thermal cloud forcing (179-104)<br />
366 g m top net cloud forcing (364+365)<br />
370 g m surface solar cloud forcing (176-101)<br />
371 g m surface thermal cloud forcing (177-102)<br />
372 g m surface net cloud forcing (370+371)<br />
373 g m atmospheric solar cloud forcing (364-370)<br />
374 g m atmospheric thermal cloud forcing (365-371)<br />
375 g m atmospheric net cloud forcing (373+374)<br />
376 g m surface net radiation (clear sky) (101+102)<br />
377 g m atmospheric solar radiation (clear sky) (103-101)<br />
378 1 g m atmospheric thermal radiation (clear sky) (104-102)<br />
379 1 g m atmospheric net radiation (clear sky) (377+378)<br />
---------------------------------------------------------------------------------------------------------------------<br />
380 1 g m planetary albedo V -(203/(178-203))*100. [fract.]<br />
381 1 g m planetary albedo V -(105/(103-105))*100. [fract.] (clear sky)<br />
382 1 g m surface albedo -(204/(176-204))*100. [fract.]<br />
I. ECHAM1:<br />
Due to a coding error the runoff (code 160) should not be used.<br />
A "residual runoff" (code 271) may be applied for long term water budget studies instead.<br />
II. Codes 157 (relative humidity) and 158 (tendency of surface pressure) are predefined but not calculated by the<br />
afterburner package.<br />
III. ECHAM2/ECHAM3:<br />
Over land ice (SN > 9.5 m or GLAC = 1) the snow melt is not calculated i.e. the snow gradually<br />
accumulates. In long term integrations with coupled models a suitable ice flow to the ocean<br />
(glacier calving) has to be introduced for maintaining the water budget.<br />
PAGE 3.3.6
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
IV. For description of soil temperatures see section 3.7.2<br />
V. The planetary albedo (code 380 and 381, respectively for clear sky) equals zero, if the numerator is zero.<br />
Calculate albedos only from temporal or eventually spatial mean fluxes. The global mean results<br />
from the glogal mean of fluxes !<br />
<strong>No</strong>te: For a description of method I and method II of calculating clear sky diagnostics and cloud forcing<br />
refer to <strong>DKRZ</strong> <strong>Technical</strong> <strong>Report</strong> <strong>No</strong>. 6, The ECHAM3 Atmosphere Model, Appendix F.<br />
T s<br />
T Sn<br />
T D3<br />
T D4<br />
T D5<br />
T D<br />
T DCL<br />
surface temperature (interface to the atmosphere)<br />
snow temperature<br />
soil temperatures<br />
Figure 1 Description of soil temperatures in the ECHAM model. 1<br />
For detailed description of soil processes refer to <strong>DKRZ</strong> <strong>Technical</strong> <strong>Report</strong> <strong>No</strong>. 6, The<br />
ECHAM3 Atmosphere Model, section 3.13 .<br />
1. <strong>No</strong>te that the surface temperature T s is always the interface temperature to the atmosphere even in<br />
snow coverded areas.<br />
PAGE 3.3.7
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 3.3.8
3.4 DESCRIPTION OF THE MODULES<br />
3.4.1 Extraction modules<br />
3.4.1.1 EXTRACT<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The procedure EXTRACT creates a namelist file and calls procedure EXTRAKT to read GCM<br />
results from tape.<br />
Calling sequence<br />
Parameters<br />
extract \<br />
-exp experiment \<br />
-psd scratch \<br />
-rfp result \<br />
-pit text1 \<br />
-pit text2<br />
text1, text2,... : lines of namelist parameters<br />
For meaning of parameters see appropriate program descriptions<br />
(e.g. afterburner package (mod21, mod42, mod63, mod106), select).<br />
Parameters not used by EXTRACT are propagated to EXTRAKT.<br />
The most important ones are:<br />
experiment: experiment mnemonic<br />
scratch: scratch directory used for tape processing<br />
If specified, it must precede parameters -pit .<br />
Default is $TMPDIR.<br />
result: result file prefix<br />
Processing output files will have names "resultYYMM", where date format matches the one on input<br />
tape labels.<br />
Example:<br />
extract \<br />
-exp Control \<br />
-psd $TMPDIR/example \<br />
-rfp $MFHOME/result \<br />
-pit ’type=30 code=156’ \<br />
-pit ’level=50000,30000,20000,10000’ \<br />
-pit ’mean=0 grib=1’<br />
PAGE 3.4.1.1
3.4.1.2 EXTRAKT<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The procedure EXTRAKT provides an easy way to access tape data generated by a GCM. Usually<br />
it is called via procedure EXTRACT.<br />
If the features given by EXTRACT suffice for your purposes, this description should be left alone.<br />
Parameters (with only a few exceptions: lop, skp, end and err) have the general form ‘-par value’.<br />
Upper case and lower case characters can be mixed in any way and are significant for file names<br />
only.<br />
Parameter overview<br />
Parameter for listing<br />
lst list<br />
Parameters starting with ’p’ for processing<br />
pyf process year first<br />
pyl process year last<br />
pmf process month first<br />
pml process month last<br />
pmb process month begin<br />
pme process month end<br />
pmi process month increment<br />
psd process scratch directory<br />
ppn process procedure name<br />
ppi process procedure input<br />
Parameters starting with ’r’ for result file name<br />
rfp result file prefix<br />
rfi result file infix<br />
rfs result file suffix<br />
rfy result file yearpad<br />
rfm result file monthpad<br />
rfc result file centurypad<br />
Parameters for recursive procedure calls<br />
exp experiment<br />
emp experiment mnemonic prefix<br />
epc experiment parameter cut<br />
epl experiment parameter list<br />
lop loop<br />
PAGE 3.4.1.2
skp skip<br />
end end<br />
err error<br />
msg message<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Parameters starting with ’i’ for input tape description<br />
ivf intape vsn first<br />
ivi intape vsn increment<br />
ilp intape label prefix<br />
ili intape label infix<br />
ils intape label suffix<br />
ilc intape label centurypad<br />
ild intape label delimiter<br />
ily intape label yearpad<br />
ilm intape label monthpad<br />
ipf intape position first<br />
ipi intape position increment<br />
ipn intape position number<br />
iyf intape year first<br />
iyi intape year increment<br />
iyl intape year last<br />
imf intape month first<br />
imi intape month increment<br />
iml intape month last<br />
imb intape month begin<br />
ime intape month end<br />
imo intape month omit<br />
ibl intape block length<br />
icf intape check file<br />
ijp intape job prefix<br />
idt intape data type<br />
iac intape access command<br />
idp intape diskfile prefix<br />
ijc intape job class<br />
Parameter for listing<br />
lst list<br />
Default is no listing, but processing. Allowed values are no, short and long.<br />
Used to list available experiment data specifications or to check input tape description<br />
parameters.<br />
Listing for -lst short contains<br />
PAGE 3.4.1.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
• Experiment mnemonic, if any<br />
• Availability of tapes needed (+ for yes, - for no, * for partial)<br />
• Starting VSN and date<br />
• Ending VSN and date<br />
• Listing for -lst long contains<br />
• Name of each tape job that would be submitted<br />
• VSN and availability of each tape accessed<br />
• Position and label of each file on tape<br />
Parameters starting with ’p’ for processing<br />
pyf process year first<br />
pyl process year last<br />
pmf process month first<br />
pml process month last<br />
First year, last year, first month and last month to process.<br />
Default is to process all data, i.e. iyf, iyl, imf and iml.<br />
The procedure processes files from tape always in one piece; structures and dates inside<br />
these files are hidden to the procedure. For the selection of files the starting date (i.e. the<br />
date information on tape label) is checked only.<br />
pmb process month begin<br />
pme process month end<br />
pmi process month increment<br />
First and last month and increment starting from pmb to form month numbers processed<br />
within each year.<br />
Defaults for pmb and pme are imb and ime. Default for pmi is 1.<br />
The default values process whole years.<br />
psd process scratch directory<br />
Scratch directory for tape processing.<br />
Default is $TMPDIR.<br />
Used to protect files in $TMPDIR from being deleted.<br />
If specified, psd should be a subdirectory of $TMPDIR, because it will contain disk<br />
copies of tape data, which usually are very big.<br />
ppn process procedure name<br />
Procedure to process tape data.<br />
Defaults for idt=gcm* are the appropriate afterburner programs (mod*) by E.Kirk.<br />
Default for idt=mod is the module select.<br />
Defaults for idt=obs_* are the appropriate data handling programs by I. Jessel.<br />
This procedure is given two file names and (optional) parameter input. The first file<br />
contains a disk copy of tape data. The second file is the result file name formed by<br />
rf-parameter values and year and month numbers.<br />
ppi process procedure input<br />
Input file for process procedure.<br />
Default is no input.<br />
If specified, this file is given as input to the procedure ppn.<br />
PAGE 3.4.1.4
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Parameters starting with ’r’ for result file name<br />
rfp result file prefix<br />
rfi result file infix<br />
rfs result file suffix<br />
Prefix, infix and suffix to form result file names.<br />
Defaults are empty strings.<br />
Result file names are formed as<br />
"rfp [rfc] [rfy ily] year rfi [rfm ilm] month rfs" ,<br />
where appearance of parameters in brackets depends on number of characters in year and<br />
month.<br />
rfy result file yearpad<br />
rfm result file monthpad<br />
rfc result file centurypad<br />
Result file name padding for year and month number.<br />
Default is no padding, i.e. empty strings.<br />
If padding is on, one-digit year and month numbers are prefixed by rfy and rfm, resp. to<br />
form two-digit numbers used for result file names.<br />
Padding with rfc is done for one- or two-digit year numbers only.<br />
Result file padding should be used only, if intape label padding does not suffice to form<br />
lexically ordered result files.<br />
Use ‘no’ to specify empty strings.<br />
Parameters for recursive procedure calls<br />
exp experiment<br />
Experiment mnemonic name.<br />
A prefix of ‘=’ is replaced by the actual value of emp, exp is translated to upper case,<br />
‘==’ is appended, then file epl is searched for lines starting with the resulting pattern.<br />
From all matching lines the first epc characters are cut away and parameter exp is<br />
replaced by the remaining line parts.<br />
emp experiment mnemonic prefix<br />
Prefix for experiment mnemonic names. Default is the empty string.<br />
Used to simplify loops over mnemonic names with similar prefixes.<br />
epc experiment parameter cut<br />
Experiment parameter list cutcount.<br />
Default is 30.<br />
Number of characters cut away from lines in epl starting with exp==.<br />
epl experiment parameter list<br />
Experiment parameter list file.<br />
Default is =main.<br />
This file contains frequently used parameters.<br />
As the order of parameters is retained over recursive procedure calls, one can switch<br />
between several parameter list files.<br />
A prefix of ‘=’ is equivalent to a directory containing files with tape structure information<br />
for all experiments known to the author.<br />
When using specifications from these files, parameters describing input tapes (i.e. those<br />
starting with ‘i’) should be omitted.<br />
PAGE 3.4.1.5
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
See info /pool/GRIB/info/exper for a list of available experiment output data.<br />
lop loop<br />
Loop over experiment parts.<br />
Each following parameter value until the ending delimiter ‘-end’ results in a recursive<br />
procedure call with the parameter value used as experiment mnemonic name and all<br />
other parameters retained.<br />
skp skip<br />
Skip parameters.<br />
Ignores all parameters until the ending delimiter ‘-end’.<br />
end end<br />
End delimiter for lop and skp, not used by itself.<br />
msg message<br />
’@’ are converted to blanks.<br />
err error<br />
Error forced by calling routine.<br />
If procedures as EXTRACT detect an parameter error, they can use this option to make<br />
EXTRAKT perform a parameter check without processing.<br />
It is recommended to add this parameter twice, because else it could be treated as a<br />
parameter value and be ignored.<br />
Parameters starting with ’i’ for input tape description<br />
ivf intape vsn first<br />
ivi intape vsn increment<br />
VSN of first input tape and increment to compute subsequent VSNs.<br />
<strong>No</strong> default for ivf, parameter is required.<br />
Default for ivi is 1.<br />
The increment is added to the ending numeric part of parameter ivf.<br />
The resulting number is prefixed by starting characters of parameter ivf to form a sixcharacter<br />
VSN for the second tape.<br />
This procedure continues for the third and following tapes.<br />
ilp intape label prefix<br />
ili intape label infix<br />
ils intape label suffix<br />
ilc intape label centurypad<br />
ild intape label delimiter<br />
Input tape label prefix, infix, suffix, centurypad and delimiter.<br />
Defaults are empty strings.<br />
Padding with ilc is done for one- or two-digit year numbers only.<br />
File labels on tapes are formed as “ilp [ilc] ild [ily] year ili [ilm] month ils” , where<br />
appearance of parameters in brackets depends on number of characters in year and<br />
month.<br />
ily intape label yearpad<br />
ilm intape label monthpad<br />
Input tape label padding for year and month number.<br />
Default is padding with 0.<br />
PAGE 3.4.1.6
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
If padding is on, one-digit year and month numbers are prefixed by ily and ilm, resp. to<br />
form two-digit numbers used for tape file labels and result file names.<br />
Use no to specify empty strings.<br />
ilo intape label omit<br />
Switch to omit input tape label checks.<br />
Default is no.<br />
If set to yes, input tape labels are not checked.<br />
ipf intape position first<br />
ipi intape position increment<br />
ipn intape position number<br />
First file position on tapes, increment to compute subsequent positions and number of<br />
files on any one tape.<br />
Defaults are 1.<br />
iyf intape year first<br />
iyi intape year increment<br />
iyl intape year last<br />
First and last year of input data and increment to form year numbers.<br />
Defaults for iyf and iyi are 1.<br />
Default for iyl is iyf.<br />
imf intape month first<br />
imi intape month increment<br />
iml intape month last<br />
First month of year iyf, last month of year iyl and increment to form month numbers.<br />
Default for imf is imb.<br />
Default for imi is 1.<br />
Default for iml is ime.<br />
imb intape month begin<br />
ime intape month end<br />
Beginning and ending month of a year.<br />
Default for imb is 1.<br />
Default for ime is 12.<br />
Year breaks inside input tape files are hidden to the procedure.<br />
By shifting imb and ime these files can be handled.<br />
For yearly mean files specified as month 00 set imb and ime to zero.<br />
imo intape month omit<br />
Indicator to omit month numbers in input tape labels.<br />
Default for imo is no.<br />
If set to yes, month numbers are not inserted in input tape labels.<br />
Month loop bounds are not influenced.<br />
ibl intape block length<br />
Block length on input tapes for use on the CRAY-YMP.<br />
Default is 172032.<br />
This parameter is ignored on the CRAY-2S.<br />
PAGE 3.4.1.7
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
icf intape check file<br />
File to check if tape read errors are fatal.<br />
Default is no check file.<br />
If a job submitted to read tape data aborts without generating the desired disk file, this<br />
file (if specified) is searched for two- to five-digit year and month information as on tape<br />
label.<br />
If that date is found, the procedure exits without error, else an exit code is set.<br />
ijp intape job prefix<br />
Part of names for jobs submitted to read tapes.<br />
Default is Ext.<br />
idt intape data type<br />
Type of data on input tapes.<br />
Default is gcm21.<br />
Allowed values are gcm*, mod and obs_*.<br />
iac intape access command<br />
Command used to copy file from tape to disk.<br />
Default is cp.<br />
Allowed values are cp and ta.<br />
idp intape diskfile prefix<br />
File name prefix (without directory name) for disk copy of tape file.<br />
Default is no prefix.<br />
ijc intape job class<br />
Job class for jobs submitted to read data from tapes.<br />
Default for iac=cp is TS.<br />
Default for iac=ta is TM.<br />
PAGE 3.4.1.8
3.4.2 Afterburner<br />
3.4.2.1 Overview<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The afterburner is a program dealing with the model data of the specific truncations of the ECHAM<br />
model (T21, T42, T63 and T106).<br />
The name of the program is after or alternatively:<br />
mod21, mod42, mod63 or mod106.<br />
The last 4 names are symbolic links to after (held for traditional reasons).<br />
The purpose of the program is to read, unpack, transform and select data from T-model GRIB files, and<br />
write them either unformatted (unblocked SERVICE/afterburner format) or in GRIB format for further<br />
processing using the GRIB Format programs descibed later on in this documentation.<br />
The transformation capabilities of the afterburner include optional spectral transformation as well as<br />
optional interpolation from originally 19 ECHAM hybrid levels to pressure levels.<br />
The selection feature consists of code selection and level selection.<br />
Selection and transformation can be combined, e.g. to write out the geopotential field, which is originally<br />
represented as a grid point field on hybrid levels, as spectral coefficients on the 500 hPa pressure level.<br />
3.4.2.2 Usage<br />
The calling sequences of the program is:<br />
where<br />
/pf/k/k204004/burn/after inputdata outputdata [Debug] < namelist [>myoutput]<br />
/pf/k/k204004/burn/after executable program (alternative names: see above)<br />
inputdata path/filename of GRIB data<br />
outputdata path/filename of resultfile in specified format<br />
Debug optional parameter to check memory allocation (written on stderr)<br />
namelist path/filename of namelistfile (structure: see below)<br />
myoutput optional path/filename to redirect stdout<br />
PAGE 3.4.2.1
3.4.2.3 Namelist<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The standard input of the programs is a namelist, which can/must contain the following keywords and<br />
user specifications:<br />
Keyword<br />
possible user<br />
specification<br />
TYPE 0<br />
10<br />
11<br />
20<br />
30<br />
40<br />
41<br />
50<br />
60<br />
61<br />
70<br />
Table 2: Afterburner standard input<br />
PAGE 3.4.2.2<br />
Meaning Default<br />
Output of spectral coefficients on hybrid levels.<br />
Output of fourier coefficients on hybrid levels.<br />
Output of zonal mean sections on hybrid levels.<br />
Output of gauss grid on hybrid levels.<br />
Output of gauss grid on pressure levels.<br />
Output of fourier coefficients on pressure levels.<br />
Output of zonal mean sections on pressure levels.<br />
Output of spectral coefficients on pressure levels.<br />
Output of fourier coefficients on pressure levels.<br />
Output of zonal mean sections on pressure levels.<br />
Output of gauss grid on pressure levels.<br />
CODE 1-275 various variables (ECMWF field code), see section 3.3 . none<br />
UNITSEL 0<br />
1<br />
2<br />
hybrid or pressure level (all types) depending on type (default)<br />
height level in metres for type > 20<br />
height level in kilometres for type > 20<br />
LEVEL > 0 hybrid level for unitsel = 0, type < 30<br />
pressure level in Pascal ! for unitsel = 0, type > 20<br />
height level in metres for unitsel = 1, type > 20<br />
height level in kilometres for unitsel = 2, type > 20<br />
MULTI 0<br />
n<br />
Process only one input file.<br />
Process n input files, each containing one month.<br />
Put only the first input file into the command line.<br />
All subsequent files are expected to be in the same directory.<br />
The filenames must follow the syntax<br />
fileprefix_YYMM for ECHAM1/2/3<br />
fileprefix_YYMM.DD for ECHAM4<br />
where YY denotes year, MM month and DD day, respectively.<br />
DAYINC > 0 ECHAM4 output files for higher truncations (T63, T106) do not<br />
neccessarily contain full months, because of their length. If you<br />
want to use MULTI > 0 to process those files, DAYINC gives the<br />
number of days per file to calculate subsequent filenames.<br />
0<br />
0<br />
none<br />
0<br />
30
Keyword<br />
possible user<br />
specification<br />
MEAN 0<br />
1<br />
Two more keywords belong to the namelist:<br />
2<br />
3<br />
GRIB 0<br />
1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Write out all terms.<br />
Compute and write out monthly mean fields.<br />
(for TYPE>=20 only)<br />
Compute and write out monthly deviations.<br />
(for TYPE=20 or TYPE=30 only)<br />
Combination of MEAN=1 and MEAN=2. Each mean field is followed<br />
by a deviation field with an identical header record<br />
(for TYPE=20 or TYPE=30 only)<br />
The outputdata file is an unformatted (unblocked SERVICE/afterburner<br />
format) one with the following structure:<br />
The hole file consists of pairs of header records and data records,<br />
The header record is an integer array of 8 elements.<br />
The format of the outputfile is GRIB<br />
(Currently this option only works for TYPE=20, 30, 50 or 70)<br />
HEAD7 any integer This parameter is for personal use.<br />
All header records (unblocked SERVICE/afterburner format)<br />
take this value as their 7th element.<br />
The contents of the header record are:<br />
1. Word: ECMWF field code<br />
2. Word: level (1-19) or pressure [Pa]<br />
3. Word: date [yymmdd] (yymm00 for monthly means)<br />
4. Word: time [hh] (-1 for monthly means)<br />
5. Word: 1st dimension of the data array<br />
6. Word: 2nd dimension of the data array<br />
7. Word: may be set using the parameter HEAD7<br />
8. Word: experiment number (extracted from inputdata filename)<br />
TIMESEL -1<br />
0<br />
6<br />
12<br />
18<br />
Table 2: Afterburner standard input<br />
Process all terms found on input file.<br />
Process only 00 hour terms.<br />
Process only 06 hour terms.<br />
Process only 12 hour terms.<br />
Process only 18 hour terms.<br />
Reassure that the inputdata file contains the term you<br />
selected.<br />
&SELECT to indicate the beginning of the namelist<br />
&END to indicate the end of the namelist<br />
PAGE 3.4.2.3<br />
Meaning Default<br />
0<br />
0<br />
0<br />
-1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
A typical example for the generation of a namelist file using the UNIX here document is:<br />
cat > namelistfile
3.4.2.5 Troubleshooting<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The afterburner package writes pure (unblocked) data files without any record information.<br />
So don’t forget the pure (CRAY-2S) or the unblocked (CRAY-YMP) attribute in the assign statement<br />
before reading it with the FORTRAN READ or the CRAY-FORTRAN BUFFER IN.If you read it using<br />
fread an assign statement is not needed.<br />
Check your namelist file, espacially for invalid codes, types and levels.<br />
If all fails run the program with the Debug parameter mentioned above, e.g.<br />
mod21 < namelistfile > myoutput inputdata outputdata Debug<br />
Make the file myoutput readable for the public (using chmod 744 myoutput) and call the user support<br />
group at the <strong>DKRZ</strong>.<br />
3.4.2.6 Possible combinations of TYPE, CODE and MEAN<br />
TYPE CODE MEAN<br />
0-11 130 temperature<br />
131 u-velocity<br />
132 v-velocity<br />
133 specific humidity<br />
138 vorticity<br />
148 streamfunction<br />
149 velocity potential<br />
152 ln p s<br />
155 divergence<br />
20-70 All codes 0/1<br />
The four variables vorticity, divergence, streamfunction and velocity potential need special treatment if<br />
the output on pressure levels (TYPE > 20) is selected. They are not available as TYPEs 30, 40 and 41.<br />
If you select one of those combinations, TYPE is automatically switched to 70, 60 and 61 respectively.<br />
PAGE 3.4.2.5<br />
0
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 3.4.2.6
3.4.3 Listing of file contents<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.3.1 GGSTAT Print header information and simple statistics for each field in a file.<br />
3.4.3.1 GGSTATS Print header information for each field in a file.<br />
3.4.3.2 GGSTATT Print number of fields per date in a file.<br />
3.4.3.2 GGSTATM Print number of fields per month in a file.<br />
3.4.3.3 GGDIFF Print statistics over differences of two files<br />
PAGE 3.4.3
3.4.3.1 GGSTAT GGSTATS<br />
Calling sequences<br />
Purposes<br />
Input file<br />
Listing<br />
<strong>No</strong>tes<br />
Example<br />
GGSTAT infile<br />
GGSTATS infile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
GGSTAT Print header information and simple statistics for each field in a file.<br />
GGSTATS Print header information for each field in a file.<br />
infile Required Grid and/or spectral file<br />
For each field both programs print<br />
• the record number<br />
• a specification of GRID or spherical harmonics (SPEC)<br />
• the code<br />
• the level (either hektopascal or sigma level number)<br />
• GRID - no. of latitudes and longitudes<br />
• SPEC - dimensions with product giving length of field<br />
Additionally GGSTAT prints<br />
• internal number of data mask (0 means no mask)<br />
• pack size in bits per data value<br />
• GRID - minimum, maximum, mean and variance of field<br />
• SPEC - mean of field<br />
One line is printed for each record in the file, this may result in a very large printer output.<br />
If minimum, maximum, mean and variance are not needed, use the much faster GGSTATS.<br />
<strong>No</strong>ne<br />
PAGE 3.4.3.1
3.4.3.2 GGSTATT GGSTATM<br />
Calling sequences<br />
Purposes<br />
Input file<br />
<strong>No</strong>tes<br />
Example<br />
GGSTATT infile<br />
GGSTATM infile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
GGSTATT Print number of fields per date in a file.<br />
GGSTATM Print number of fields per month in a file.<br />
infile Required Grid and/or spectral file<br />
One line is printed for each date/month in the file, this may result in a large printer output.<br />
On page 3.5.5<br />
PAGE 3.4.3.2
3.4.3.3 GGDIFF<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Listing<br />
<strong>No</strong>tes<br />
Examples<br />
GGDIFF infile1 infile2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
GGDIFF Print statistics over differences of two files<br />
infile1 Required Grid and/or spectral file<br />
infile2 Required Grid and/or spectral file<br />
For each pair of fields the program prints<br />
• the record number<br />
• a specification of GRID or spherical harmonics (SPEC)<br />
• the code<br />
• the level (either in hPa or as sigma level number)<br />
• GRID - no. of latitudes and longitudes<br />
• SPEC - dimensions with product giving length of field<br />
• internal number of data mask (0 means no mask)<br />
• pack size in bits per data value<br />
• occurrence of coefficients pairs with different signs<br />
• occurrence of zero values<br />
• the maximum absolute difference of coefficient pairs<br />
• the maximum relative difference of non-zero coefficient pairs with equal signs<br />
One line is printed for each record pair in the files, this may result in a very large printer output.<br />
If header informations on input files do not match, the program stops.<br />
<strong>No</strong>ne<br />
PAGE 3.4.3.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.4 Selection of fields and splitting of files according to miscellaneous criteria<br />
3.4.4.1 SELECT Select from infile fields according to specified codes, levels and timesteps.<br />
3.4.4.1 FLDSEL Alias for SELECT to avoid conflicts with Korn shell command select<br />
3.4.4.1 YEARSEL Select a year range from infile<br />
3.4.4.1 MONSEL Select a month range within each year from infile<br />
3.4.4.1 DAYSEL Select a day range within each year from infile<br />
3.4.4.1 DAMSEL Select a day range within each month from infile<br />
3.4.4.1 HOURSEL Select a hour range within each day from infile<br />
3.4.4.2 SPLITM Split file to several files, one for each month of year<br />
3.4.4.2 SPLITD Split file to several files, one for each day of month<br />
3.4.4.2 SPLITH Split file to several files, one for each hour of day<br />
3.4.4.3 SPLITY Split file to several files, one for each year<br />
3.4.4.4 SPLITS Split file to several files with equal numbers of sets<br />
3.4.4.5 SPLITC Split file to several files, one for each code<br />
3.4.4.5 SPLITL Split file to several files, one for each level<br />
PAGE 3.4.4
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.4.1 SELECT DATESEL YEARSEL MONSEL DAYSEL DAMSEL HOURSEL<br />
Calling sequences<br />
Purpose<br />
Input file<br />
Output files<br />
SELECT infile out01 out02 ... out88<br />
DATESEL infile out01 out02 ... out88<br />
YEARSEL infile out01 out02 ... out88<br />
MONSEL infile out01 out02 ... out88<br />
DAYSEL infile out01 out02 ... out88<br />
DAMSEL infile out01 out02 ... out88<br />
HOURSEL infile out01 out02 ... out88<br />
SELECT Select fields according to specified codes, levels and timesteps from infile.<br />
DATESEL Select a time range from infile<br />
YEARSEL Select a year range from infile<br />
MONSEL Select a month range within each year from infile<br />
DAYSEL Select a day range within each year from infile<br />
DAMSEL Select a day range within each month from infile<br />
HOURSEL Select a hour range within each day from infile<br />
infile Required Grid and/or spectral file<br />
out01 Required File for first code selected or all codes<br />
out02 Files for optional second to<br />
out88 88th code<br />
Input parameters<br />
nt1 First time step Integer Default is from start of input file<br />
nt2 Last time step Integer Default is until end of input file<br />
nti Time step increment Integer Default is 1<br />
lv1 First level Integer Default is vacuum<br />
lv2 Last level Integer Default is ground level<br />
PAGE 3.4.4.1
<strong>No</strong>tes<br />
Examples<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
level Levels to be selected Integer array(20) Default is all levels.<br />
file Files to be written Integer array(256) For default see below.<br />
code Codes to be selected for Integer array(256) For default see below<br />
outputfiles<br />
type Types to be selected for Integer array(256) For default see below<br />
outputfiles<br />
A code equal -1 selects all codes on infile. The first matching element is used, so a ‘-1’ terminating<br />
the code sequence collects all codes not explicitly selected.<br />
• The number of output files specified must be one or must match the number of codes<br />
selected (including a terminating ‘-1’, if present).<br />
• Specification of parameters level and lv1/lv2 is mutually exclusive.<br />
• If nt1 greater nt2, date ranges are wrapped around interval bounds.<br />
On page 3.5.5 and page 3.5.10 to page 3.5.13<br />
PAGE 3.4.4.1
3.4.4.2 SPLITM SPLITD SPLITH<br />
Calling sequences<br />
Purposes<br />
Input file<br />
SPLITM infile outfile<br />
SPLITD infile outfile<br />
SPLITH infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
SPLITM Split file to several files, one for each month of year<br />
SPLITD Split file to several files, one for each day of month<br />
SPLITH Split file to several files, one for each hour of day<br />
infile Required Grid and/or spectral file<br />
Output file(s)<br />
<strong>No</strong>tes<br />
Example<br />
outfile Optional Prefix for output files named outfilexx with outfile replaced by the name<br />
given on the command line and xx replaced by a two-digit date number part.<br />
Default is name specified for file infile.<br />
Fields of same month/day/hour in different years/month/day are collected to one file. Thus maximum<br />
number of output files is 12/30(31)/24.<br />
Be sure to provide two additional characters for date information in output file names.<br />
On page 3.5.24<br />
PAGE 3.4.4.2
3.4.4.3 SPLITY<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output files<br />
<strong>No</strong>te<br />
Example<br />
SPLITY infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
SPLITY Split file to several files, one for each year<br />
infile Required Grid and/or spectral file<br />
outfile Optional Prefix for output files named outfileyy with outfile replaced by the name<br />
given on the command line and yy replaced by two-digit year numbers.<br />
Default is name specified for file infile.<br />
Year numbers greater than 99 are coded as ‘a0’ to ‘a9’, ‘b0’ etc. to guarantee correct lexical order<br />
of output files.<br />
Be sure to provide two additional characters for date information in output file names.<br />
On page 3.5.24<br />
PAGE 3.4.4.3
3.4.4.4 SPLITS<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output files<br />
SPLITS infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
SPLITS Split file to several files with equal numbers of sets<br />
infile Required Grid and/or spectral file<br />
outfile Optional Prefix for up to 359 output files named outfilenn with outfile replaced by<br />
the name given on the command line and nn replaced by numbers starting from 01.<br />
Default is name specified for file infile.<br />
Input parameters<br />
<strong>No</strong>te<br />
Example<br />
nsets Number of sets for each output file Integer Default is 1.<br />
File numbers greater than 99 are coded as ‘a0’ to ‘a9’, ‘b0’ etc. to guarantee correct lexical order<br />
of output files.<br />
Be sure to provide two additional characters for numbering in output file names.<br />
<strong>No</strong>ne<br />
PAGE 3.4.4.4
3.4.4.5 SPLITC SPLITL<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output files<br />
<strong>No</strong>te<br />
Example<br />
SPLITC infile outfile<br />
SPLITL infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
SPLITC Split file to several files, one for each code<br />
SPLITL Split file to several files, one for each level<br />
infile Required Grid and/or spectral file<br />
outfile Optional Prefix for output files named outfilennn with outfile replaced by the name given<br />
on the command line and nnn replaced by three-digit code or level numbers.<br />
Default is name specified for file infile.<br />
Level numbers greater than 999 are coded as ‘a00’ to ‘a99’, ‘b00’ etc. to guarantee correct lexical<br />
order of output files.<br />
Be sure to provide three additional characters for code/level information in output file names.<br />
<strong>No</strong>ne<br />
PAGE 3.4.4.5
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 3.4.4.5
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.5 Selection and conversion of parts of fields<br />
3.4.5.1 WINDOW Extract windows from grid fields<br />
3.4.5.2 POINT Extract single points from grid fields<br />
3.4.5.3 SLICE Extract slices from grid fields<br />
3.4.5.4 ROTATE Rotate grid fields<br />
3.4.5.5 ZXCOLL Collect slices or small windows of same code and combine them to<br />
two-dimensional fields<br />
3.4.5.5 ZXCOLC Collect slices or small windows of same level and combine them to<br />
two-dimensional fields<br />
3.4.5.5 ZXCOLT Collect slices or small windows and combine them to two-dimensional fields<br />
PAGE 3.4.5
3.4.5.1 WINDOW<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
WINDOW infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
WINDOW Extract windows from grid fields<br />
infile Required Grid file<br />
outfile Required File for windows<br />
Input parameters<br />
<strong>No</strong>tes<br />
Examples<br />
lon1 First longitude of output field Integer Default is first longitude of input field<br />
lon2 Last longitude of output field Integer Default is last longitude of input field<br />
loni Longitude increment Integer Default is 1<br />
lat1 First latitude of output field Integer Default is first latitude of input field<br />
lat2 Last latitude of output field Integer Default is last latitude of input field<br />
lati Latitude increment Integer Default is 1<br />
If lon1 greater lon2, window is wrapped around input array bounds.<br />
For lon1 equal to lon2+1, the entire input field is only shifted and the new field starts with the<br />
former lon1 longitude.<br />
On page 3.5.1 to page 3.5.3<br />
PAGE 3.4.5.1
3.4.5.2 POINT<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
POINT infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
POINT Extract single points from grid fields<br />
infile Required Grid file<br />
outfile Required File for points<br />
Input parameters<br />
Examples<br />
lon Longitudes of points Integer array(255) <strong>No</strong> default<br />
lat Latitudes of points Integer array(255) <strong>No</strong> default<br />
<strong>No</strong>ne<br />
PAGE 3.4.5.2
3.4.5.3 SLICE<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
SLICE infile outfile<br />
SLICE Extract slices from grid fields<br />
infile Required Grid file<br />
outfile Required File for slices<br />
Input parameters<br />
Examples<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
icr List of longitudes or latitudes to be selected Integer(100) <strong>No</strong> default<br />
kcr Switch to select latitude or longitude Integer <strong>No</strong> default<br />
• 0 longitude<br />
• 1 latitude<br />
On page 3.5.2 and page 3.5.3<br />
PAGE 3.4.5.3
3.4.5.4 ROTATE<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
ROTATE infile outfile<br />
ROTATE Rotate grid fields<br />
infile Required Grid file<br />
outfile Required File for slices<br />
Input parameters<br />
Examples<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
icr Orientation of output fields Integer <strong>No</strong> default<br />
Combined operations are requested as sum of single operation codes.<br />
• 0 no change<br />
• 1 invert north/south<br />
• 2 invert east west<br />
• 4 switch lat/long (done first)<br />
<strong>No</strong>ne<br />
PAGE 3.4.5.4
3.4.5.5 ZXCOLL ZXCOLC ZXCOLD<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>tes<br />
Examples<br />
ZXCOLL infile outfile<br />
ZXCOLC infile outfile<br />
ZXCOLT infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
ZXCOLL Collect slices or small windows of same code and combine them to<br />
two-dimensional fields<br />
ZXCOLC Collect slices or small windows of same level and combine them to<br />
two-dimensional fields<br />
ZXCOLT Collect slices or small windows and combine them to two-dimensional fields<br />
infile Required Grid file of slices or small windows<br />
outfile Required File for cross-sections<br />
If infile contains multi-level slice sets then outfile will contain zonal or meridional cross-sections.<br />
Fields in infile combined to the same field in outfile must have same date, type, lat and long information.<br />
On page 3.5.2 to page 3.5.4, and page 3.5.19<br />
PAGE 3.4.5.5
3.4.6 Unary operators<br />
3.4.6.1 ABS outfile = abs(infile)<br />
3.4.6.1 SIGN outfile = sign(infile)<br />
3.4.6.1 INV outfile = 1/infile (1/0=0)<br />
3.4.6.1 SQUARE outfile = infile 2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.6.1 SQROOT outfile =sqrt(infile)<br />
3.4.6.1 EXPONE outfile = e infile<br />
3.4.6.1 LOGE outfile = ln(infile) (ln(0):=0)<br />
3.4.6.1 LOG10 outfile = log 10 (infile) (log 10 (0) := 0)<br />
3.4.6.2 XLIN outfile = a · infile + b<br />
3.4.6.3 FPOW outfile = infile pow (0 pow =0)<br />
3.4.6.4 FMASK Create floating point mask according to arithmetic comparison<br />
PAGE 3.4.6
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.6.1 ABS SIGN INV SQUARE SQROOT EXPONE LOGE LOG10<br />
Calling sequences<br />
Purposes<br />
Input file<br />
Output file<br />
Example<br />
ABS infile outfile<br />
SIGN infile outfile<br />
INV infile outfile<br />
SQUARE infile outfile<br />
SQROOT infile outfile<br />
EXPONE infile outfile<br />
LOGE infile outfile<br />
LOG10 infile outfile<br />
ABS outfile = abs(infile)<br />
SIGN outfile = sign(infile)<br />
INV outfile = 1/infile (1/0=0)<br />
SQUARE outfile = infile2 SQROOT outfile = sqrt(infile)<br />
EXPONE outfile = e infile<br />
LOGE outfile = ln(infile) (ln(0):=0)<br />
LOG10 outfile = log 10 (infile) (log 10 (0) := 0)<br />
infile Required Grid file<br />
outfile Required File containing function value of infile<br />
On page 3.5.9, page 3.5.14, page 3.5.15, page 3.5.17, and page 3.5.18<br />
PAGE 3.4.6.1
3.4.6.2 XLIN<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
XLIN infile outfile<br />
XLIN outfile = a · infile + b<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
infile Required Grid and/or spectral File<br />
outfile Required Result a · infile + b<br />
Input parameter<br />
<strong>No</strong>te<br />
Example<br />
code Codes Integer array(100) Default is 100 * -1<br />
Code -1 matches all codes<br />
level Levels Integer array(100) Default is 100 * -1<br />
Level -1 matches all levels<br />
a Multiplying factors Real array(100) Default is 100 * 1.<br />
b Additive constants Real array(100) Default is 100 * 0.<br />
May be non-zero for grid fields only<br />
For each input fields the lists of code and level are searched for a matching pair. The corresponding<br />
values for a and b are used for computation.<br />
On page 3.5.18<br />
PAGE 3.4.6.2
3.4.6.3 FPOW<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
FPOW infile outfile<br />
FPOW outfile = infile pow (0 pow =0)<br />
infile Required Grid file<br />
outfile Required Result infile pow<br />
Input parameter<br />
Examples<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
pow Exponent Real Required<br />
On page 3.5.14 and page 3.5.15<br />
PAGE 3.4.6.3
3.4.6.4 FMASK<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
FMASK infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
FMASK Create floating point mask according to arithmetic comparison<br />
infile Required Grid file<br />
outfile Required vyes/vno mask fields<br />
Input parameters<br />
Example<br />
lop Logical operator (eq,ne,lt,le,gt,ge) Character*2 Default is ‘ge’<br />
value Comparison value for lop Real Default is 0.<br />
vyes Value set where condition (x.lop.value) holds Real Default is 1.<br />
vno Value set where condition does not hold Real Default is 0.<br />
On page 3.5.9<br />
PAGE 3.4.6.4
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
3.4.7 Binary operators<br />
3.4.7.1 ADD outfile = infile1 + infile2<br />
3.4.7.1 SUB outfile = infile1 - infile2<br />
3.4.7.1 MLT outfile = infile1 * infile2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.7.1 DIV outfile = infile1 / infile2 (x/0:=0)<br />
3.4.7.2 XYLIN outfile = a * infile1 + b * infile2 + c<br />
3.4.7.3 GADD outfile = infile1 + (first record of) infile2<br />
3.4.7.3 GSUB outfile = infile1 - (first record of) infile2<br />
3.4.7.3 GMLT outfile = infile1 * (first record of) infile2<br />
3.4.7.3 GDIV outfile = infile1 / (first record of) infile2<br />
3.4.7.4 PADD (set of) outfile = (set of) infile1 + (field of) infile2<br />
3.4.7.4 PSUB (set of) outfile = (set of) infile1 - (field of) infile2<br />
3.4.7.4 PMLT (set of) outfile = (set of) infile1 * (field of) infile2<br />
3.4.7.4 PDIV (set of) outfile = (set of) infile1 / (field of) infile2<br />
PAGE 3.4.7
3.4.7.1 ADD SUB MLT DIV<br />
Calling sequences<br />
Purpose<br />
Input files<br />
Output file<br />
Examples<br />
ADD infile1 infile2 outfile<br />
SUB infile1 infile2 outfile<br />
MLT infile1 infile2 outfile<br />
DIV infile1 infile2 outfile<br />
ADD outfile = infile1 + infile2<br />
SUB outfile = infile1 - infile2<br />
MLT outfile = infile1 * infile2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
DIV outfile = infile1 / infile2 (x/0:=0)<br />
infile1 Required Grid and/or spectral (for ADD and SUB) file<br />
infile2 Required Grid and/or spectral (for ADD and SUB) file<br />
outfile Required Sum, difference, product or quotient of infile1 and infile2<br />
On page 3.5.7 to page 3.5.14, page 3.5.17 and page 3.5.18<br />
PAGE 3.4.7.1
3.4.7.2 XYLIN<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Output file<br />
XYLIN infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
XYLIN outfile = a * infile1 + b * infile2 + c<br />
infile1 Required Grid and/or spectral file<br />
infile2 Required Grid and/or spectral file<br />
outfile Required Result a * infile1 + b * infile2 + c<br />
Input parameter<br />
Examples<br />
a Multiplying factor for infile1 Real Default is 1.<br />
b Multiplying factor for infile2 Real Default is 1.<br />
c Additive constant Real Default is 0.<br />
May be non-zero for grid fields only<br />
On page 3.5.7 and page 3.5.8<br />
PAGE 3.4.7.2
3.4.7.3 GADD GSUB GMLT GDIV<br />
Calling sequences<br />
Purpose<br />
Input files<br />
Output file<br />
Example<br />
GADD infile1 infile2 outfile<br />
GSUB infile1 infile2 outfile<br />
GMLT infile1 infile2 outfile<br />
GMLT infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
GADD outfile = infile1 + (first record of) infile2<br />
GSUB outfile = infile1 - (first record of) infile2<br />
GMLT outfile = infile1 * (first record of) infile2<br />
GDIV outfile = infile1 / (first record of) infile2<br />
infile1 Required Grid or spectral (for GADD and GSUB) file<br />
infile2 Required Grid and/or spectral file<br />
outfile Required Sum, difference, product or quotient of infile1 and first record of infile2<br />
with appropriate dimension<br />
<strong>No</strong>ne<br />
PAGE 3.4.7.3
3.4.7.4 PADD PSUB PMLT PDIV<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
PADD infile1 infile2 outfile<br />
PSUB infile1 infile2 outfile<br />
PMLT infile1 infile2 outfile<br />
PDIV infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PADD (set of) outfile = (set of) infile1 + (field of) infile2<br />
PSUB (set of) outfile = (set of) infile1 - (field of) infile2<br />
PMLT (set of) outfile = (set of) infile1 * (field of) infile2<br />
PDIV (set of) outfile = (set of) infile1 / (field of) infile2<br />
infile1 Required Grid and/or spectral (PADD and PSUB) file<br />
infile2 Required Grid and/or spectral (PADD and PSUB) file<br />
outfile Required Sum, difference, product or quotient of sets of infile1 and fields of infile2<br />
There must be one multi-level set in infile1 for each field in infile2.<br />
On page 3.5.10 to page 3.5.13<br />
PAGE 3.4.7.4
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.8 Conversion and concatenation of files in extra and service/afterburner format<br />
3.4.8.1 GRB2EXT File conversion - grib to blocked extra format<br />
3.4.8.1 GRB2SRV File conversion - grib to blocked service/afterburner format<br />
3.4.8.1 GRB2EXP File conversion - grib to unblocked extra format<br />
3.4.8.1 GRB2SRP File conversion - grib to unblocked service/afterburner format<br />
3.4.8.1 GRB2EXF File conversion - grib to formatted extra format<br />
3.4.8.1 GRB2SRF File conversion - grib to formatted service/afterburner format<br />
3.4.8.2 EXT2GRB File conversion - blocked extra to grib format<br />
3.4.8.2 SRV2GRB File conversion - blocked service/afterburner to grib format<br />
3.4.8.2 EXP2GRB File conversion - unblocked extra to grib format<br />
3.4.8.2 SRP2GRB File conversion - unblocked service/afterburner to grib format<br />
3.4.8.2 EXF2GRB File conversion - formatted extra to grib format<br />
3.4.8.2 SRF2GRB File conversion - formatted service/afterburner to grib format<br />
3.4.8.3 CATEXTF Concatenate up to 88 files in blocked extra format<br />
3.4.8.3 CATSRVF Concatenate up to 88 files in blocked service/afterburner format<br />
PAGE 3.4.8
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.8.1 GRB2EXT GRB2SRV GRB2EXP GRB2SRP GRB2EXF GRB2SRF<br />
Calling sequences<br />
Purposes<br />
Input file<br />
Output file<br />
Parameters<br />
<strong>No</strong>tes<br />
Example<br />
GRB2EXT infile outfile<br />
GRB2SRV infile outfile<br />
GRB2EXP infile outfile<br />
GRB2SRP infile outfile<br />
GRB2EXF infile outfile<br />
GRB2SRF infile outfile<br />
GRB2EXT File conversion - grib to blocked extra format<br />
GRB2SRV File conversion - grib to blocked service/afterburner format<br />
GRB2EXP File conversion - grib to unblocked extra format<br />
GRB2SRP File conversion - grib to unblocked service/afterburner format<br />
GRB2EXF File conversion - grib to formatted extra format<br />
GRB2SRF File conversion - grib to formatted service/afterburner format<br />
infile Required File in grib format<br />
outfile Required File in extra or service/afterburner format blocked, unblocked or formatted<br />
hform Format of header records Character * 80 Default is ‘(8i10)’<br />
dform Format of data records Character * 80 Default is ‘(10e13.6)’<br />
Format parameters are allowed for GRB2EXF and GRB2SRF only.<br />
Be sure to include parentheses in format specifications.<br />
On page 3.5.22<br />
PAGE 3.4.8.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.8.2 EXT2GRB SRV2GRB EXP2GRB SRP2GRB EXF2GRB SRF2GRB<br />
Calling sequences<br />
Purposes<br />
Input file<br />
Output file<br />
Parameters<br />
EXT2GRB infile outfile<br />
SRV2GRB infile outfile<br />
EXP2GRB infile outfile<br />
SRP2GRB infile outfile<br />
EXF2GRB infile outfile<br />
SRF2GRB infile outfile<br />
EXT2GRB File conversion - blocked extra to grib format<br />
SRV2GRB File conversion - blocked service/afterburner to grib format<br />
EXP2GRB File conversion - unblocked extra to grib format<br />
SRP2GRB File conversion - unblocked service/afterburner to grib format<br />
EXF2GRB File conversion - formatted extra to grib format<br />
SRF2GRB File conversion - formatted service/afterburner to grib format<br />
infile Required File in extra or service/afterburner format blocked, unblocked or formatted<br />
outfile Required File in grib format<br />
lat Latitude values Integer array(20) Default is 32, 64, 96, 128, 160,<br />
21, 42, 64, 85, 106<br />
long Longitude values Integer array(20) Default is 64, 128, 192, 256, 320,<br />
21, 42, 64, 85, 106<br />
dim Dimension values Integer array(20) Default is 2048, 8192, 18432, 32768, 51200,<br />
506, 1892, 4290, 7482, 11556<br />
PAGE 3.4.8.2
<strong>No</strong>tes<br />
Example<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
type Data type values Integer array(20) Default is 4, 4, 4, 4, 4,<br />
50, 50, 50, 50, 50<br />
0 means lat/long grid<br />
4 means gaussian grid<br />
50 means spherical harmonics.<br />
hour Hour to be inserted Integer Default is 0<br />
in grib records Only used for conversion from extra format<br />
pack Number of bits for Integer Default is 16<br />
each data value Only multiples of 8 allowed<br />
in grib records<br />
hform Format of Character * 80 Default is ‘(8i10)’<br />
header records<br />
dform Format of Character * 80 Default is ‘(10e13.6)’<br />
data records<br />
Arrays lat, long and dim are searched for a triple, where either dim or the product of lat and long<br />
matches either the dimension or the product of the lat/long specification of the input field. These<br />
values and the corresponding type are used for grib output.<br />
Defaults values are specifications for grid and spectral fields of T21, T42, T63, T84 and T106.<br />
These specifications remain effective after user-specified values.<br />
For conversion from service/afterburner format type 4 (gauss-grid) is used as a last choice.<br />
Format parameters are allowed for EXF2GRB and SRF2GRB only.<br />
Be sure to include parentheses in format specifications.<br />
By default, no parameters are read for unformatted input files<br />
On page 3.5.22<br />
PAGE 3.4.8.2 a
3.4.8.3 CATEXTF CATSRVF<br />
Calling sequences<br />
Purposes<br />
Input files<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
CATEXTF outfile infile1 infile2 ... infile88<br />
CATSRVF outfile infile1 infile2 ... infile88<br />
CATEXTF Concatenate up to 88 files in blocked extra format<br />
CATSRVF Concatenate up to 88 files in blocked service/afterburner format<br />
infile1<br />
. Optional Extra- or service-/afterburner-format files<br />
infile88<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
outfile Required File in same format containing data of files infile1 to infile88<br />
Unblocked and formatted files can be concatenated using the UNIX command ‘cat’.<br />
On page 3.5.22<br />
PAGE 3.4.8.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.9 Computation of averages, minima and maxima over fields<br />
3.4.9.1 GLOBAVG Compute the surface mean of input fields using weight factors for latitudes<br />
3.4.9.2 FLDAVG Compute mean of input fields<br />
3.4.9.2 FLDMIN Compute minima of input fields<br />
3.4.9.2 FLDMAX Compute maxima of input fields<br />
3.4.9.3 ZONAVG Compute zonal averages of input fields<br />
3.4.9.3 ZONMIN Compute zonal minima of input fields<br />
3.4.9.3 ZONMAX Compute zonal maxima of input fields<br />
3.4.9.3 MERAVG Compute meridional averages of input fields<br />
3.4.9.3 MERMIN Compute meridional minima of input fields<br />
3.4.9.3 MERMAX Compute meridional maxima of input fields<br />
PAGE 3.4.9
3.4.9.1 GLOBAVG<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>te<br />
Examples<br />
GLOBAVG infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Compute the surface mean of input fields using weight factors for latitudes<br />
infile Required Grid and/or spectral file<br />
outfile Optional File containing the surface mean of infile fields in fields of same size<br />
If outfile is not specified, the computed values are only listed<br />
<strong>No</strong>ne<br />
PAGE 3.4.9.1
3.4.9.2 FLDAVG FLDMIN FLDMAX<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Example<br />
FLDAVG infile outfile<br />
FLDMIN infile outfile<br />
FLDMAX infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
FLDAVG Compute mean of input fields<br />
FLDMIN Compute minima of input fields<br />
FLDMAX Compute maxima of input fields<br />
infile Required Grid and/or spectral file<br />
outfile Required File containing the minimum, maximum or mean of input fields<br />
expanded to fields of same size<br />
<strong>No</strong>ne<br />
PAGE 3.4.9.2
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.9.3 ZONAVG ZONMIN ZONMAX MERAVG MERMIN MERMAX<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Example<br />
ZONAVG infile outfile<br />
ZONMIN infile outfile<br />
ZONMAX infile outfile<br />
MERAVG infile outfile<br />
MERMIN infile outfile<br />
MERMAX infile outfile<br />
ZONAVG Compute zonal averages of input fields<br />
ZONMIN Compute zonal minima of input fields<br />
ZONMAX Compute zonal maxima of input fields<br />
MERAVG Compute meridional averages of input fields<br />
MERMIN Compute meridional minima of input fields<br />
MERMAX Compute meridional maxima of input fields<br />
infile Required Grid file<br />
outfile Required File containing a vector of zonal/meridional averages/minima/maxima<br />
for each input field<br />
On page 3.5.19<br />
PAGE 3.4.9.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.10 Computation of averages, minima, maxima, sums and deviations over time<br />
series<br />
3.4.10.1 TIMAVG Compute time average.<br />
3.4.10.1 TIMMIN Compute time minimum.<br />
3.4.10.1 TIMMAX Compute time maximum.<br />
3.4.10.2 MONAVG Compute monthly averages.<br />
3.4.10.2 MONMIN Compute monthly minima.<br />
3.4.10.2 MONMAX Compute monthly maxima.<br />
3.4.10.2 YEARAVG Compute yearly averages.<br />
3.4.10.2 YEARMIN Compute yearly minima.<br />
3.4.10.2 YEARMAX Compute yearly maxima.<br />
3.4.10.3 SELAVG Compute time range averages.<br />
3.4.10.3 SELMIN Compute time range minima.<br />
3.4.10.3 SELMAX Compute time range maxima.<br />
3.4.10.4 LMEAN Compute multi-year monthly averages.<br />
3.4.10.4 LMMIN Compute multi-year monthly minima.<br />
3.4.10.4 LMMAX Compute multi-year monthly maxima.<br />
3.4.10.5 ANOMAL Subtract multi-year monthly time averages from a time series.<br />
3.4.10.6 STDDEV Calculate local standard deviation<br />
3.4.10.7 LMSTDV Compute multi-year monthly standard deviations.<br />
3.4.10.8 TIMDEV Compute deviation from time average<br />
PAGE 3.4.10
3.4.10.1 TIMAVG TIMMIN TIMMAX<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
TIMAVG infile1 outfile<br />
TIMMIN infile1 outfile<br />
TIMMAX infile1 outfile<br />
TIMAVG Compute time average.<br />
TIMMIN Compute time minimum.<br />
TIMMAX Compute time maximum.<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
infile1 Required Grid and/or spectral file<br />
outfile Required File containing the mean/minimum/maximum of the fields in infile1<br />
Input fields are collected to the same result field only if they match by type, code, level and<br />
dimensions.<br />
On page 3.5.16<br />
PAGE 3.4.10.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.10.2 MONAVG MONMIN MONMAX YEARAVG YEARMIN YEARMAX<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
MONAVG infile outfile<br />
MONMIN infile outfile<br />
MONMAX infile outfile<br />
YEARAVG infile outfile<br />
YEARMIN infile outfile<br />
YEARMAX infile outfile<br />
MONAVG Compute monthly averages.<br />
MONMIN Compute monthly minima.<br />
MONMAX Compute monthly maxima.<br />
YEARAVG Compute yearly averages.<br />
YEARMIN Compute yearly minima.<br />
YEARMAX Compute yearly maxima.<br />
infile Required Grid or spectral file<br />
outfile Required File containing one set for each month/year which is the<br />
mean/minimum/maximum of all the sets for this month/year in infile<br />
Maximum number of fields is 20.<br />
On page 3.5.20<br />
PAGE 3.4.10.2
3.4.10.3 SELAVG SELMIN SELMAX<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
SELAVG infile outfile<br />
SELMIN infile outfile<br />
SELMAX infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
SELAVG Compute time range averages.<br />
SELMIN Compute time range minima.<br />
SELMAX Compute time range maxima.<br />
infile Required Grid or spectral file<br />
outfile Required File containing one set for each time range which is the<br />
mean/minimum/maximum of all the sets of this time range in infile<br />
Input parameter<br />
Examples<br />
ndates Number of dates for one average field Integer <strong>No</strong> default<br />
On page 3.5.20 and page 3.5.21<br />
PAGE 3.4.10.3
3.4.10.4 LMEAN LMMIN LMMAX<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Example<br />
LMEAN infile outfile<br />
LMMIN infile outfile<br />
LMMAX infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
LMEAN Compute multi-year monthly averages.<br />
LMMIN Compute multi-year monthly minima.<br />
LMMAX Compute multi-year monthly maxima.<br />
infile Required Grid or spectral file<br />
outfile Required File containing one set for each month which is the<br />
mean/minimum/maximum of all the sets for this month in all years.<br />
<strong>No</strong>ne<br />
PAGE 3.4.10.4
3.4.10.5 ANOMAL<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Output file<br />
<strong>No</strong>tes<br />
Example<br />
ANOMAL infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
ANOMAL Subtract multi-year monthly time averages from a time series.<br />
infile1 Required Grid or spectral file<br />
infile2 Required File containing one set for each month which is the mean of all the sets<br />
in infile1 for this month in all years<br />
outfile Required File containing the difference between infile1 and the corresponding<br />
fields in infile2 for the same month<br />
File infile2 should have been created by a call LMEAN infile1 infile2<br />
<strong>No</strong>ne<br />
PAGE 3.4.10.5
3.4.10.6 STDDEV<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Example<br />
STDDEV infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
STDDEV Calculate local standard deviation<br />
infile Required Grid file<br />
outfile Required File containing the standard deviation for each input field<br />
<strong>No</strong>ne<br />
PAGE 3.4.10.6
3.4.10.7 LMSTDV<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Example<br />
LMSTDV infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
LMSTDV Compute multi-year monthly standard deviations.<br />
infile Required Grid or spectral file<br />
outfile Required File containing one set for each month which is the standard deviation<br />
of all the sets for this month in all years.<br />
<strong>No</strong>ne<br />
PAGE 3.4.10.7
3.4.10.8 TIMDEV<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
TIMDEV infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
TIMDEV Compute deviation from time average<br />
infile1 Required Grid or spectral file<br />
infile2 Required Grid or spectral file<br />
outfile Required File containing one field for each field in infile1 which is the difference<br />
of that field to the corresponding field in infile2<br />
infile2 should have been created by TIMAVG infile1 infile2<br />
<strong>No</strong>ne<br />
PAGE 3.4.10.8
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
3.4.11 Annual cycle programs<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.11.1 FINDAN Determine annual cycle (1st and 2nd annual harmonic) of daily data.<br />
3.4.11.2 SUBTAN Subtract annual cycle (1st and 2nd annual harmonic) from daily data.<br />
3.4.11.3 CRETAN Create annual cycle (1st and 2nd annual harmonic) of daily data.<br />
PAGE 3.4.11
3.4.11.1 FINDAN<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
FINDAN infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
FINDAN Determine annual cycle (1st and 2nd annual harmonic) of daily data<br />
infile Required Grid file<br />
outfile Required Annual cycle fields: a0, a1, b1, a2, b2<br />
For fields in infile the condition<br />
x(t) = a0 + a1 * cos(w t) + b1 * sin(w t) + a2 * cos(2 w t) + b2 * sin(2 w t)<br />
holds with w=2π/(number of days per year)<br />
<strong>No</strong>ne<br />
PAGE 3.4.11.1
3.4.11.2 SUBTAN<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
SUBTAN infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
SUBTAN Subtract annual cycle (1st and 2nd annual harmonic) from daily data<br />
infile1 Required Grid file<br />
infile2 Required Annual cycle fields: a0, a1, b1, a2, b2<br />
outfile Required Difference of infile1 to annual cycle<br />
infile2 should have been created by FINDAN infile1 infile2<br />
<strong>No</strong>ne<br />
PAGE 3.4.11.2
3.4.11.3 CRETAN<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
<strong>No</strong>te<br />
Example<br />
CRETAN infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
CRETAN Create annual cycle (1st and 2nd annual harmonic) of daily data<br />
infile Required Annual cycle fields: a0, a1, b1, a2, b2<br />
outfile Required Daily fields of annual cycle<br />
infile should have been created by FINDAN somefile infile<br />
<strong>No</strong>ne<br />
PAGE 3.4.11.3
3.4.12 Others<br />
3.4.12.1 CORREL Calculate correlation<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
3.4.12.2 CORRWM Calculate correlation to window mean<br />
3.4.12.3 GSCOPY File conversion from one-level to multi-level sets<br />
3.4.12.4 ACCU Accumulate time series<br />
3.4.12.5 CHEAD Change grib header specifications<br />
PAGE 3.4.12
3.4.12.1 CORREL<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Output file<br />
Example<br />
CORREL infile1 infile2 outfile<br />
CORREL Calculate correlation<br />
infile1 Required Grid file<br />
infile2 Required Grid file<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
outfile Required Correlation of corresponding fields<br />
On page 3.5.1<br />
PAGE 3.4.12.1
3.4.12.2 CORRWM<br />
Calling sequence<br />
Purpose<br />
Input files<br />
Output file<br />
CORRWM infile1 infile2 outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
CORRWM Calculate correlation to window mean<br />
infile1 Required Grid file<br />
infile2 Required Grid file<br />
outfile Required Correlation of each field in infile1 to the mean of a window of the<br />
corresponding field in infile2<br />
Input parameters<br />
<strong>No</strong>tes<br />
Example<br />
lon1 First longitude of window used Integer Default is first longitude of input field<br />
lon2 Last longitude of window used Integer Default is last longitude of input field<br />
lat1 First latitude of window used Integer Default is first latitude of input field<br />
lat2 Last latitude of window used Integer Default is last latitude of input field<br />
If lon1 greater lon2, window is wrapped around input array bounds.<br />
On page 3.5.1<br />
PAGE 3.4.12.2
3.4.12.3 GSCOPY<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Parameter<br />
Examples<br />
GSCOPY infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
GSCOPY File conversion from one-level to multi-level sets<br />
infile Required Grid or spectral file<br />
outfile Required Multi-level set for each field in infile<br />
lev Level values Integer array(20) Required<br />
On page 3.5.10 to page 3.5.13<br />
PAGE 3.4.12.3
3.4.12.4 ACCU<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Example<br />
ACCU infile outfile1 outfile2<br />
ACCU Accumulate time series<br />
infile Required Grid or spectral file<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
outfile1 Required Accumulated sum of infile<br />
outfile2 Optional Copy of last record of outfile1<br />
<strong>No</strong>ne<br />
PAGE 3.4.12.4
3.4.12.5 CHEAD<br />
Calling sequence<br />
Purpose<br />
Input file<br />
Output file<br />
Parameters<br />
<strong>No</strong>tes<br />
Examples<br />
CHEAD infile outfile<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
CHEAD Change grib header specifications<br />
infile Required Grid or spectral file<br />
outfile Required File with changed headers<br />
ocode Old code values Integer array(255) Optional<br />
A code equal -1 selects all codes on infile. The first matching element is used, so a ‘-1’ terminating<br />
the code sequence collects all codes not explicitly selected.<br />
ncode New code values Integer array(255) Optional<br />
olevel Old level values Integer array(100) Optional<br />
nlevel New level values Integer array(100) Optional<br />
A level equal -1 selects all levels on infile. The first matching element is used, so a ‘-1’ terminating<br />
the level sequence collects all levels not explicitly selected.<br />
ntstart Starting date Integer Optional<br />
ntinc Date increment Integer Optional<br />
neqdat Number of fields with equal date Integer Optional<br />
The number of ncode and nlevel values specified must match the number of ocode and olevel values<br />
(including a terminating ‘-1’, if present).<br />
Times are specified as YYYMMDDHH.<br />
If parameter ntinc is specified and neqdat is not, time on outfile changes whenever time on infile<br />
does.<br />
If a parameter group (code, level or time) is not specified, the file header values are not changed.<br />
<strong>No</strong>ne<br />
PAGE 3.4.12.5
3.5 EXAMPLES<br />
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs WINDOW, CORREL and CORRWM<br />
#<br />
# Correlation of two time series files.<br />
# One grid point is needed only.<br />
# This is done in three different ways.<br />
#<br />
# out1, out2 and out3 will contain similar data<br />
#<br />
#<br />
# Parameters for WINDOW and CORRWM<br />
#<br />
cat >params
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs WINDOW, SLICE and ZXCOLL<br />
#<br />
# Get longitudinal cross sections in two different ways<br />
#<br />
# Files tmp1 and tmp2 will contain similar data<br />
# Files out1 and out2 will contain similar data<br />
#<br />
#<br />
# Get longitudes as slices of input fields<br />
#<br />
SLICE in1 tmp1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs WINDOW, SLICE and ZXCOLL<br />
#<br />
# Get latitudinal cross sections in two different ways<br />
#<br />
# Files tmp1 and tmp2 will contain similar data<br />
# Files out1 and out2 will contain similar data<br />
#<br />
#<br />
# Get latitudes as slices of input fields<br />
#<br />
SLICE in1 tmp1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs ZONAVG and ZXCOLL<br />
#<br />
#<br />
# Get zonal averages of fields in multi-level sets<br />
#<br />
ZONAVG in1 tmp1<br />
#<br />
# Collect zonal average sets to two-dimensional fields<br />
#<br />
ZXCOLL tmp1 out1<br />
#<br />
PAGE 3.5.4
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs GGSTATM, GGSTATT, MONSEL, DMDSEL and HOURSEL<br />
#<br />
# Select specified dates from a time series and show intermediate<br />
# results using the appropriate list programs<br />
#<br />
# List number of fields for each month<br />
#<br />
GGSTATM in1<br />
#<br />
# Select months december, january and february<br />
#<br />
MONSEL in1 out1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs FINDAN, SUBTAN and CRETAN<br />
#<br />
#<br />
# Compute annual cycle coefficients<br />
#<br />
FINDAN in1 tmp1<br />
#<br />
# Subtract annual cycle from original field<br />
#<br />
SUBTAN in1 tmp1 out1<br />
#<br />
# Create annual cycle file<br />
#<br />
CRETAN in1 out1<br />
#<br />
PAGE 3.5.6
#<br />
# Example for programs ADD and XYLIN<br />
#<br />
# Adding two files in two different ways<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
# Of course, ADD does the faster job.<br />
#<br />
#<br />
# Add input files<br />
#<br />
ADD in[12] out1<br />
#<br />
# Add input files with default coefficients<br />
#<br />
XYLIN - in[12] out2<br />
#<br />
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
PAGE 3.5.7
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SUB and XYLIN<br />
#<br />
# Subtracting two files in two different ways<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
# Of course, SUB does the faster job.<br />
#<br />
#<br />
# Subtract input files<br />
#<br />
SUB in[12] out1<br />
#<br />
# Add input files with coefficient -1 for second input file<br />
#<br />
XYLIN in[12] out2
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs ABS, SIGN, MLT and FMASK<br />
#<br />
# Put data file to absolute value in two different ways<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
# Files tmp1 and tmp2 will contain similar data.<br />
#<br />
#<br />
# Get absolute values of input file<br />
#<br />
ABS in1 out1<br />
#<br />
# Get sign of input file<br />
#<br />
SIGN in1 tmp1<br />
#<br />
# Multiply with sign to get absolute values<br />
#<br />
MLT in1 tmp1 out2<br />
#<br />
# Get sign of input field by logical comparison<br />
#<br />
FMASK in1 tmp2
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SELECT, GSCOPY, ADD, PADD<br />
#<br />
# Add one level to all levels in sets in two different ways.<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
#<br />
#<br />
# Select all codes with non-zero levels<br />
#<br />
SELECT in1 tmp1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SELECT, GSCOPY, SUB, PSUB<br />
#<br />
# Subtract one level from all levels in sets in two different ways.<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
#<br />
#<br />
# Select all codes with non-zero levels<br />
#<br />
SELECT in1 tmp1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SELECT, GSCOPY, MLT, PMLT<br />
#<br />
# Multiply all levels in sets by one level in two different ways.<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
#<br />
#<br />
# Select all codes with non-zero levels<br />
#<br />
SELECT in1 tmp1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SELECT, GSCOPY, DIV, PDIV<br />
#<br />
# Divide all levels in sets by one level in two different ways.<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
#<br />
#<br />
# Select all codes with non-zero levels<br />
#<br />
SELECT in1 tmp1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SQUARE, MLT and FPOW<br />
#<br />
# Get square of file in three different ways.<br />
#<br />
# Files out1, out2 and out3 will contain similar data.<br />
#<br />
#<br />
# Get square values of input file<br />
#<br />
SQUARE in1 out1<br />
#<br />
# Multiply input file by itself<br />
#<br />
MLT in1 in1 out2<br />
#<br />
# Raise input file to power two<br />
#<br />
FPOW in1 out3
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SQROOT and FPOW<br />
#<br />
# Get square root of file in two different ways.<br />
#<br />
# Files out1 and out2 will contain similar data.<br />
#<br />
#<br />
# Get square root of input file<br />
#<br />
SQROOT in1 out1<br />
#<br />
# Raise input file to power 1/2<br />
#<br />
FPOW in1 out2
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for program TIMAVG and concatenation of GRIB-files<br />
#<br />
# Files out1, out2 and out3 will contain similar data.<br />
#<br />
#<br />
# Concatenate all input files<br />
#<br />
cat in[123] >tmp1<br />
#<br />
# Get average of concatenated files<br />
#<br />
TIMAVG tmp1 out1<br />
#<br />
# Get average of first input file<br />
#<br />
TIMAVG in1 tmp2<br />
#<br />
# Get average of second input file adding result of previous run<br />
#<br />
TIMAVG in2 tmp3 tmp2<br />
#<br />
# Get average of third input file adding result of previous runs<br />
#<br />
TIMAVG in3 out2 tmp3<br />
#<br />
# Get average of second input file<br />
#<br />
TIMAVG in2 tmp4<br />
#<br />
# Concatenate averages of first and second input file<br />
#<br />
cat tmp2 tmp4 >tmp5<br />
#<br />
# Get average of third input file adding results of previous runs<br />
#<br />
TIMAVG in3 out3 tmp5<br />
#<br />
PAGE 3.5.16
#<br />
# Example for programs DIV, INV and MLT<br />
#<br />
# Divide two files in two different ways<br />
#<br />
# Files out1 and out2 will contain similar data<br />
#<br />
#<br />
# Divide input files<br />
#<br />
DIV in[12] out1<br />
#<br />
# Get reciprocal value<br />
#<br />
INV in2 tmp1<br />
#<br />
# Multiply with reciprocal value<br />
#<br />
MLT in1 tmp1 out2<br />
#<br />
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
PAGE 3.5.17
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs EXPONE, SQUARE, LOGE, ADD and XLIN<br />
#<br />
# Double file in three different ways<br />
#<br />
# Files out1, out2 and out3 will contain similar data<br />
#<br />
#<br />
# Double input file<br />
#<br />
XLIN in1 out1
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs MERAVG and ZXCOLL<br />
#<br />
#<br />
# Get meridional averages of fields in multi-level sets<br />
#<br />
MERAVG in1 tmp1<br />
#<br />
# Collect meridional average sets to two-dimensional fields<br />
#<br />
ZXCOLL tmp1 out1<br />
#<br />
PAGE 3.5.19
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs MONAVG and SELAVG<br />
#<br />
# Get monthly averages in two different ways<br />
#<br />
# Files out1 and out2 will contain similar data<br />
#<br />
#<br />
# Get monthly averages<br />
#<br />
MONAVG in1 out1<br />
#<br />
# Get monthly averages by counting dates, two dates per day<br />
#<br />
SELAVG in1 out2
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs YEARAVG and SELAVG<br />
#<br />
# Get yearly averages in two different ways<br />
#<br />
# Files out1 and out2 will contain similar data<br />
#<br />
#<br />
# Get yearly averages<br />
#<br />
YEARAVG in1 out1<br />
#<br />
# Get yearly averages by counting dates, two dates per day<br />
#<br />
SELAVG in1 out2
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs CNV2EXT, CNV4EXT and CATEXTF and<br />
# concatenation of GRIB-files<br />
#<br />
# Files out1 and out4 will contain similar data.<br />
# Files out2 and out3 will contain similar data.<br />
#<br />
#<br />
# Convert first input file<br />
#<br />
CNV2EXT in1 tmp1<br />
#<br />
# Convert second input file<br />
#<br />
CNV2EXT in2 tmp2<br />
#<br />
# Concatenate converted files<br />
#<br />
CATEXTF tmp[12] out1<br />
#<br />
# Convert back concatenated file using predefined dimensions<br />
#<br />
CNV4EXT - out1 out3<br />
#<br />
# Concatenate input files<br />
#<br />
cat in[12] >out2<br />
#<br />
# Convert concatenated file<br />
#<br />
CNV2EXT out2 out4<br />
#<br />
PAGE 3.5.22
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for program XLIN<br />
#<br />
# Files out1 and out4 will contain similar data.<br />
#<br />
#<br />
# Convert first input file<br />
#<br />
XLIN in out
<strong>DKRZ</strong> GRIB Format Module Documentation<br />
#<br />
# Example for programs SPLITY and SPLITM<br />
#<br />
# Files yearmon.YYMM and monyear.MMYY will contain similar data.<br />
# Files in and yearmon will contain similar data.<br />
#<br />
#<br />
# Split input file to months<br />
#<br />
SPLITM in monyear.<br />
#<br />
# Split each month to years<br />
#<br />
for $monfile in monyear.??<br />
do<br />
SPLITY $monfile<br />
done<br />
#<br />
# Concatenate single files<br />
#<br />
cat monyear.???? > monyear<br />
#<br />
# Split resorted file to years<br />
#<br />
SPLITY monyear yearmon.<br />
#<br />
# Split each year to months<br />
#<br />
for $yearfile in yearmon.??<br />
do<br />
SPLITM $yearfile<br />
done<br />
#<br />
# Concatenate single files<br />
#<br />
cat yearmon.???? >yearmon<br />
#<br />
PAGE 3.5.24
4. THE EXTRA-FORMAT<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The EXTRA-Format is a very simple Format for data representation. This fact allows every user to transform<br />
his own data set into the EXTRA-Format easily and enable him to use the programs described in<br />
this section.<br />
4.1 STRUCTURE OF DATA SETS<br />
Each EXTRA-Format file consists of any number of pairs of records, i.e. it has the pattern:<br />
header-record data-record<br />
[header-record data-record [ etc.....] ]<br />
The header record gives information about the immediately-following data record. The header record<br />
comprises 4 or more binary integer values. These were written in a Fortran program using the statement:<br />
WRITE (UNIT) IDAT, IVAR, LEVEL, LEN<br />
The variables IDAT, IVAR, LEVEL and LEN represent respectively the Date, the Variable, the Height<br />
level and the field size of the following data record. Table 3 shows the possible values for IDAT, IVAR<br />
and LEVEL. The value for missing IDAT, IVAR or LEVEL is 9999. The variable LEN must be set to the<br />
number of field points, because it will be used in the read statement for the data record. All values for<br />
IVAR shown in Table 4 are frequently used with EXTRA- Format. These values can be converted to the<br />
values used in the GRIB-Format by adding 128 to the EXTRA values of IVAR.<br />
Each data record was written in Fortran using the statement:<br />
WRITE (UNIT) (DATA(I),I=1,LEN)<br />
where LEN is given in the immediately-preceding header record. The values of DATA are REAL values.<br />
The default value for missing data is 9.E99.<br />
A file may consist of any set of pairs of records. However, if the records are mixed in character, some<br />
program modules will not work. Therefore it is usual for a file to comprise a set of records similar in<br />
some way. For example, in a given file all data records should have the same length, but may differ in<br />
their dates, variables or levels. The field represented by the record are treated by the program modules<br />
as one-dimensional. Some of the program modules select records to analyze according to one or more<br />
of the parameters IDAT, IVAR and LEVEL. Other programs analyze all records in a file, so the user of<br />
such programs should ensure that he chooses only files for which all records indeed refer to the same<br />
variable and level.<br />
PAGE 4.1.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 3 Meaning of the variables in the header record<br />
PARAMETER TYPE CONTENTS<br />
IDAT Integer Date<br />
YYYYMMDD<br />
with YYYY = year<br />
MM = month<br />
DD = day<br />
or:<br />
YYMMDD<br />
with YY = year<br />
MM = month<br />
DD = day<br />
or:<br />
NN<br />
with NN = running index<br />
IVAR Integer Code number of variable<br />
as defined in Table 4 and Table 5<br />
LEVEL Integer Height level in hPa.<br />
Surfaces are labeled with -100<br />
Sea level is labeled with -200<br />
LEN Integer Length of data record<br />
Table 4 Standard Model Codes for IVAR in EXTRA-Format (Sheet 1 of 4)<br />
Code Name of variable [unit]<br />
1 surface geopotential (orography) [m**2/s**2]<br />
2 temperature [K]<br />
3 u-velocity [m/s]<br />
4 v-velocity [m/s]<br />
5 specific humidity [kg/kg]<br />
6 Surface pressure [Pa]<br />
7 vertical velocity [Pa/s]<br />
9 precipitable water content [m]<br />
10 vorticity [1/s]<br />
11 surface temperature [K]<br />
12 surface soil wetness [m]<br />
13 snow depth [m]<br />
14 large scale precipitation [m/s]<br />
PAGE 4.1.2
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 4 Standard Model Codes for IVAR in EXTRA-Format (Sheet 2 of 4)<br />
Code Name of variable [unit]<br />
15 convective precipitation [m/s]<br />
16 snow fall [m/s]<br />
17 boundary layer dissipation [W/m**2]<br />
18 surface sensible heat flux [W/m**2]<br />
19 surface latent heat flux [W/m**2]<br />
20 stream function [m**2/s]<br />
21 velocity potential [m**2/s]<br />
23 mean sea level pressure [Pa]<br />
24 log surface pressure<br />
25 liquid water content [kg/kg]<br />
27 divergence [1/s]<br />
28 geopotential height [gpm]<br />
29 relative humidity [fract.]<br />
30 tendency of surface pressure [Pa/s]<br />
31<br />
3<br />
u *<br />
[m**3/s**3]<br />
32 surface runoff [m/s]<br />
33 liquid water content [kg/kg]<br />
34 cloud cover [fract.]<br />
35 total cloud cover [fract.]<br />
36 total cloud cover [fract.]<br />
37 10m u-velocity [m/s]<br />
38 10m v-velocity [m/s]<br />
39 2m temperature [K]<br />
40 2m dew point temperature [K]<br />
41 surface temperature [K]<br />
42 deep soil temperature [K]<br />
43 10m wind speed [m/s]<br />
44 land sea mask [0: sea, 1: land]<br />
45 surface roughness [m]<br />
46 surface background albedo [fract.]<br />
47 surface albedo [fract.]<br />
48 surface solar radiation [W/m**2]<br />
PAGE 4.1.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 4 Standard Model Codes for IVAR in EXTRA-Format (Sheet 3 of 4)<br />
Code Name of variable [unit]<br />
49 surface thermal radiation [W/m**2]<br />
50 top solar radiation [W/m**2]<br />
51 top thermal radiation [W/m**2]<br />
52 u-stress [Pa]<br />
53 v-stress [Pa]<br />
54 Evaporation [m/s]<br />
55 soil temperature [K]<br />
66 skin reservoir content of plants [m]<br />
67 u-gravity wave stress [Pa]<br />
68 v-gravity wave stress [Pa]<br />
69 gravity wave dissipation [W/m**2]<br />
73 maximum 2m-temperature [K]<br />
74 minimum 2m-temperature [K]<br />
75 top solar radiation upward [W/m**2]<br />
76 surface solar radiation upward [W/m**2]<br />
77 surface thermal radiation upward [W/m**2]<br />
78 snow temperature [K]<br />
79 soil temperature [K]<br />
80 " [K]<br />
81 " [K]<br />
82 sea ice cover [fract.]<br />
83 sea ice depth [m]<br />
84 vegetation type<br />
85 (effective) sea-ice skin temperature [K]<br />
86 maximum surface temperature [K]<br />
87 minimum surface temperature [K]<br />
88 maximum 10m-wind speed [m/s]<br />
89 maximum convective cloud tops [m]<br />
90 snow melt [m/s]<br />
92 residual surface heat budget [W/m**2]<br />
93 snow depth change [m/s]<br />
94 liquid water content [kg/kg]<br />
PAGE 4.1.4
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 4 Standard Model Codes for IVAR in EXTRA-Format (Sheet 4 of 4)<br />
Code Name of variable [unit]<br />
95 cloud cover [fract.]<br />
96 top solar radiation in clear-sky areas [W/m**2]<br />
97 top thermal radiation in clear-sky areas [W/m**2]<br />
98 number of clear-sky events<br />
99 top solar radiation in overcast areas [W/m**2]<br />
100 top thermal radiation in overcast areas [W/m**2]<br />
101 number of overcast events<br />
102 vertically integrated specific humidity [kg/m**2]<br />
103 vertically integrated liquid water cont. [kg/m**2]<br />
104 glacier mask [0: no, 1: yes]<br />
113-127 tracer gases<br />
131 wind speed ((u**2 + v**2) 1/2 ) [m/s]<br />
132 total precipitation (14+15) [m]<br />
133 total top radiation (50+51) [W/m**2]<br />
134 total surface radiation (48+49) [W/m**2]<br />
135 net surface heat flux (18+19+48+49-92) [W/m**2]<br />
136 total surface water (14+15+54-32) [m]<br />
137 solar cloud forcing (50-96) [W/m**2]<br />
138 thermal cloud forcing (51-97) [W/m**2]<br />
139 total cloud forcing (50+51-96-97) [W/m**2]<br />
140 atmospheric solar radiation (50-48) [W/m**2]<br />
141 atmospheric thermal radiation (51-49) [W/m**2]<br />
142 total atmospheric radiation (50+51-48-49) [W/m**2]<br />
143 surface runoff (calc.as residual) (14+15+54-93) [m/s]<br />
144 mass stream function<br />
145 dps ⁄ dλ : zonal derivative of surface pressure<br />
146 dps ⁄<br />
dφ : meridional derivative of surface pressure<br />
Table 5 Codes for IVAR in EXTRA-Format created by some programs<br />
Code Name of variable [unit]<br />
503 Empirical Orthogonal Functions<br />
PAGE 4.1.5
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 5 Codes for IVAR in EXTRA-Format created by some programs<br />
Code Name of variable [unit]<br />
504 Principal Components<br />
520 Canonical correlation coefficient<br />
521 Canonical F-Map<br />
522 Canonical F-Component<br />
523 Canonical G-Map<br />
524 Canonical G-Component<br />
525 Local variances of F-Maps<br />
526 Local variances of G-Maps<br />
530 Frequency (spectral analyses)<br />
531 Variance of field A (spectral analyses)<br />
532 Variance of field B (spectral analyses)<br />
533 Phases (spectral analyses)<br />
534 Squared coherence (spectral analyses)<br />
PAGE 4.1.6
4.2 LIST OF AVAILABLE PROGRAMS<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The program modules that can read EXTRA-Format files are listed below. For detailed information<br />
about the programs, see section 4.6.1 to 4.6.12<br />
a) Listing in alphabetical order<br />
add add two files 4.6.3.1<br />
addrec merge two files record by record 4.6.7.1<br />
anomal calculate anomalies 4.6.4.1<br />
anorm normalize with standard deviation 4.6.5.1<br />
append copy first tape1 then tape2 to tape3 4.6.3.2<br />
avg average over all records 4.6.6.1<br />
boxavg average spatial fields over coarser grid 4.6.6.2<br />
cadd add a constant field 4.6.2.1<br />
cancor execute canonical correlation analysis 4.6.12.1<br />
cdiv divide by a constant field 4.6.2.2<br />
chanoso change field orientation (north ↔ south) 4.6.7.2<br />
circle cyclic completion of a two-dimensional field 4.6.7.3<br />
cmult multiply by a constant field 4.6.2.3<br />
coarse delete every second row and column from a two-dimensional field 4.6.7.4<br />
complet completion of a data file with dummy values 4.6.7.5<br />
crospec cross-spectral analysis 4.6.12.2<br />
csub subtract a constant field 4.6.2.4<br />
dform create formatted output 4.6.8.1<br />
dif calculate differences of time steps T+1 and T 4.6.4.2<br />
div divide two files 4.6.3.3<br />
edge values smaler/grtr than limit set to missing value 4.6.7.6<br />
eqdate equalize dates of two files 4.6.3.4<br />
findan find annual cycle of daily data 4.6.6.3<br />
forminv transformation of formatted to EXTRA-Format output 4.6.8.2<br />
foufil band pass filter 4.6.12.3<br />
ggstat produce a file statistic 4.6.9.1<br />
hovplot plot a hovmöller diagram 4.6.11.1<br />
ipwrva interpolate default and/or wrong values 4.6.7.7<br />
lookat short formated look at binary data 4.6.9.2<br />
lmean calculate long time mean 4.6.6.4<br />
ltsplot plot very long time series 4.6.11.2<br />
merge merge two fields 4.6.3.5<br />
PAGE 4.2.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
mkeof compute eigenvalues, EOFs and principal components 4.6.12.4<br />
mkeofnor compute eigenvalues, normed EOFs and normed principal components 4.6.12.5<br />
momean compute monthly means from daily data 4.6.6.5<br />
mult multiply two files 4.6.3.6<br />
norm normalize data to mean zero and stnd devn one 4.6.5.2<br />
recon reconstruct time series from anomalies and mean 4.6.4.3<br />
runmean calculate a running mean for every grid point 4.6.6.6<br />
sadd add a constant to data 4.6.1.1<br />
sdiv divide data by a constant 4.6.1.2<br />
selbox select a spatial box 4.6.10.1<br />
selmon select a special month or seasons 4.6.10.2<br />
selvar select variable and level 4.6.10.3<br />
smult multiply data by a constant 4.6.1.3<br />
splirec split one file into two, record by record 4.6.7.8<br />
split split one file into two parts 4.6.7.9<br />
ssub subtract a constant from data 4.6.1.4<br />
sub subtract two files 4.6.3.7<br />
subtan subtract anual cycle of daily data 4.6.6.7<br />
tp transpose a data field 4.6.7.10<br />
trend detrend a time series 4.6.6.8<br />
tsplot plot time series (max 2 per plot) 4.6.11.3<br />
vortici compute the vertical component of the vorticity 4.6.12.6<br />
weigavg area weighted mean 4.6.6.9<br />
zonmean zonal mean 4.6.6.10<br />
zrplot plot pairs or single time series (max 20 per plot) 4.6.11.4<br />
sadd add a constant to data<br />
sdiv divide data by a constant<br />
smult multiply data by a constant<br />
ssub subtract a constant from data<br />
cadd add a constant field<br />
cdiv divide by a constant field<br />
cmult multiply by a constant field<br />
csub subtract a constant field<br />
b) Listing in thematic order<br />
Operations with a constant (section 4.6.1 )<br />
Operations with a constant field (section 4.6.2 )<br />
PAGE 4.2.2
add add two files<br />
append copy first tape1 then tape2 to tape3<br />
div divide two files<br />
eqdate equalize dates of two files<br />
merge merge two fields<br />
mult multiply two files<br />
sub subtract two files<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Operations with two files (section 4.6.3 )<br />
Anomaly, difference and deviation programs (section 4.6.4 )<br />
anomal calculate anomalies<br />
dif calculate differences of time steps T+1 and T<br />
recon reconstruct time series from anomalies and mean<br />
<strong>No</strong>rmalization programs (section 4.6.5 )<br />
anorm normalization with standard deviation<br />
norm normalize data to mean zero and standard deviation one<br />
Averaging and detrending programs (section 4.6.6 )<br />
avg average over all records<br />
boxavg average spatial fields over coarser grid<br />
findan find annual cycle of daily data<br />
lmean calculate long time means<br />
momean compute monthly means from daily data<br />
runmean calculate a running mean for every grid point<br />
subtan subtract anual cycle of daily data<br />
trend detrend a time series<br />
weigavg area-weighted mean<br />
zonmean zonal mean<br />
Manipulation of data files (section 4.6.7 )<br />
addrec merge two files record by record<br />
chanoso chance field orientation (north -- south)<br />
circle cyclic completion of a two dimensional field<br />
coarse delete every second row and column from a two dimensional field<br />
complet completion of a data file with dummy values<br />
edge values smaller/greater than limit set to missing value<br />
ipwrva interpolate default and/or wrong values<br />
splirec split one file into two, record by record<br />
PAGE 4.2.3
split split one file into two parts<br />
tp transpose a data field<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Changes of input/output formats (section 4.6.8 )<br />
dform create formatted output<br />
forminv transformation of formatted to EXTRA-Format output<br />
ggstat produce a file statistic<br />
lookat short formated look at binary data<br />
selbox select a spatial box<br />
selmon select a special month or seasons<br />
selvar select variable and level<br />
File information programs (section 4.6.9 )<br />
Selection programs (section 4.6.10 )<br />
Plot programs (section 4.6.11 )<br />
hovplot plot a hovmöller diagram<br />
ltsplot plot very long time series<br />
tsplot plot time series (max 2 per plot)<br />
zrplot plot pairs or single time series (max 20 per plot)<br />
Complex programs (section 4.6.12 )<br />
cancor execute canonical correlation analysis<br />
crospec cross-spectral analysis<br />
foufil band-pass filter<br />
mkeof compute eigenvalues, EOFs and principal components<br />
mkeofnor compute eigenvalues, normed EOFs and normed principal components<br />
vortici compute the vertical component of the vorticity<br />
PAGE 4.2.4
4.3 USE OF THE PROGRAMS<br />
4.3.1 Outline<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The running of a program comprises giving the name of the program, the names of input and output files,<br />
and possibly a number of parameters. The program then does four things automatically:<br />
• Makes connections between the channels mentioned in the Fortran program and the input and<br />
output files.<br />
• Creates an executable code.<br />
• Executes the program.<br />
• Saves the new files to disk.<br />
The programs are written in FORTRAN. They use CRAY-FORTRAN for a variable field length, so<br />
every data set can be handled with these programs. All the programs make use of the global Shell environment<br />
variable EXTRA. The definition of EXTRA is given in section 3.1 .<br />
The programs may be run either interactively or in a batch job.<br />
4.3.2 How to use the programs<br />
To run a program module, a UNIX command in which the name of the program and the names of any<br />
input and output files are specified, is used. The form of the call, whether run interactively or in a batch<br />
job, is:<br />
for example:<br />
a) Interactive usage:<br />
prog infile1 infile2 .. outfile1 outfile2 ..<br />
add u1.dat u2.dat u.dat<br />
If the program is run interactivly and it requires parameters, one gets a request on the screen to specify<br />
these parameters. In this case one has to enter the appropriate parameters and hit the RETURN key.<br />
If one wants to use the default values for the parameter enter Ctrl/D .<br />
b) Batch usage:<br />
If the call is made inside a batch job and the program requires input parameters, one can provide these<br />
in two different ways:<br />
1) A parameter file (parfile) has to be created where the required parameters are specified. The<br />
filename of this parameter file must be passed to the program. The programs read the input<br />
parameter from the standard input, so one can use the UNIX redirection ( < ) to use the parfile<br />
as standard input. In the following batch job example the directory $MFHOME/datadir<br />
PAGE 4.3.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
contains the data files and the parameter specified in the file parfile.<br />
# QSUB -lT 60 # CPU time limit in seconds<br />
# QSUB -lM 4MW # MEMORY limit in mega words<br />
#<br />
# execution on a temporary directory<br />
cd $TMPDIR<br />
#<br />
# setting of the path to the data files directory<br />
DIR = $MFHOME/datadir<br />
#<br />
#<br />
# call of the script<br />
prog $DIR/infile1 $DIR/infile2 $DIR/outfile1 < $DIR/parfile<br />
#<br />
# execution finished<br />
2) One can specify the parameter inside the batch job. In the following example the lines following<br />
the program call until the mark EOI are used as standard input. One declares the mark<br />
following the
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
4.4 IMPLEMENTATION ON DIFFERENT COMPUTER TYPES<br />
4.4.1 Outline<br />
All executable EXTRA-Format programs are located in a special directory. This program directory differs<br />
on every computer. All programs require that the global SHELL variable EXTRA is defined and<br />
contains the path to the EXTRA-Format programs. To simplify matters in batch and interactive use one<br />
add the path to the program directory to the search-path variable<br />
PATH=$EXTRA:$PATH<br />
One obtains a complete list of all EXTRA-Format programs by typing<br />
ls $EXTRA.<br />
The programs are executed in the local directory $TMPDIR. All files which are not specified as permanent<br />
files are lost at logout. Therefore, if output files should be saved, a permanent directory must be<br />
specified, e.g.:<br />
$MFHOME/outfile2.dat<br />
creates outfile2.dat in the directory $MFHOME<br />
outfile2.dat<br />
creates outfile2.dat in the current directory<br />
If no filename is specified a file (e.g. chan.3) will be created in the directory TMPDIR.<br />
If GRIB- and EXTRA-Format programs are used in the same batch file, be sure that the correct directory<br />
is used in each case 1 .<br />
4.4.2 CRAY-2 and YMP<br />
The variable EXTRA is a global variable set at login by the system. A redefinition of the variable PATH<br />
in the .profile will ease the usage of the programs.<br />
PATH=$EXTRA:$PATH<br />
The programs can read cosblocked or pure (unblocked) EXTRA-Format data files.<br />
1. If you use both data-formats (GRIB and EXTRA), it is helpful to arrange your PATH variable in the following<br />
way:<br />
PATH=$EXTRA:$GRIB:$PATH<br />
Use EXTRA-Format programs with small letters, e.g. : ggstat infile.ext<br />
and GRIB-Format programs with capital letters, e.g. : GGSTAT infile.grb<br />
This feature only works, if the correct succession in the PATH statement is given:<br />
First $EXTRA , then $GRIB<br />
PAGE 4.4.1
4.4.3 CONVEX 1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The CONVEX has a default word length of 4 bytes for REAL and INTEGER. To have a better compatibility<br />
with the results of the CRAY’s and SUN’s, and to get the possibility of variable field length the<br />
compiler option -cfc with 8 bytes word length for REAL and INTEGER is used.<br />
Two conversion routines ( 4to8real and 8to4real ) are installed on the CONVEX to change between<br />
4- and 8-byte CONVEX real. Furthermore all programs could be called for 4-byte-REAL with a preceding<br />
4 (e.g. 4mkeof) or with a preceding 8 for 8-byte-REAL (e.g. 8mkeof). The default value for 8byte-REAL<br />
is 9.E99 and for 4-bytes REAL is 3.E33.<br />
The program versions installed on the CONVEX can use CRAY-2S and YMP 8-byte binary data as inand<br />
output (cosblocked or pure, unblocked resp.), if a preceding capital C enables the programs to<br />
work with these binary files (e.g. Cmkeof). The output files are pure (unblocked) binary files in<br />
EXTRA- Format, which work as input files for EXTRA-programs on the CRAY-2 or YMP. One can use<br />
this files also as input files on the CONVEX if you use a preceding C in the program name. Two conversion<br />
routines CRtoCONV and CONVtoCR exist on the CONVEX to convert CRAY binary data to<br />
CONVEX 8-byte-REAL data. Usage of the 4 converting routines (4to8real, 8to4real, CRtoCONV,<br />
CONVtoCR) is only useful if the dataset is often used in the future, for two or three program calls it is<br />
better to use the programs with a preceding C, 8 or 4 respectively.<br />
Executable EXTRA-Format program scripts reside in the directory /pool/EXTRA/programs. One<br />
has to create the global variable EXTRA and to change the PATH at login . The following commands<br />
should be included in the .login file:<br />
setenv EXTRA /pool/EXTRA/programs<br />
set path ( $EXTRA $path )<br />
The programs without a preceding 4 or 8 use 8-byte-REAL as default for in- and output.<br />
4.4.4 SUN-workstations<br />
The EXTRA-Format programs work on the SUN server regen at the <strong>DKRZ</strong> as well. The executable<br />
EXTRA-Format program scripts are located in the directory /usr/mpi/EXTRA/programs.<br />
1. Special implementation on the CONVEX at KNMI in DeBilt:<br />
Executable EXTRA-Format program scripts reside in the directory /resrch3/omt/bausteine/scr.<br />
Change the .login file to include this directory in your path:<br />
setenv EXTRA /resrch3/omt/bausteine/scr<br />
set path ( $EXTRA $path )<br />
The programs without a preceding 4 or 8 use 4-byte-REAL as default for in- and output. The plot-programs<br />
do not work because the correct plot-library is missing. The programs create a working directory<br />
for every program call. If a program ends irregular the working directory may remain on your disk in the<br />
$HOME-directory (e.g.:work_23351). If not further needed, please delete it.<br />
PAGE 4.4.2
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
One has to create the global variable EXTRA and to change the PATH at login. The following commands<br />
should be included in the .login file:<br />
setenv EXTRA /usr/mpi/EXTRA/programs<br />
set path ( $EXTRA $path )<br />
The input data have to be of type double precision, otherwise the programs will fail.<br />
PAGE 4.4.3
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.5 ONLINE HELP<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
An online help system for the EXTRA-Format programs is available on all computers at the <strong>DKRZ</strong> 1<br />
using the command:<br />
exthlp keyword1 [keyword2] ...<br />
Keywords are all program names and short names for every section in this manual (see Table 6). All<br />
actual changes since the implementation of this document version are documented. Using the keyword<br />
news, some general information about new features and changes in the program are shown. The command<br />
exthlp help<br />
produces a complete list of all available keywords.<br />
Information about changes in the programs or actual news appear at the beginning of the control printout.<br />
Table 6 Keywords recognized by the exthlp-command<br />
Section Section title keyword<br />
Table of contents table<br />
1. Introduction intro<br />
2. Outline of the systems outline<br />
3.1 Structure of datasets structure<br />
4.2 List of available programs list<br />
4.3 Use of the programs use<br />
4.4 Implementation on different computers implemen<br />
4.5 Online help exthlp<br />
4.7 Example of use example<br />
Actual changes in the programs news<br />
List of all keywords help<br />
1. The online help feature is implemented on the CONVEX at KNMI too.<br />
PAGE 4.5.1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 4.5.2
4.6 DESCRIPTION OF THE MODULES<br />
4.6.1 Operations with a constant<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains a description of programs which perform operations with a constant value.<br />
4.6.1.1 sadd add a constant to data<br />
4.6.1.2 sdiv divide data by a constant<br />
4.6.1.3 smult multiply data with a constant<br />
4.6.1.4 ssub subtract a constant from data<br />
PAGE 4.6.1
4.6.1.1 sadd<br />
Purpose<br />
Adds a constant to a data file:<br />
infile1(x,t) + const = outfile1(x,t)<br />
Calling sequence<br />
sadd infile1 outfile1
4.6.1.2 sdiv<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Divides a data file by a constant: infile1(x,t) / const = outfile1(x,t)<br />
Calling sequence<br />
sdiv infile1 outfile1
4.6.1.3 smult<br />
Purpose<br />
Multiplies a data file with a constant:<br />
infile1(x,t) * const = outfile1(x,t)<br />
Calling sequence<br />
smult infile1 outfile1
4.6.1.4 ssub<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Subtracts a constant from a data file: infile1(x,t) - const = outfile1(x,t)<br />
Calling sequence<br />
ssub infile1 outfile1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.2 Operations with a constant field<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains a description of programs which performs operations with a constant vector.<br />
4.6.2.1 cadd add a constant vector<br />
4.6.2.2 cdiv divide by a constant vector<br />
4.6.2.3 cmult multiply by a constant vector<br />
4.6.2.4 csub subtract a constant vector<br />
PAGE 4.6.2
4.6.2.1 cadd<br />
Purpose<br />
Adds a constant field to the data file<br />
infile1(x,t) + infile2(x) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
cadd infile1 infile2 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files.<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimension. infile2 contains the constant<br />
field.<br />
outfile1 EXTRA-Format<br />
control printout<br />
The header records contain the information from infile1<br />
PAGE 4.6.2.1
4.6.2.2 cdiv<br />
Purpose<br />
Divides the data file by a constant vector:<br />
infile1(x,t) / infile2(x) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
cdiv infile1 infile2 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output file when ever there is a missing value in one<br />
of the input files.<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimension. infile2 contains the constant<br />
field.<br />
outfile1 EXTRA-Format<br />
control printout<br />
The header records contain the information from infile1<br />
PAGE 4.6.2.2
4.6.2.3 cmult<br />
Purpose<br />
Multiplies the data file by a constant field<br />
infile1(x,t) * infile2(x) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
cmult infile1 infile2 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimension. infile2 contains the constant<br />
field.<br />
outfile1 EXTRA-Format<br />
control printout<br />
The header records contain the information from infile1<br />
PAGE 4.6.2.3
4.6.2.4 csub<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Subtracts a constant vector from the input file:<br />
infile1(x,t) - infile2(x) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
csub infile1 infile2 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimension. infile2 contains the constant<br />
field.<br />
outfile1 EXTRA-Format<br />
control printout<br />
The header records contain the information from infile1<br />
PAGE 4.6.2.4
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.3 Operations with two files<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains a description of programs which performs simple operations with two files.<br />
4.6.3.1 add add two files<br />
4.6.3.2 append copy first tape1 to tape3, then tape2 to tape3<br />
4.6.3.3 div divide two files<br />
4.6.3.4 eqdate equalize dates of two files<br />
4.6.3.5 merge merge two files<br />
4.6.3.6 mult multiply two files<br />
4.6.3.7 sub subtract two files<br />
PAGE 4.6.3
4.6.3.1 add<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Adds two data files infile1(x,t) + infile2(x,t) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
add infile1 infile2 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimensions and number of time steps<br />
outfile1 EXTRA-Format<br />
The header records contain the same information as in infile1.<br />
control printout<br />
PAGE 4.6.3.1
4.6.3.2 append<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Appends infile2 behind infile1 and writes the new file to outfile1<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
append infile1 infile2 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files.<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
outfile1 EXTRA-Format<br />
control printout<br />
PAGE 4.6.3.2
4.6.3.3 div<br />
Purpose<br />
Divides the data file infile1 by file infile2<br />
infile1(x,t) / infile2(x,t) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
div infile1 infile2 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimensions and number of time steps<br />
outfile1 EXTRA-Format<br />
control printout<br />
The header records contain the information from infile1.<br />
PAGE 4.6.3.3
4.6.3.4 eqdate<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Compares two files, which must be in ascending order of date.<br />
Generates two files which contains only dates that were present in both the input files, but are otherwise<br />
the same as the two input files.<br />
When IDATE1 equals IDATE2, the header records and data records will be written to outfile1 and<br />
outfile2 respectively. Outfile3 contains the protocol with all rejected dates.<br />
Calling sequence<br />
Input file<br />
eqdate infile1 infile2 outfile1 outfile2 outfile3<br />
This program produces missing values in the output files when ever there is a missing value in the<br />
input files.<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must be in ascending order of date.<br />
Output file<br />
Output<br />
outfile1 EXTRA-Format<br />
The header records contain the information from infile1.<br />
outfile2 EXTRA-Format<br />
The header records contain the information from infile2.<br />
outfile3 Protocol.<br />
control printout<br />
PAGE 4.6.3.4
4.6.3.5 merge<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Merge two data files. This program merges fields at correspondent locations in infile1(LENF,t) and<br />
infile2(LENG,t) together and forms fields which have the length of the sum of the input field length<br />
on outfile1(LENF+LENG,t).<br />
outfile1(z,t) = infile1(x,t) ; x = 1,..,LENF; z = 1,..,LENF<br />
outfile1(z,t) = infile2(y,t) ; y = 1,..,LENG ; z = LENF+1,..,LENF+LENG<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
merge infile1 infile2 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same number of records<br />
outfile1 EXTRA-Format<br />
The header records contain the information from infile1.<br />
The field length is LENF + LENG.<br />
control printout<br />
PAGE 4.6.3.5
4.6.3.6 mult<br />
Purpose<br />
Multiplies two data files<br />
infile1(x,t) * infile2(x,t) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
mult infile1 infile2 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimension and number of time steps<br />
outfile1 EXTRA-Format<br />
The header records contain the information from infile1.<br />
control printout<br />
PAGE 4.6.3.6
4.6.3.7 sub<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Subtracts two data files infile1(x,t) - infile2(x,t) = outfile1(x,t)<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
sub infile1 infile2 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
Both files must have the same field dimensions and number of time steps<br />
outfile1 EXTRA-Format<br />
The header records contain the information from infile1.<br />
control printout<br />
PAGE 4.6.3.7
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
4.6.4 Anomaly, difference and deviation programs<br />
This section contains a description of programs which perform anomaly, difference and deviation computations<br />
4.6.4.1 anomal calculate anomalies<br />
4.6.4.2 dif calculate differences of time steps t+1 and t<br />
4.6.4.3 recon reconstruct time series from anomalies and mean<br />
PAGE 4.6.4
4.6.4.1 anomal<br />
Purpose<br />
Computes anomalies<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
outfile1(x,yymmdd) = infile1(x,yymmdd) - infile2(x,yymm).<br />
Calling sequence<br />
Proceeding<br />
Input files<br />
Output file<br />
Output<br />
anomal infile1 infile2 outfile1<br />
The program calculates the anomalies relative to a monthly mean. The program compares the<br />
month (MM) given by the parameter IDAT in both input files. If the month on the both input files<br />
correspond the anomalies are computed.<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files.<br />
infile1 EXTRA-Format (actual data)<br />
infile2 EXTRA-Format (monthly means)<br />
Both files must have the same field length.<br />
outfile1 EXTRA-Format (anomalies)<br />
The header records contain the information from infile1<br />
control printout<br />
PAGE 4.6.4.1
4.6.4.2 dif<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Subtracts the field at time step t from the field at time step t+1.<br />
outfile1(x,t+1) = infile1(x,t+1) - infile1(x,t)<br />
Calling sequence<br />
Input file<br />
Output file<br />
Output<br />
dif infile1 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in the<br />
input file.<br />
infile1 EXTRA-Format<br />
outfile1 EXTRA-Format<br />
The header records contain the information from infile1 at time step t+1.<br />
control printout<br />
PAGE 4.6.4.2
4.6.4.3 recon<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Reconstructs timeseries (inverse program to anomal)<br />
outfile1(x,yymmdd) = infile1(x,yymmdd) + infile2(x,yymm)<br />
Calling sequence<br />
Proceeding<br />
Input files<br />
Output file<br />
Output<br />
recon infile1 infile2 outfile1<br />
The program reconstructs the original value relative to the monthly mean . The program compares<br />
the month (MM) given by the parameter IDAT in both input files.<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files.<br />
infile1 EXTRA-Format (anomalie data)<br />
infile2 EXTRA-Format (long-term means)<br />
Both files must have the same field length.<br />
outfile1 EXTRA-Format (anomalies)<br />
The header records contain the information from infile1<br />
control printout<br />
PAGE 4.6.4.3
4.6.5 <strong>No</strong>rmalization programs<br />
This section contains normalization programs:<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
4.6.5.1 anorm normalization with standard deviation<br />
4.6.5.2 norm normalize data to mean zero and standard deviation one<br />
PAGE 4.6.5
4.6.5.1 anorm<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
<strong>No</strong>rmalization of the input data with the standard deviation.<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
anorm infile1 infile2 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in one<br />
of the input files.<br />
infile1 EXTRA-Format (actual data)<br />
infile2 EXTRA-Format (standard deviation)<br />
Both files must have the same field length.<br />
outfile1 EXTRA-Format (normalized data).<br />
control printout<br />
The header records contain the information from infile1<br />
PAGE 4.6.5.1
4.6.5.2 norm<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
<strong>No</strong>rmalization of the input data to time mean zero f( x)<br />
= 0 and<br />
standard deviation one<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
norm infile1 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in the<br />
input file.<br />
infile1 EXTRA-Format (actual data)<br />
outfile1 EXTRA-Format (normalized data).<br />
The header records contain the information from infile1<br />
control printout<br />
σ 2 ( x)<br />
=<br />
1<br />
PAGE 4.6.5.2
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
4.6.6 Averaging and detrending programs<br />
This section contains descriptions of averaging programs.<br />
4.6.6.1 avg average over all records<br />
4.6.6.2 boxavg average spatial fields over a part of the data field(s)<br />
4.6.6.3 findan find annual cycle of daily data<br />
4.6.6.4 lmean calculate long time means<br />
4.6.6.5 momean compute monthly means from daily data<br />
4.6.6.6 runmean calculate a running mean for every grid point<br />
4.6.6.7 subtan subtract anual cycle of daily data<br />
4.6.6.8 trend detrend a time series<br />
4.6.6.9 weigavg area-weighted mean<br />
4.6.6.10 zonmean zonal mean<br />
PAGE 4.6.6
4.6.6.1 avg<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computes an average over all records of infile1.<br />
Calling sequence<br />
Proceeding<br />
Input files<br />
Output file<br />
Output<br />
avg infile1 outfile1<br />
The program calculates an average over all records in infile1 without looking for the variable or<br />
the level. To avoid meaningless results, the user should ensure that infile1 contains only one variable<br />
at one level.<br />
This program produces missing values in the output file whenever a data point contains missing<br />
values in every record.<br />
infile1 EXTRA-Format (actual data)<br />
outfile1 EXTRA-Format (average)<br />
The header record contains the information of the last header record from infile1.<br />
control printout<br />
PAGE 4.6.6.1
4.6.6.2 boxavg<br />
Purpose<br />
Proceeding<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computes a spatial mean over rectangular boxes for each data record.<br />
boxavg calculates ROWLEN as LEN/NROWS. LEN, ROWLEN and NROWS must be integer multiples<br />
of NROWS, BOXCOLS and BOXROWS, respectively. boxavg starts from the first data<br />
item and continues in blocks BOXCOLS wide and BOXROWS high. In case of dismatch, you<br />
must first use selbox to extract a suitable subset of the data set.<br />
Calling sequence<br />
boxavg infile1 outfile1
4.6.6.3 findan<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Calculates the annual cycle of a file containing daily data.<br />
For fields in infile1 the condition<br />
x(t) = a0 + a1 * cos(w t) + b1 * sin(w t) + a2 * cos(2 w t) + b2 * sin(2 w t)<br />
is determined with w=2π/(NDAYS)<br />
The coefficients a0 , a1 , a2 , b1 and b2 are least square fits.<br />
Calling sequence<br />
findan infile1 outfile1
4.6.6.4 lmean<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computes means for every month corresponding to the input parameter list.<br />
Calling sequence<br />
lmean infile1 outfile1
4.6.6.5 momean<br />
Purpose<br />
Computes monthly means.<br />
Calling sequence<br />
Proceeding<br />
momean infile1 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The program calculates monthly means over all records for every month occurring in the input file<br />
infile1, without looking for the variable or the level. To avoid meaningless results, the user should<br />
ensure that infile1 contains only one variable at one level.<br />
Missing values (9.E99)<br />
Input files<br />
Output file<br />
Output<br />
This program produces missing values in the output file when ever a data point contains missing<br />
values in every record. For single records the missing value is skipped.<br />
infile1 EXTRA-Format (actual data).<br />
outfile1 EXTRA-Format<br />
For every year and month one data record. The header record contains the information of the<br />
header records from infile1. Only IDATE has changed to YYMM00 instead of YYMMDD.<br />
control printout<br />
PAGE 4.6.6.5
4.6.6.6 runmean<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computes a running mean for every data record.<br />
Calling sequence<br />
runmean infile1 outfile1
4.6.6.7 subtan<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Subtract the annual cycle computed from the program findan from the input time series.<br />
Calling sequence<br />
Input file<br />
Output file<br />
Output<br />
subtan infile1 infile2 outfile1<br />
This program produces missing values whenever missing values appaer in the input files.<br />
infile1 EXTRA-Format<br />
All data must be for the same level and variable.<br />
They may be irregularly ordered and have gaps.<br />
infile2 EXTRA-Format<br />
coefficents for the anual cycle (produced with the program findan).<br />
outfile1 EXTRA-Format, new time series without an anual cycle.<br />
control printout<br />
PAGE 4.6.6.7
4.6.6.8 trend<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program fits a linear or quadratic trend to a series.<br />
Calling sequence<br />
Proceeding<br />
trend infile1 outfile1 outfile2<br />
The program treats the data in each record of infile1 as a time series. It fits either a linear or a quadratic<br />
trend to the series. It outputs in outfile1 the coefficients of the trend, together with the root<br />
mean square value of the deviation from the trend. It outputs in outfile2 the series with the trend<br />
subtracted from it.<br />
Let the original data series be x(t), where the first data point is for t=1, the next for t=2, etc. The<br />
program fits a series y such that the root-mean-square of y-x is minimised. y is given as follows:<br />
For linear trend: y = a + bt<br />
For quadratic trend y = a + bt + ct<br />
This program produces missing values in outfile2 whenever the corresponding point in the input<br />
file is missing.<br />
Input parameter<br />
Input files<br />
Output file<br />
Output<br />
1 if a linear trend is required<br />
2 if a quadratic trend is required.<br />
infile1 EXTRA-Format (actual data).<br />
outfile1 EXTRA-Format<br />
Linear trend:<br />
This file contains the coefficients a and b, and the root- mean-square of<br />
the detrended series.<br />
Quadratic trend:<br />
This file contains the coefficients a, b and c, and the root-mean-square of<br />
the detrended series.<br />
outfile2 EXTRA-Format This file contains the series x - y.<br />
control printout<br />
PAGE 4.6.6.8
4.6.6.9 weigavg<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computes an area weighted average over all grid points of a two dimensional field for every record<br />
of infile1. The output field contains on every grid point the same mean value.<br />
Calling sequence<br />
weigavg infile1 outfile1 0 The first point has the northernmost latitude<br />
< 0 The first point has the south most latitude<br />
FIRLAT Latitude of the first gridpoint.<br />
> 0 first point is on the northern hemisphere<br />
< 0 first point is on the southern hemisphere<br />
NROW Number of rows of the two dimensional input field<br />
infile1 EXTRA-Format (actual data).<br />
Regular gridded two dimensional input field.<br />
outfile1 EXTRA-Format (area weighted average).<br />
The header records contain the information of the header records from infile1.<br />
control printout<br />
PAGE 4.6.6.9
4.6.6.10 zonmean<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computes a zonal mean over all grid points of every row of a two dimensional field for every<br />
record of infile1. The output field contains for every row one zonal mean value.<br />
Calling sequence<br />
zonmean infile1 outfile1 > MARK<br />
NROW<br />
MARK<br />
Missing values (9.E99)<br />
This program produces missing values in the output file when all data points in one row contain<br />
missing values.<br />
Input parameter<br />
Input files<br />
Output file<br />
Output<br />
NROW number of rows of the two dimensional input field.<br />
infile1 EXTRA-Format (actual data).<br />
Two dimensional input field.<br />
outfile1 EXTRA-Format (area weighted average).<br />
The header records contain the information of the header records from infile1.<br />
control printout<br />
PAGE 4.6.6.10
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.7 Manipulation of data files<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains descriptions of file manipulation programs.<br />
4.6.7.1 addrec merge two files record by record<br />
4.6.7.2 chanoso chance field orientation (north → south)<br />
4.6.7.3 circle cyclic completion of a two dimensional field<br />
4.6.7.4 coarse delete every second row and column from a two dimensional field<br />
4.6.7.5 complet completion of a data file with dummy values<br />
4.6.7.6 edge values smaller/greater than limit set to missing value<br />
4.6.7.7 ipwrva interpolate default and/or wrong values<br />
4.6.7.8 splirec split one file into two, recordwhise.<br />
4.6.7.9 split split one file into two parts<br />
4.6.7.10 tp transpose a data field<br />
PAGE 4.6.7
4.6.7.1 addrec<br />
Purpose<br />
Merges two files record by record.<br />
Calling sequence<br />
Input file<br />
addrec infile1 infile2 outfile1<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output file whenever there is a missing value in the<br />
input files.<br />
Output files<br />
Output<br />
infile1 EXTRA-Format<br />
infile2 EXTRA-Format<br />
outfile1 EXTRA-Format<br />
control printout<br />
PAGE 4.6.7.1
4.6.7.2 chanoso<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Change the orientation of the two dimensional input field from north to south.<br />
Calling sequence<br />
f(1,i)=>f(nrow,i); f(2,i)=>f(nrow-1,i) i=1,ncol<br />
chanoso infile1 outfile1
4.6.7.3 circle<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Cyclic completion of a two dimensional data field. The first point in every row is set equal to the<br />
n+1 point in every row.<br />
Calling sequence<br />
circle infile1 outfile1
4.6.7.4 coarse<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Deletes every second row and column from a two dimensional field.<br />
Calling sequence<br />
coarse infile1 outfile1
4.6.7.5 complet<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program fills up missing dates in a file which contains daily data (with a header record and a<br />
data record with missing values) to obtain an output file with all intervening dates present.<br />
Calling sequence<br />
complet infile1 outfile1
4.6.7.6 edge<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Sets every value smaller or greater than a threshold value to the missing value (9.E99) or an user<br />
defined value.<br />
Calling sequence<br />
edge infile1 outfile1
4.6.7.7 ipwrva<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program fills in missing or wrong data. It interpolates thereby between time steps t+1 and t-1.<br />
f(x,t) = (f(x,t+1) + f(x,t-1)) / 2<br />
Calling sequence<br />
ipwrva infile1 outfile1
4.6.7.8 splirec<br />
Purpose<br />
Splits one file in two, record by record.<br />
Calling sequence<br />
Input file<br />
splirec infile1 outfile1 outfile2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces missing values in the output files when ever there is a missing value in the<br />
input files.<br />
Output files<br />
Output<br />
infile1 EXTRA-Format<br />
outfile1 EXTRA-Format<br />
outfile2 EXTRA-Format<br />
control printout<br />
PAGE 4.6.7.8
4.6.7.9 split<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Splits a data file into two parts after a threshold date.<br />
Calling sequence<br />
split infile1 outfile1 outfile2
4.6.7.10 tp<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Transposes all records of the input file. The first record in the output file contains the data of all<br />
first elements of the input file.<br />
Calling sequence<br />
Input file<br />
tp infile1 outfile1<br />
This program produces missing values in the output file when ever there is a missing value in the<br />
input file.<br />
Output files<br />
Output<br />
infile1 EXTRA-Format<br />
outfile1 EXTRA-Format<br />
control printout<br />
PAGE 4.6.7.10
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.8 Changes of input/output formats<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains several programs which change the binary EXTRA-Code to formatted output<br />
(ASCII) or vice versa from EXTRA-Format.<br />
4.6.8.1 dform create formatted output from EXTRA-Format<br />
4.6.8.2 forminv transforme formatted to EXTRA-Format<br />
PAGE 4.6.8
4.6.8.1 dform<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Transformation into formatted (ASCII) output.<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
dform infile1 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in the<br />
input file.<br />
infile1 EXTRA-Format<br />
outfile1 Formatted output<br />
WRITE (2,’(4I10)’) IDAT,IVAR,LEVEL,LEN<br />
WRITE (2,’(6(1X,E12.5)’) (DATA(I),I=1,LEN)<br />
control printout<br />
The header records contain the information from infile1.<br />
PAGE 4.6.8.1
4.6.8.2 forminv<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Transformation of formatted input into binary EXTRA-Format.<br />
Calling sequence<br />
Input files<br />
Output file<br />
Output<br />
forminv infile1 outfile1<br />
This program produces missing values in the output file whenever there is a missing value in the<br />
input file.<br />
infile1 Formatted input<br />
READ (2,’(4I10)’) IDAT,IVAR,LEVEL,LEN<br />
READ (2,’(6(1X,E12.5))’) (DATA(I),I=1,LEN)<br />
outfile1 EXTRA-Format<br />
The header records contain the information from infile1.<br />
control printout<br />
PAGE 4.6.8.2
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.9 File information programs<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains the description of the two EXTRA-Format file information programs<br />
4.6.9.1 ggstat produce a file statistic<br />
4.6.9.2 lookat short formated look at binary data<br />
PAGE 4.6.9
4.6.9.1 ggstat<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program produces some information about the header records and data sets.<br />
It produces a printout of the four header variables and computes the mean value and standard deviation<br />
of the following data record. The program counts the missing values.<br />
It produces a printout of one line for every data record .<br />
Calling sequence<br />
Input file<br />
Output file<br />
Output<br />
ggstat infile1<br />
infile1 EXTRA-Format<br />
none<br />
control printout<br />
PAGE 4.6.9.1
4.6.9.2 lookat<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This program enables the user to get a short look at a part of a binary EXTRA-Format data set<br />
Calling sequence<br />
lookat infile1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.10 Selection Programs<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This section contains a description of programs which select special records or parts of fields.<br />
4.6.10.1 selbox select a spatial box<br />
4.6.10.2 selmon select a month or seasons<br />
4.6.10.3 selvar select variable and level<br />
PAGE 4.6.10
4.6.10.1 selbox<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Selects a spatial box from a two dimensional field.<br />
This program creates a new field. The number of columns NCOLS is computed with<br />
NCOLS = LEN / NROWS:<br />
Calling sequence<br />
selbox infile1 outfile1
4.6.10.2 selmon<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Selects one or several conservative month of the input records. The program checks the month of<br />
IDATE in the technical record. If it lies within the specified interval the header and data records are<br />
written to the output file.<br />
Calling sequence<br />
selmon infile1 outfile1
4.6.10.3 selvar<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Selects all records of a specific variable and/or level.<br />
The program checks the header information for the desired variable and level. The selected records<br />
are written to the output file.<br />
Calling sequence<br />
selvar infile1 outfile1
4.6.11 Plot programs<br />
<strong>DKRZ</strong> EXTRA Format Module Documentation<br />
This section contains plot program descriptions. All plot programs use the NCAR 3.0 plot software.<br />
4.6.11.1 hovplot plot a hovmöller diagram<br />
4.6.11.2 ltsplot plot time series<br />
4.6.11.3 tsplot plot time series (max 2 per plot)<br />
4.6.11.4 zrplot plot pairs or single time series (max 20 per plot)<br />
PAGE 4.6.11
4.6.11.1 hovplot<br />
Purpose<br />
Plots a Hovmöller-Diagram.<br />
Calling sequence<br />
hovplot infile1 sunfile 0.0 contour interval between two isolines .<br />
= 0.0 The program computes between ten and twenty isolines at convenient values.<br />
< 0.0 abs(CSTEP) = number of isolines to be plotted.<br />
PTEXT Text for the plot heading (max. 60 characters)<br />
XTEXT Text for the time axis (x-axis) (max. 40 characters)<br />
YTEXT Text for the grid axis (y-axis) (max. 40 characters)<br />
infile1 EXTRA-Format<br />
(should contain one header and one data record)<br />
gksm11.txt gks-gral format<br />
The gksm11.txt is a temporary file on the $TMPDIR. For a permanent<br />
plot a copy in an other directory ($MFHOME/...) has to be made.<br />
One can send the file gksm11.txt to a plotter using the spl command<br />
spl -f $TMPDIR/gksm11.txt -d psm2<br />
sunfile is the filename of a copy of the gksm11.txt file on the SUN (regen or niesel).<br />
For the use of self defined SUN variables the file name has to be enclosed with<br />
apostrophes (‘$PLOTDIR/hovplot’).<br />
control printout<br />
PAGE 4.6.11.1
4.6.11.2 ltsplot<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Plots one or two time series per plot. A plotter with a suitable scale can produce large plots, e.g.:<br />
spl -f $TMPDIR/gksm11.txt -d versat -s 52.0<br />
produces a 50 x 150cm plot.<br />
Calling sequence<br />
ltsplot infile1 infile2 sunfile
4.6.11.3 tsplot<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Plots one or two time series per plot. The picture fills the whole page.<br />
Calling sequence<br />
tsplot infile1 infile2 sunfile
4.6.11.4 zrplot<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Plots a maximum of 20 time series in one plot. The program computes the maximum value for all<br />
time series and adds this value to every curve so that a plot with ten solid and ten dashed curves is<br />
produced (see example plot on page 2.4.11.15).<br />
If the input files contain less then 10 data series, the number of curves plotted is smaller.<br />
Calling sequence<br />
zrplot infile1 infile2 sunfile
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.6.12 Some more complex programs<br />
<strong>DKRZ</strong> EXTRA Format Module Documentation<br />
This section contains the description of the following programs:<br />
4.6.12.1 cancor execute canonical correlation analysis<br />
4.6.12.2 crospec cross-spectral analysis<br />
4.6.12.3 foufil band-pass filter<br />
4.6.12.4 mkeof compute eigenvalues, EOFs and principal components<br />
4.6.12.5 mkeofnor compute eigenvalues, normed EOFs and normed principal components<br />
4.6.12.6 vortici compute the vertical component of the vorticity<br />
PAGE 4.6.12
4.6.12.1 cancor<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
The program computes a canonical correlation analysis. It estimates the correlation coefficents<br />
(CCA), the canonical maps (FMAP, GMAP) and the canonical components (FCOM, GCOM) for<br />
the fields f and g. If it is necessary the program estimates the eigenvalues (EV), empirical orthogonal<br />
functions (EOF) and principal components (PC) of the anomaly fields f or g. This program<br />
computes the variance for every canonical mode and the local variance (loc.var.) for every gridpoint,<br />
mode and field.<br />
Calling sequence<br />
cancor inf1 inf2 inf3 inf4 outf1
Input files<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
inf1 Extra-Format actual anomalies<br />
inf2 Extra-Format actual anomalies<br />
inf3 Extra-Format. The file contains one data record with the eigenvalues and for<br />
each eigenvalue one record with the EOF and one record with the principal<br />
component of field f.<br />
inf4 Extra-Format. The file contains one data record with the eigenvalues and for<br />
each eigenvalue one record with the EOF and one record with the principal<br />
component of field g.<br />
inf3 or inf4 could be empty. If these files are empty the program will compute the EVs, EOFs and<br />
PCs.<br />
Output files<br />
You can distinguish the different data types by the variables of the header records.<br />
inf3 and inf4 contain the EVs, EOFs and PCs of field f respectively g<br />
outf1 contains the estimated CCAs, FMAPs, FCOMs, GMAPs, GCOMs and local<br />
variances for f and g.<br />
Special header records<br />
Output<br />
This program changes the first three variables in the header records to give a possibility to distinguish<br />
the data records:<br />
IDATE=-1, IVAR=503, ILEV=9999 6 EV<br />
IDATE=EOF-Nr., IVAR=503, ILEV=9999 6 EOF<br />
IDATE=EOF-Nr., IVAR=504, ILEV=9999 6 PC<br />
IDATE=-1, IVAR=520, ILEV=9999 6 CCA<br />
IDATE=CCA-Nr., IVAR=521, ILEV=9999 6 FMAP<br />
IDATE=CCA-Nr., IVAR=522, ILEV=9999 6 FCOM<br />
IDATE=CCA-Nr., IVAR=523, ILEV=9999 6 GMAP<br />
IDATE=CCA-Nr., IVAR=524, ILEV=9999 6 GCOM<br />
IDATE=CCA-Nr., IVAR=525, ILEV=9999 6 loc.Var. F<br />
IDATE=CCA-Nr., IVAR=526, ILEV=9999 6 loc.var. G<br />
control printout<br />
f˜ ( xt , ) = f( x, t)<br />
− f( x)<br />
g˜ ( xt , ) =<br />
g( x, t)<br />
− g( x)<br />
f˜ ( xt , )<br />
g˜ ( xt , )
4.6.12.2 crospec<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computation of a cross spectral analysis. The program produces a complete printout and, if<br />
desired, a plot of the variances, phase and squared coherence.<br />
Calling sequence<br />
crospec infile1 infile2 outfile1 plotfil
Input file<br />
infile1 Extra-Format.<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
This file contains the timeseries of field A. The file only contains the timeseries<br />
for which a cross spectral analysis is to be performed.<br />
infile2 Extra-Format.<br />
Output file<br />
This file contains the timeseries of field B. The file only contains the timeseries<br />
for which a cross spectral analysis is to be performed.<br />
Both files must have the same number of records and every data record contains<br />
one timeseries.<br />
outfile1 Extra-Format.<br />
For every cross-spectral analysis the output file contains respectively one<br />
data record for the frequencies, the variances of fields A and B, the phases and<br />
the squared coherences .<br />
plotfil gks-gral-format<br />
Special header records<br />
Output<br />
control printout<br />
name of the plotfile on a sun (REGEN). Default = $MFHOME/plot<br />
On the CRAY-2 the name of the local plot output file is $TMPDIR/gksm11.txt.<br />
This program changes the values of IVAR in the header records to make it<br />
possible to distinguish the output data records:<br />
IVAR Description<br />
530 frequencies<br />
531 variance of field A<br />
532 variance of field B<br />
533 phases<br />
534 squared coherence
4.6.12.3 foufil<br />
Purpose<br />
Performance of Fourier time filter.<br />
Calling sequence<br />
foufil infile1 outfile1
Input parameter<br />
Input file<br />
Output file<br />
Output<br />
X' ( r, t)<br />
=<br />
1<br />
⋅<br />
n<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PMIN Real Minimum filter period<br />
P2 Real Lower filter border period<br />
P1 Real Upper filter border period<br />
PMAX Real Maximum filter period<br />
The user may select the following special types of window;<br />
General Rectangular filter P1=PMAX, P2=PMIN<br />
High Pass filter; P2=PMIN=1 (default)<br />
Low Pass filter; P1=PMAX=2*<br />
Default values; P1=PMAX=2*<br />
P2=PMIN=2<br />
<strong>No</strong>te that in the user parameter line, the filter parameters have to be typed in the order PMIN, P2,<br />
P1, PMAX, separated by one or more spaces. A default value is inserted by the program if the<br />
value -1.0 is typed at the correspond-ing place. For instance, in the latter case when the program<br />
is given P1=PMAX=-1, it sets P1=PMAX=2* because this corresponds to<br />
the lowest frequency represented in the data. If all four parameters take their default values, then<br />
no filtering is performed.<br />
infile1 Extra-Format.<br />
Actual data fields. All data must be for the same level and variable.<br />
They may have gaps.<br />
outfile1 Extra-Format.<br />
control printout<br />
n<br />
∑<br />
t = 1<br />
G ( ν)<br />
⋅ X( r, ν)<br />
⋅e<br />
Filtered data fields<br />
( i⋅ 2π⋅ν ⋅t)
4.6.12.4 mkeof<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Estimation of the eigenvalues (EV), empirical orthogonal func tions (EOF,eigenvectors) and principal<br />
components (PC) of an anomaly field.<br />
Calling sequence<br />
mkeof infile1 outfile1
Output file<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
outfile1 Extra-Format. The file contains one data record with the eigenvalues and for<br />
each eigenvalue one record with the EOF and one record with the principal<br />
component.<br />
You can distinguish the different data types by variables of the header records.<br />
Special header records<br />
This program changes the first three variables in the header records to give a possibility to<br />
distinguish the data records:<br />
Memory and CPU-time<br />
Output<br />
<strong>No</strong>te<br />
IDATE=-1, IVAR=503, ILEV=9999 6 EV<br />
IDATE=EOF-Nr., IVAR=503, ILEV=9999 6 EOF<br />
IDATE=EOF-Nr., IVAR=504, ILEV=9999 6 PC<br />
The memory depends on the size of the anomalies and of the covariance matrix. A field size of<br />
5000 * 888 and the associated covariance matrix with a size of 888 * 888 needs less then 4 MW<br />
memory. The size of the covariance matrix is important.<br />
The CPU-time depends on the size of the covariance matrix and of the value of NUMEOF.<br />
control printout<br />
size of covariance matrix CPU-time<br />
72 x 72 54 seconds<br />
444 x 444 1548 seconds<br />
888 x 888 6174 seconds<br />
The standard deviation of the PC’s is the squared eigenvalue. The standard deviation of the sum<br />
of all EOF’s is 1.
4.6.12.5 mkeofnor<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Estimation of the eigenvalues (EV), the normed empirical orthogonal functions (EOF, eigenvectors)<br />
and the normed principal components (PC) of an anomaly field.<br />
Calling sequence<br />
<strong>No</strong>te<br />
mkeofnor infile1 outfile1
4.6.12.6 vortici<br />
Purpose<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Computation of the vertical component of the vorticity.<br />
Calling sequence<br />
vortici infile1 infile2 outfile1 0 Orientation from north to south<br />
DLAT < 0 Orientation from south to north<br />
DLON Longitudinal distance between two data points in degrees<br />
FIRLAT First latitude of the field<br />
FIRLAT > 0 Denotes a point on the northern hemisphere<br />
FIRLAT < 0 Denotes a point on the southern hemisphere<br />
NROWS Number of rows in the two-dimensional field<br />
infile1 EXTRA Format<br />
This file contains the timeseries of the u-velocity component<br />
infile2 EXTRA Format<br />
This file contains the timeseries of the v-velocity component<br />
outfile1 EXTRA Format<br />
This file contains the timeseries of the vertical vorticity component<br />
control printout<br />
PAGE 4.6.12.6
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation
4.7 EXAMPLE OF USE<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
In this section four examples of batch jobs (a-c) or interactive commands (d) which use the EXTRA Format<br />
programs are given.<br />
a) This example job performs a canonical correlation. The input data are two files which contain daily<br />
observations of the surface temperature and pressure respectively. This job computes the anomalies for<br />
both files and performs the canonical correlation. The EOFs were computed and afterwards the first 2<br />
canonical components selected and plotted. The plot files were made permanent (copy) and a plot command<br />
was send to one of the plotters (spl gksm11.txt -d plot-device name).<br />
# QSUB -eo # connect standard error with standard out<br />
# QSUB -x # export all environment Variables<br />
# QSUB -lT 600 # CPU time limit in Seconds<br />
# QSUB -lM 4MW # memory limit in mega-words<br />
# QSUB -r cancor # Job name<br />
# QSUB -o /mf/m/m211073/raus/cancor # Job output on file ......<br />
#<br />
# H. BORGERT June 1991 at the MPIfM<br />
#<br />
# Batch Job on the CRAY-2S to perform a canonical correlation<br />
#<br />
# This job prepares the data from the files $MFHOME/data/dayt3086.XTR<br />
# $MFHOME/data/dayp3086.XTR for a canonical correlation, perform it and<br />
# produces time series plots of the first three canonical components.<br />
#<br />
# change the working directory to $TMPDIR<br />
cd $TMPDIR<br />
#<br />
# define a variable with the path to the data files<br />
DIR=/$MFHOME/data<br />
#<br />
# start the programs for EXTRA-Format<br />
#------------------------------------------------------------<br />
#<br />
# Calculate the long time mean and the anomalies<br />
# for the temperature (dayt3086.XTR) and save the anomalies on<br />
# the file dayte3086.ANO.<br />
#<br />
lmean $DIR/dayte3086.XTR temp3086.LM
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
anomal $DIR/daypr3086.XTR pres3086.LM $DIR/daypr3086.ANO<br />
#<br />
# perform the canonical correlation<br />
#<br />
cancor $DIR/dayte3086.ANO $DIR/daypr3086.ANO te.EOF pr.EOF \<br />
$DIR/tepr3086.CCA
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
b) This example job computes from daily temperature observations between 1950 and 1960 a monthly<br />
global mean (area weighted) and a monthly zonal mean. For the global means a chronological time series<br />
plot is produced, while the zonal means are represented in a Hovmöller-diagram.<br />
# QSUB -eo # connect standard error with standard out<br />
# QSUB -x # export all environment Variables<br />
# QSUB -lT 60 # CPU time limit in Seconds<br />
# QSUB -lM 4MW # memory limit in mega-words<br />
# QSUB -r gloavg # Job name<br />
# QSUB -o /mf/m/m211073/raus/gloavg # Job output on file ......<br />
#<br />
# H. BORGERT June 1991 at the MPIfM<br />
#<br />
# Batch Job on the CRAY-2S to perform a monthly global mean and monthly<br />
# zonal mean.<br />
#<br />
# This job prepares the data from the file $MFHOME/data/temp5.XTR<br />
# computes a global and zonal mean. The results were plotted in a<br />
# time series and Hovmueller diagram.<br />
#<br />
# change the working directory to $TMPDIR<br />
cd $TMPDIR<br />
#<br />
# define a variable with the path to the data files<br />
DIR=/$MFHOME/data<br />
#<br />
# start the programs for EXTRA-Format<br />
#------------------------------------------------------------<br />
#<br />
# Calculate the monthly mean for the file temp5.XTR.<br />
#<br />
momean $DIR/temp5.XTR $DIR/temp5.MOM<br />
#<br />
# estimate the global mean for every month<br />
#<br />
weigavg $DIR/temp5.MOM temp5.WEI
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
#<br />
# send the plot file to one of the plotters<br />
#<br />
spl -f $TMPDIR/gksm11.txt -d psm2<br />
#<br />
# copy the plot file to a permanent catalog<br />
#<br />
cp $TMPDIR/gksm11.txt $MFHOME/plot/temp5.glm<br />
#<br />
# compute the zonal mean for every month<br />
#<br />
zonmean $DIR/temp5.MOM $DIR/temp5.ZON
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
c) This example job selects the temperature and geopotential height out of a file containing several variables<br />
at different levels. The first and last three years are deleted, the files are transposed to get on every<br />
data record one time series. Afterwards the cross spectral analysis is calculated.<br />
# QSUB -eo # connect standard error with standard out<br />
# QSUB -x # export all environment Variables<br />
# QSUB -lT 600 # CPU time limit in Seconds<br />
# QSUB -lM 4MW # memory limit in mega-words<br />
# QSUB -r cancor # Job name<br />
# QSUB -o /mf/m/m211073/raus/cancor # Job output on file ......<br />
#<br />
# H. BORGERT June 1991 at the MPIfM<br />
#<br />
# Batch Job on the CRAY-2S or YMP to perform a cross spectral analysis<br />
#<br />
# This job selects the data from the file $MFHOME/data/Expe73015.XTR,<br />
# cuts of the first and last three years and perform a cross spectral<br />
# analyses<br />
#<br />
# change the working directory to $TMPDIR<br />
cd $TMPDIR<br />
#<br />
# define a variable with the path to the data files<br />
DIR=/$MFHOME/data<br />
#<br />
# start the programs for EXTRA-Format<br />
#----------------------------------------------------------<br />
#<br />
# Select the temperature in 500 hPa<br />
#<br />
selvar $DIR/Expe73015.XTR temp500.XTR
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
#<br />
tp $DIR/temp500.XTR $DIR/temp500.TP<br />
tp $DIR/geoh500.XTR $DIR/geoh500.TP<br />
#<br />
# perform the cross spectral analysis<br />
#<br />
crospec $DIR/temp500.TP $DIR/geoh500.TP
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
d) Interactive job: A file called SST contains COADS SST monthly data from 1960 January to 1969<br />
December. These data represent SST in a sequence of 2-degree boxes. The first box represents the <strong>No</strong>rth<br />
Pole. The next 180 boxes represent the zone 88o-90o N starting 0o-2o E, the next 180 boxes represent 86o- 88o N, and so on, with the last value representing the South Pole. You wish to average the data over 4 x<br />
10 degree boxes starting 84o-88o N, 0o-10o E. The header records have the form<br />
IDAT 11 -200 16202<br />
where IDAT runs from 600100 to 691200. First, one must strip off the <strong>No</strong>rth Pole and South Pole:<br />
with the parameters<br />
SELBOX SST1 TEMP1<br />
1 2 16201 1 1<br />
Then, one must strip off the northernmost and southernmost zones:<br />
with the parameters<br />
SELBOX TEMP1 TEMP2<br />
90 2 89 1 180<br />
Finally, the averaging is performed:<br />
with the parameters<br />
BOXAVG TEMP2 SST2<br />
180 2 5<br />
PAGE 4.7.7
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
PAGE 4.7.8
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Appendix A Available experiment-data at the <strong>DKRZ</strong><br />
Experiment-data created at the <strong>DKRZ</strong>/MPI is stored on cartridges (IBM 3480). The data can be copied<br />
can be extracted to the disk-system of the CRAY-2S or the CRAY-YMP using the module EXTRACT.<br />
The usage of EXTRACT is described in section 3.4.1 .<br />
The experiment-data at the <strong>DKRZ</strong> is divided into four mayor groups:<br />
1. Raw data<br />
2. Selected codes<br />
3. Monthly mean data<br />
4. Data on cartridges which are removed from the cartridge-silo<br />
Additionally several observed quantities are stored on cartridges. Please refer to<br />
<strong>DKRZ</strong> <strong>Technical</strong> <strong>Report</strong> <strong>No</strong>. 1, Inventory of Available Observed Data Sets<br />
by Ingo Jessel or to the online manual residing at<br />
/pf/m/m211053/pub/iaods/extra/coads.txt<br />
on the file servers regen and neptun.<br />
Experiment Name<br />
(required for use of<br />
EXTRACT)<br />
CONTROL_1<br />
CONTROL_2<br />
CTRL42_2<br />
ECHAM3_CTRL<br />
ECHAM3_OCEA<br />
ECHAM3_T21_CTRL<br />
ECHAM3_AMIP_SST<br />
ECHAM3_T21_AMIP_SST<br />
GULF_CTRL_1<br />
GULF_SOOT_HIGH_1<br />
GULF_SCENARIO_B_1<br />
GULF_SCENARIO_C_1<br />
GULF_SCENARIO_G_1<br />
GAGO_2<br />
MOGA_2<br />
TOGA_2<br />
Table 7 Available Experiments now (20/05/92)<br />
(Sheet 1 of 2)<br />
Mnemonic Labels<br />
on tape<br />
T21CTRL12_YYMM<br />
01090CTRL_YYMM<br />
02091CTRL_YYMM<br />
22032AMIP_YYMM<br />
22058OCEA_YYMM<br />
22059AMIP_YYMM<br />
22062LLNL_YYMM<br />
22064ASST_YYMM<br />
01120CTRL_YYMM<br />
07020GOLF_YYMM<br />
GBKOPETR__YYMM<br />
GCKOPETR__YYMM<br />
GGKOPETR__YYMM<br />
09021GAGO_YYMM<br />
06202MOGA_YYMM<br />
06201TOGA_YYMM<br />
A.1<br />
Created by Dates<br />
U.Schlese 0101 - 2312<br />
0101 - 2312<br />
0101 - 1005+<br />
M.Esch 0205 - 3012<br />
0101 - 1012<br />
0101 - 1012<br />
0101 - 2012<br />
0101 - 2012<br />
U.Schlese 0101 - 0203<br />
0101 - 0203<br />
0901 - 1006<br />
0901 - 1006<br />
0901 - 1006<br />
M.Ponater 0301 - 2112<br />
0301 - 2112<br />
0301 - 2112<br />
ECHAM<br />
Version<br />
1<br />
2<br />
2<br />
3<br />
3<br />
3<br />
3<br />
3<br />
1<br />
1<br />
1<br />
1<br />
1<br />
2<br />
2<br />
2
Experiment Name<br />
(required for use of<br />
EXTRACT)<br />
PERM_JUL_1<br />
PERM_JAN_1<br />
056LLS<br />
VULK1<br />
VULK2<br />
PERM_JUL_2<br />
JUN88_MEAN_SST<br />
JUN88_MEAN_SST_NEW<br />
JUN88_ENV_SST<br />
PERM_JAN_2<br />
PERM_JULZ0_2<br />
DIUR_SST_VAR_JUL_2<br />
JUN88_MOD_SST<br />
PERMJUN_2<br />
JUN88_LOW_SST<br />
JUN88_SPAC_SST<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
T21CTRLPJUL_YYMM<br />
56006PJA_YYMM<br />
56005LLS_YYMM<br />
VULK1___YYMM<br />
VULK2___YYMM<br />
56010PJU2_YYMM<br />
56014TSMN_YYMM<br />
56023MNNW_YYMM<br />
56015TSEN_YYMM<br />
56016PJA2_YYMM<br />
56017LMS2_YYMM<br />
56018DSST_YYMM<br />
56019TSHI_YYMM<br />
56020PJUN_YYMM<br />
56021TSLO_YYMM<br />
56022TSSH_YYMM<br />
A.2<br />
D.Schriever 0107 - 0306<br />
0103 - 0302<br />
0111 - 0306<br />
0704 - 1106<br />
0704 - 1106<br />
0107 - 0308<br />
0107 - 0306<br />
0107 - 0306<br />
0107 - 0306<br />
0101 - 0302<br />
0201 - 0206<br />
0107 - 0308<br />
0107 - 0308<br />
0101 - 0308<br />
0107 - 0312<br />
0107 - 0306<br />
POLYNYA 78001POL_YYMM R.Glovienka 0107 - 0308 1<br />
WAM_JUL_2_ATM<br />
WAM_JUL_2_WAVE<br />
WAM_JAN_2_ATM<br />
WAM_JAN_2_WAVE<br />
44001T21WAVE__YYMM<br />
44001WAVES__YYMM<br />
44001T21JAN___YYMM<br />
44001WAMJAN___YYMM<br />
N.Weber 0107 - 0207<br />
0107 - 0207<br />
0101 - 0201<br />
0101 - 0201<br />
PAL_RAD_115KYR_2 26001PAL1_YYMM H.Graf 0101 - 0512 2<br />
ICE_AGE_ATMOS_FIRST 60001LGM2_YYMM M.Lautenschlager 0101 - 1512 2<br />
ICE_BRIDGE<br />
ICE_AGE_JULY<br />
ICE_15000_JULY<br />
ICE_13000_JULY<br />
LSG_CTRL_FLUX_CORR<br />
LSG_SCENARIO_A<br />
LSG_SCENARIO_D<br />
LSG_DOUBLE_CO2<br />
LSG_MONTE_CARLO_38<br />
LSG_MONTE_CARLO_68<br />
LSG_MONTE_CARLO_98<br />
PYC_CTRL_FLUX_CORR<br />
PYC_SCENARIO_A<br />
PYC_DOUBLE_CO2<br />
PYC_SCENARIO_D<br />
Table 7 Available Experiments now (20/05/92)<br />
(Sheet 2 of 2)<br />
Mnemonic Labels<br />
on tape<br />
73001EISB_YYMM<br />
73002JU18_YYMM<br />
73003JU15_YYMM<br />
73004JU13_YYMM<br />
XXKOPE17__YYMM<br />
CAKOPE17__YYMM<br />
CDKOPE17__YYMM<br />
YYKOPE17__YYMM<br />
AHKOPE38__YYMM<br />
AHKOPE68__YYMM<br />
BHKOPE98__YYMM<br />
05007ATM__YYMM<br />
05009ATM__YYMM<br />
05010ATM__YYMM<br />
05011ATM__YYMM<br />
Created by Dates<br />
H.Borgert 0107 - 0312<br />
0107 - 0312<br />
0107 - 0312<br />
0107 - 0312<br />
U.Cubasch 0401 -10812<br />
0901 -10812<br />
0901 -10812<br />
0901 -10812<br />
3901 - 8812<br />
6901 -11812<br />
9901 -14812<br />
F.Lunkeit 1001 -12912<br />
3001 -12912<br />
3001 -12912<br />
3001 -12912<br />
ECHAM<br />
Version<br />
1<br />
1<br />
1<br />
1<br />
1<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
2<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1
Experiment Mnemonic<br />
PYC_CTRL_FLUX_CORR_EXTR<br />
PYC_SCENARIO_A_EXTR<br />
PYC_DOUBLE_CO2_EXTR<br />
PYC_SCENARIO_D_EXTR<br />
CONTROL_2_EXTR<br />
GAGO_2_EXTR<br />
Experiment Mnemonic<br />
LSG_CTRL_FLUX_CORR_MEAN<br />
LSG_SCENARIO_A_MEAN<br />
LSG_SCENARIO_D_MEAN<br />
LSG_DOUBLE_CO2_MEAN<br />
LSG_MONTE_CARLO_38_MEAN<br />
LSG_MONTE_CARLO_68_MEAN<br />
LSG_MONTE_CARLO_98_MEAN<br />
PYC_CTRL_FLUX_CORR_MEAN<br />
PYC_SCENARIO_A_MEAN<br />
PYC_DOUBLE_CO2_MEAN<br />
PYC_SCENARIO_D_MEAN<br />
Experiment Mnemonic<br />
PERM_JAN_1<br />
DRY_SPAIN_JAN_1<br />
PERM_APR_1<br />
AERED1_JUL_2<br />
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
Table 8 Data with some important codes only<br />
Mnemonic Labels<br />
on tape<br />
05007EXTR_YYMM<br />
05009EXTR_YYMM<br />
05010EXTR_YYMM<br />
05011EXTR_YYMM<br />
01090EXTR_YYMM<br />
09021EXTR_YYMM<br />
A.3<br />
Created by Dates<br />
M.Ponater<br />
“<br />
“<br />
“<br />
“<br />
“<br />
Table 9 Monthly mean data<br />
Mnemonic Labels<br />
on tape<br />
CTRLMONMEA.YY00<br />
SZAAMONMEA.YY00<br />
SZDDMONMEA.YY00<br />
CO22MONMEA.YY00<br />
MC38MONMEA.YY00<br />
MC68MONMEA.YY00<br />
MC98MONMEA.YY00<br />
05007G_YY00<br />
05009G_YY00<br />
05010G_YY00<br />
05011G_YY00<br />
3001 -12912<br />
3001 - 9912+<br />
0000 - 0000+<br />
3001 - 9912+<br />
0401 - 2312<br />
0301 - 2112<br />
Created by Dates<br />
U.Cubasch 0400 -10800<br />
0900 -10800<br />
0900 -10800<br />
0900 -10800<br />
3900 - 8800<br />
6900 -11800<br />
9900 -14800<br />
F.Lunkeit 1000 -12900<br />
3000 -12900<br />
3000 -12900<br />
3000 -12900<br />
Table 10 Data on cartridges removed from the storage system<br />
Mnemonic Labels<br />
on tape<br />
56006PJA_YYMM<br />
56007DSP_YYMM<br />
56008PAP_YYMM<br />
56011SRR1_YYMM<br />
Created by Dates<br />
D.Schriever 0103 - 0302<br />
0103 - 0504<br />
0104 - 0303<br />
0107 - 0302<br />
ECHAM<br />
Version<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
ECHAM<br />
Version<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
ECHAM<br />
Version<br />
GAGO_1 03002GAGO_YYMM E.Kirk 0301 - 2112 1<br />
XXKOPE12<br />
XYKOPE12<br />
XXKOPE12__YYMM<br />
XYKOPE12__YYMM<br />
U.Cubasch 0401 - 2812<br />
0401 - 2906<br />
STERLKOPF 31008KOPF_YYMM A.Sterl 0101 - 2012 2<br />
1<br />
1<br />
1<br />
2<br />
1<br />
1
<strong>DKRZ</strong> GRIB/EXTRA Format Module Documentation<br />
A.4