Commit 56598d66 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

Merge branch 'develop' of git.mpimet.mpg.de:cdo into develop

parents 21065eea 49ad33da
......@@ -33,43 +33,48 @@ case "${HOSTNAME}" in
bailung*|d133*|d134*)
CDOLIBS="--enable-nearpt3 \
--with-fftw3 \
--with-grib_api=$HOME/local/grib_api-1.14.7aec \
--with-netcdf=$HOME/local/netcdf-c-4.3.3.1-threadsafe \
--with-hdf5=$HOME/local/hdf5-1.8.15-threadsafe \
--with-eccodes=$HOME/local/eccodes-2.3.0 \
--with-netcdf=$HOME/local/netcdf-4.4.1.1 \
--with-hdf5=$HOME/local/hdf5-1.8.19-threadsafe \
--with-udunits2=/opt/local \
--with-curl=/opt/local \
--with-libxml2=/usr \
--with-magics=$HOME/local/Magics-2.25.3 \
--with-proj=/opt/local \
--with-szlib=$HOME/local/libaec-0.3.2"
--with-szlib=$HOME/local"
# --with-magics=$HOME/local/Magics-2.25.3 \
if test "$COMP" = intel ; then
${CONFPATH}configure \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib -Wl,-rpath,/opt/intel/lib" \
CXX=icpc CXXFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" \
CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
elif test "$COMP" = clang ; then
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
CXX=clang++ CXXFLAGS="-g -Wall -O3" \
CC=clang CFLAGS="-g -Wall -O3"
elif test "$COMP" = gnu4.9 ; then
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
CXX=g++-mp-4.9 CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
CC=gcc-mp-4.9 CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
elif test "$COMP" = gnu5 ; then
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
CXX=g++-mp-5 CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
CC=gcc-mp-5 CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
elif test "$COMP" = gnu ; then
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
CXX=g++ CXXFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native" \
CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
# --with-libxml2=/usr
......
......@@ -22395,7 +22395,7 @@ ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Se
 
ac_config_files="$ac_config_files test/Gridboxstat.test test/Vertstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test"
 
ac_config_files="$ac_config_files test/Merstat.test test/Zonstat.test"
ac_config_files="$ac_config_files test/Merstat.test test/Zonstat.test test/Mergetime.test"
 
ac_config_files="$ac_config_files test/Afterburner.test test/Detrend.test test/Arithc.test test/Arith.test test/Expr.test"
 
......@@ -23585,6 +23585,7 @@ do
"test/Enspctl.test") CONFIG_FILES="$CONFIG_FILES test/Enspctl.test" ;;
"test/Merstat.test") CONFIG_FILES="$CONFIG_FILES test/Merstat.test" ;;
"test/Zonstat.test") CONFIG_FILES="$CONFIG_FILES test/Zonstat.test" ;;
"test/Mergetime.test") CONFIG_FILES="$CONFIG_FILES test/Mergetime.test" ;;
"test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;;
"test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
"test/Arithc.test") CONFIG_FILES="$CONFIG_FILES test/Arithc.test" ;;
......@@ -25118,6 +25119,7 @@ _LT_EOF
"test/Enspctl.test":F) chmod a+x "$ac_file" ;;
"test/Merstat.test":F) chmod a+x "$ac_file" ;;
"test/Zonstat.test":F) chmod a+x "$ac_file" ;;
"test/Mergetime.test":F) chmod a+x "$ac_file" ;;
"test/Afterburner.test":F) chmod a+x "$ac_file" ;;
"test/Detrend.test":F) chmod a+x "$ac_file" ;;
"test/Arithc.test":F) chmod a+x "$ac_file" ;;
......
......@@ -264,7 +264,7 @@ AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Rema
AC_CONFIG_FILES([test/EOF.test test/Select.test test/Spectral.test test/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Timstat.test test/Timselstat.test test/Seasstat.test test/Runstat.test test/Multiyearstat.test test/Ydrunstat.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gridboxstat.test test/Vertstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Merstat.test test/Zonstat.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Merstat.test test/Zonstat.test test/Mergetime.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Afterburner.test test/Detrend.test test/Arithc.test test/Arith.test test/Expr.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gradsdes.test test/Collgrid.test test/threads.test test/tsformat.test test/wildcard.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/MapReduce.test test/Ninfo.test],[chmod a+x "$ac_file"])
......
......@@ -222,6 +222,8 @@ keepaspectratio]{cdo_libdep.pdf}}%
\input{cdo_ref}
\input{contributors.tex}
\input{bib}
\input{appendix}
......
Contributors
\chapter{Contributors}
* History
\section{History}
CDO was originally developed by Uwe Schulzweida at the Max Planck Institute for Meteorology (MPI-M).
{\CDO} was originally developed by Uwe Schulzweida at the Max Planck Institute for Meteorology (MPI-M).
The MPI-M, together with the DKRZ, has a long history in the development of tools for processing climate data.
CDO was inspired by some of these tools, such as the PINGO package and the GRIB-Modules.
PINGO was developed by Jürgen Waszkewitz, Peter Lenzen, and Nathan Gillet in 1995 at the DKRZ, Hamburg (Germany).
CDO has a similar user interface and uses some of PINGO routines.
The GRIB-Modules was developed by
{\CDO} was inspired by some of these tools, such as the PINGO package and the GRIB-Modules.
* External sources
PINGO\footnote{Procedural INterface for GRIB formatted Objects} was developed by J\"urgen Waszkewitz,
Peter Lenzen, and Nathan Gillet in 1995 at the DKRZ, Hamburg (Germany).
{\CDO} has a similar user interface and uses some of the PINGO routines.
CDO has incorporated code from several sources:
The GRIB-Modules was developed by Heiko Borgert and Wolfgang Welke in 1991 at the MPI-M.
{\CDO} is using a similar module structure and also some of the routines.
afterburner is a postprocessing program for ECHAM data and ECMWF analysis data,
\section{External sources}
{\CDO} has incorporated code from several sources:
\begin{description}
\item[afterburner] is a postprocessing program for ECHAM data and ECMWF analysis data,
originally developed by Edilbert Kirk, Michael Ponater and Arno Hellbach.
The afterburner code was modified for the CDO opertors after, sp2gp, gp2sp.
The afterburner code was modified for the {\CDO} opertors {\htmlref{after}{after}}, {\htmlref{sp2gp}{sp2gp}}, {\htmlref{gp2sp}{gp2sp}}.
SCRIP is a software package used to generate interpolation weights for remapping
fields from one grid to another in spherical geometry.
\item[SCRIP] is a software package used to generate interpolation weights for remapping
fields from one grid to another in spherical geometry \cite{SCRIP}.
It was developed at the Los Alamos National Laboratory by Philip W. Jones.
The SCRIP library was converted from Fortran to ANSI C and is used a
the base for the remapping operators in CDO.
YAC (Yet Another Coupler) was jointly developed by DKRZ and MPI-M by Moritz Hanke and Rene Redler.
CDO is using the clipping routines for the conservative remapping with remapycon.
The SCRIP library was converted from Fortran to ANSI C and is used as
the base for the remapping operators in {\CDO}.
CDO uses tools from the GNU project, including automake, and libtool.
\item[YAC] (Yet Another Coupler) was jointly developed by DKRZ and MPI-M by Moritz Hanke and Rene Redler \cite{YAC}.
{\CDO} is using the clipping routines for the conservative remapping with remapycon.
* Contributors
\item[libkdtree] a C99 implementation of the kd-tree algorithm developed by J\"org Dietrich.
\end{description}
Users have contributed patches and suggestions over time.
The primary contributors to the CDO development have been:
{\CDO} uses tools from the GNU project, including automake, and libtool.
Uwe Schulweida
\section{Contributors}
Concept, design and implementation of CDO, project coordination, and releases.
The primary contributors to the {\CDO} development have been:
Luis Kornblueh
supported CDO from the beginning. His main contributions is performance optimization.
\begin{description}
\item[Uwe Schulweida]: Concept, design and implementation of {\CDO}, project coordination, and releases.
Ralf Müller
% Luis Kornblueh GME, dv2uvl uv2dvl dv2ps gauaw
% supported {\CDO} from the beginning. His main contributions is performance optimization.
Webpage <------------------
Implemented operators: showunit, stdatm, intlevel3d, consecsum, consects
Modified operators: eca_gsl
% \item[Ralf M\"uller]: Webpage, ruby and python interface <------------------
% Implemented operators: showunit, stdatm, intlevel3d, consecsum, consects
% Modified operators: eca\_gsl
Cedrick Ansorge
\item[Cedrick Ansorge]: He worked on the {\CDO} software package as a student assistant at MPI-M from 2007-2011.
Implemented operators: {\htmlref{eof}{eof}}, {\htmlref{eof3d}{eof3d}}, {\htmlref{enscrps}{enscrps}}, {\htmlref{ensbrs}{ensbrs}},
{\htmlref{maskregion}{maskregion}}, {\htmlref{bandpass}{bandpass}}, {\htmlref{lowpass}{lowpass}}, {\htmlref{highpass}{highpass}}, {\htmlref{smooth9}{smooth9}}
He worked on the CDO software package as a student assistant at MPI-M from 2007-2011.
Implemented operators: eof, eof3d, enscrps, ensbrs, maskregion, bandpass, lowpass, highpass, smooth9
\item[Oliver Heidmann]: He worked on the {\CDO} software package as a student assistant at MPI-M from 2015-2017.
Ralf Quast
\item[Fabian Wachsmann]: He is working on {\CDO} for the CMIP6 project and is responsible for the operator cmor.
He worked on CDO on behalf of the Service Gruppe Anpassung (SGA), DKRZ in 2006.
Implemented operators: all ECA Indices of Daily Temperature and
Precipitation Extremes, all percentile operators, module Ydrun<STAT>,
wct, hi
\item[Ralf Quast]: He worked on {\CDO} on behalf of the Service Gruppe Anpassung (SGA), DKRZ in 2006.
Implemented all ECA Indices of Daily Temperature and Precipitation Extremes,
all percentile operators, module {\htmlref{YDRUNSTAT}{YDRUNSTAT}} and {\htmlref{wct}{wct}}.
% timcount, hourcount, daycount, moncount, yearcount, seascount
Karl-Hermann Wieners
Implemented operators: aexpr, aexprf, selzaxisname
Frank Kaspar
\item[Kameswarrao Modali]: Implemented operators: contour, shaded, grfill, vector, graph.
Contributed to operator: import_cmsaf
\item[Michal Koutek]: Implemented operators: {\htmlref{selmulti}{selmulti}}
{\htmlref{delmulti}{delmulti}}, {\htmlref{changemulti}{changemulti}}, {\htmlref{samplegrid}{samplegrid}},
{\htmlref{uvDestag}{uvDestag}}, {\htmlref{rotuvNorth}{rotuvNorth}}, {\htmlref{projuvLatLon}{projuvLatLon}}.
Etienne Tourigny
\item[Etienne Tourigny]: Implemented operators: {\htmlref{setclonlatbox}{setclonlatbox}}, {\htmlref{setcindexbox}{setcindexbox}},
{\htmlref{setvals}{setvals}}, {\htmlref{splitsel}{splitsel}}, {\htmlref{histfreq}{histfreq}}, {\htmlref{setrtoc}{setrtoc}}, {\htmlref{setrtoc2}{setrtoc2}}.
Implemented operators: setclonlatbox, setcindexbox, setvals, splitsel, histfreq, setrtoc, setrtoc2
\item[Karl-Hermann Wieners]: Implemented operators: {\htmlref{aexpr}{aexpr}}, {\htmlref{aexprf}{aexprf}}, {\htmlref{selzaxisname}{selzaxisname}}.
\end{description}
Helmut Haak
% Frank Kaspar: Contributed to operator: import\_cmsaf
Contributed to operator: adisit
% Helmut Haak: Contributed to operator: adisit, adipot
Martin Claus
% Martin Claus: Modified operator: vertwind (added missing value support)
Modified operator: vertwind (added missing value support)
% Álvaro M. Valdebenito: Modified operators: settunits, settaxis and shifttime (added support for "seconds")
Álvaro M. Valdebenito
% Mathis Rosenhauer: Implemented operators: cmor (initial version)
Modified operators: settunits, settaxis and shifttime (added support for "seconds")
%Reinhard Budich
Modali Kameswarrao
Many users have contributed to {\CDO} by sending bug reports, patches
and suggestions over time.
Very helpful is also the active participation in the user forum of some users.
Here is an incomplete list:
Mathis Rosenhauer
Implemented operators: cmor (initial version)
Reinhard Budich
Please let me know if your name was omitted!
CDO would not be what it is today without the invaluable help of these people, who contributed by donating code, bug fixes and documentation:
Helmut Haak,
Jaison-Thomas Ambadan,
Harald Anlauf,
Andy Aschwanden,
Stefan Bauer,
Renate Brokopf,
Traute,
Michael Boettinger,
Simon Blessing,
Tim Br\"ucher,
Martin Claus,
Traute Cr\"uger,
Irene Fischer-Bruns,
Chris Fletscher,
Helmut Frank,
Kristina Fr\"ohlich,
Oliver Fuhrer,
Monika Esch,
Pier Giuseppe Fogli,
Beate Gayer,
Veronika Gayler,
Marco Giorgetta,
David Gobbett,
Holger Goettel,
Helmut Haak,
Stefan Hagemann,
Angelika Heil,
Barbara Hennemuth,
Daniel Hernandez,
Nathanael Huebbe,
Thomas Jahns,
Frank Kaspar,
Daniel Klocke,
Edi Kirk,
Yvonne K\"ustermann,
Stefanie Legutke,
Leonidas Linardakis,
Stephan Lorenz,
Frank Lunkeit,
Karin Meier-Fleischer,
Uwe Mikolajewicz,
Laura Niederdrenk,
Dirk Notz,
Hans-J\"urgen Panitz,
Ronny Petrik,
Swantje Preuschmann,
Florian Prill,
Daniel Reinert
Jaison-Thomas Ambadan
I have probably omitted some important names here because of incomplete record keeping. If I have overlooked you, please let me know and I will update the list. Many more, too numerous to mention here, have contributed by sending bug reports and suggesting various improvements.
Asela Rajapakse,
Daniel Reinert,
Hannes Reuter,
Mathis Rosenhauer,
Reiner Schnur,
Martin Schultz,
Dennis Shea,
Kevin Sieck,
Martin Stendel,
Bjorn Stevens,
Martina Stockhaus,
Claas Teichmann,
J\"org Trentmann,
\'Alvaro M. Valdebenito
Geert Jan van Oldenborgh,
Jin-Song von Storch
David Wang,
Joerg Wegner,
Heiner Widmann,
Claudia Wunram,
Klaus Wyser
Acknowledgments
* Procedural INterface for GRIB formatted Objects
Please let me know if your name was omitted!
......@@ -214,7 +214,6 @@ void write_remap_scrip(const char *interp_file, int map_type, int submap_type, i
void read_remap_scrip(const char *interp_file, int gridID1, int gridID2, int *map_type, int *submap_type, int *num_neighbors,
int *remap_order, remapgrid_t *src_grid, remapgrid_t *tgt_grid, remapvars_t *rv);
void calc_bin_addr(long gridsize, long nbins, const restr_t* restrict bin_lats, const restr_t* restrict cell_bound_box, int* restrict bin_addr);
void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type);
long get_srch_cells(long tgt_cell_add, long nbins, int *bin_addr1, int *bin_addr2,
restr_t *tgt_cell_bound_box, restr_t *src_cell_bound_box, long src_grid_size, int *srch_add);
......
#include "cdo_int.h"
#include "grid.h"
#include "remap.h"
/*
#if defined(_OPENMP)
# include <omp.h>
#endif
*/
void calc_bin_addr(long gridsize, long nbins, const restr_t* restrict bin_lats, const restr_t* restrict cell_bound_box, int* restrict bin_addr)
{
long n, n2, nele, nele4;
restr_t cell_bound_box_lat1, cell_bound_box_lat2;
for ( n = 0; n < nbins; ++n )
{
n2 = n<<1;
bin_addr[n2 ] = gridsize;
bin_addr[n2+1] = 0;
}
for ( nele = 0; nele < gridsize; ++nele )
{
nele4 = nele<<2;
cell_bound_box_lat1 = cell_bound_box[nele4 ];
cell_bound_box_lat2 = cell_bound_box[nele4+1];
for ( n = 0; n < nbins; ++n )
{
n2 = n<<1;
if ( cell_bound_box_lat1 <= bin_lats[n2+1] &&
cell_bound_box_lat2 >= bin_lats[n2 ] )
{
bin_addr[n2 ] = MIN(nele, bin_addr[n2 ]);
bin_addr[n2+1] = MAX(nele, bin_addr[n2+1]);
}
}
}
}
/*
void calc_bin_addr_omp(long gridsize, long nbins, const restr_t* restrict bin_lats, const restr_t* restrict cell_bound_box, int* restrict bin_addr)
static
void calc_bin_addr(long gridsize, long nbins, const restr_t* restrict bin_lats, const restr_t* restrict cell_bound_box, int* restrict bin_addr)
{
long n, n2, nele, nele4;
restr_t cell_bound_box_lat1, cell_bound_box_lat2;
#if defined(_OPENMP)
extern int ompNumThreads;
restr_t (*omp_bin_addr)[ompNumThreads] = Malloc(nbins*sizeof(*omp_bin_addr));
for ( int ompthID = 0; ompthID < ompNumThreads; ++ompthID )
for ( n = 0; n < nbins; ++n )
{
n2 = n<<1;
omp_bin_addr[ompthID][n2 ] = gridsize;
omp_bin_addr[ompthID][n2+1] = 0;
}
#endif
long n2;
for ( n = 0; n < nbins; ++n )
for ( long n = 0; n < nbins; ++n )
{
n2 = n<<1;
bin_addr[n2 ] = gridsize;
......@@ -64,48 +17,31 @@ void calc_bin_addr_omp(long gridsize, long nbins, const restr_t* restrict bin_la
#if defined(_OPENMP)
#pragma omp parallel for default(none) \
private(n, n2, nele4, cell_bound_box_lat1, cell_bound_box_lat2) \
shared(gridsize, nbins, bin_lats, cell_bound_box, omp_bin_addr)
private(n2) shared(gridsize, nbins, bin_lats, bin_addr, cell_bound_box)
#endif
for ( nele = 0; nele < gridsize; ++nele )
for ( long nele = 0; nele < gridsize; ++nele )
{
#if defined(_OPENMP)
int ompthID = omp_get_thread_num();
#endif
nele4 = nele<<2;
cell_bound_box_lat1 = cell_bound_box[nele4 ];
cell_bound_box_lat2 = cell_bound_box[nele4+1];
for ( n = 0; n < nbins; ++n )
long nele4 = nele<<2;
restr_t cell_bound_box_lat1 = cell_bound_box[nele4 ];
restr_t cell_bound_box_lat2 = cell_bound_box[nele4+1];
for ( long n = 0; n < nbins; ++n )
{
n2 = n<<1;
if ( cell_bound_box_lat1 <= bin_lats[n2+1] &&
cell_bound_box_lat2 >= bin_lats[n2 ] )
{
#if defined(_OPENMP)
omp_bin_addr[ompthID][n2 ] = MIN(nele, omp_bin_addr[ompthID][n2 ]);
omp_bin_addr[ompthID][n2+1] = MAX(nele, omp_bin_addr[ompthID][n2+1]);
#else
bin_addr[n2 ] = MIN(nele, bin_addr[n2 ]);
bin_addr[n2+1] = MAX(nele, bin_addr[n2+1]);
#pragma omp critical
#endif
}
{
bin_addr[n2 ] = MIN(nele, bin_addr[n2 ]);
bin_addr[n2+1] = MAX(nele, bin_addr[n2+1]);
}
}
}
}
#if defined(_OPENMP)
for ( int ompthID = 0; ompthID < ompNumThreads; ++ompthID )
{
for ( n = 0; n < nbins; ++n )
{
n2 = n<<1;
bin_addr[n2 ] = MIN(omp_bin_addr[ompthID][n2 ], bin_addr[n2 ]);
bin_addr[n2+1] = MAX(omp_bin_addr[ompthID][n2+1], bin_addr[n2+1]);
}
}
Free(omp_bin_addr);
#endif
}
*/
void calc_lat_bins(remapgrid_t* src_grid, remapgrid_t* tgt_grid, int map_type)
{
......
......@@ -567,8 +567,13 @@ void remap_define_reg2d(int gridID, remapgrid_t *grid)
char yunits[CDI_MAX_NAME]; yunits[0] = 0;
cdiGridInqKeyStr(gridID, CDI_KEY_YUNITS, CDI_MAX_NAME, yunits);
grid_to_radian(yunits, nx, grid->reg2d_center_lon, "grid reg2d center lon");
grid_to_radian(yunits, ny, grid->reg2d_center_lat, "grid reg2d center lat");
grid_to_radian(yunits, nx, grid->reg2d_center_lon, "grid reg2d center lon");
grid_to_radian(yunits, ny, grid->reg2d_center_lat, "grid reg2d center lat");
if ( grid->reg2d_center_lon[nx-1] < grid->reg2d_center_lon[0] )
for ( long i = 1; i < nx; ++i )
if ( grid->reg2d_center_lon[i] < grid->reg2d_center_lon[i-1] )
grid->reg2d_center_lon[i] += PI2;
if ( grid->is_cyclic ) grid->reg2d_center_lon[nx] = grid->reg2d_center_lon[0] + PI2;
......
......@@ -18,7 +18,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test Ydrunstat.test \
EOF.test \
Mergetime.test EOF.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......
......@@ -95,12 +95,13 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Fldstat.test.in $(srcdir)/Fldpctl.test.in \
$(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \
$(srcdir)/Merstat.test.in $(srcdir)/Zonstat.test.in \
$(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \
$(srcdir)/Arithc.test.in $(srcdir)/Arith.test.in \
$(srcdir)/Expr.test.in $(srcdir)/Gradsdes.test.in \
$(srcdir)/Collgrid.test.in $(srcdir)/threads.test.in \
$(srcdir)/tsformat.test.in $(srcdir)/wildcard.test.in \
$(srcdir)/MapReduce.test.in $(srcdir)/Ninfo.test.in README
$(srcdir)/Mergetime.test.in $(srcdir)/Afterburner.test.in \
$(srcdir)/Detrend.test.in $(srcdir)/Arithc.test.in \
$(srcdir)/Arith.test.in $(srcdir)/Expr.test.in \
$(srcdir)/Gradsdes.test.in $(srcdir)/Collgrid.test.in \
$(srcdir)/threads.test.in $(srcdir)/tsformat.test.in \
$(srcdir)/wildcard.test.in $(srcdir)/MapReduce.test.in \
$(srcdir)/Ninfo.test.in README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
......@@ -120,9 +121,9 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \
Seasstat.test Runstat.test Multiyearstat.test Ydrunstat.test \
Gridboxstat.test Vertstat.test Fldstat.test Fldpctl.test \
Ensstat.test Enspctl.test Merstat.test Zonstat.test \
Afterburner.test Detrend.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test threads.test tsformat.test \
wildcard.test MapReduce.test Ninfo.test
Mergetime.test Afterburner.test Detrend.test Arithc.test \
Arith.test Expr.test Gradsdes.test Collgrid.test threads.test \
tsformat.test wildcard.test MapReduce.test Ninfo.test
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
......@@ -541,7 +542,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test Ydrunstat.test \
EOF.test \
Mergetime.test EOF.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......@@ -650,6 +651,8 @@ Merstat.test: $(top_builddir)/config.status $(srcdir)/Merstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Zonstat.test: $(top_builddir)/config.status $(srcdir)/Zonstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Mergetime.test: $(top_builddir)/config.status $(srcdir)/Mergetime.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Afterburner.test: $(top_builddir)/config.status $(srcdir)/Afterburner.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in
......
#! @BASH@
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
#
IFILE1=$DATAPATH/mergetime_y2
IFILE2=$DATAPATH/mergetime_y12
#
NTEST=1
#
for X in 1 2; do
RSTAT=0
RFILE=$DATAPATH/mergetime_ref
OFILE=mergetime_res
CDOTEST="mergetime"
if [ "$X" = "1" ] ; then
CDOCOMMAND="$CDO $FORMAT mergetime $IFILE1 $IFILE2 $OFILE"
else
CDOCOMMAND="$CDO $FORMAT mergetime $IFILE2 $IFILE1 $OFILE"
fi
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
env SKIP_SAME_TIME=1 $CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
rm -f $CDOOUT $CDOERR
#
exit 0
......@@ -38,8 +38,9 @@ THREAD_REF = thread1_ref tsformat1_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp
ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref
MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell
MERGETIME = mergetime_ref mergetime_y1 mergetime_y2 mergetime_12
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_REF) $(COMP_REF) $(YDRUNSTAT_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) \
$(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_REF) $(VERTSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) \
$(MERSTAT_REF) $(ZONSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(REMAP2_REF) $(SELECT_REF) $(DETREND_REF) \
$(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE)
$(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE) $(MERGETIME)
......@@ -332,10 +332,11 @@ THREAD_REF = thread1_ref tsformat1_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp
ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref
MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell
MERGETIME = mergetime_ref mergetime_y1 mergetime_y2 mergetime_y12
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_REF) $(COMP_REF) $(YDRUNSTAT_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) \
$(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_REF) $(VERTSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) \
$(MERSTAT_REF) $(ZONSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(REMAP2_REF) $(SELECT_REF) $(DETREND_REF) \
$(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE)
$(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE) $(MERGETIME)
all: all-am
......