Commit 694b914f authored by Uwe Schulzweida's avatar Uwe Schulzweida

Merge branch 'develop'

parents 4c382730 366bd856
{ "hosts": {
"thunder": {
"hostname": "thunder5.zmaw.de",
"dir": "/scratch/mpi/CC/mh0287/users/m300064/builds/remote",
"envConfigFiles": ["/etc/profile",".profile"],
"CC": ["icpc", "icc", "clang", "clang++", "gcc", "g++"]
},
"luthien": {
"hostname": "localhost",
"dir": "/home/ram/builds/cdo/auto",
"CC": ["gcc","g++","clang","clang++"]
},
"mpipc": {
"hostname": "mpipc150.mpi.zmaw.de",
"dir": "/scratch/local1/m300064/builds/remote",
"envConfigFiles": ["/etc/profile",".profile"],
"CC": ["gcc"]
},
"jessie-mpi": {
"breeze": {
"hostname": "breeze.mpimet.mpg.de",
"dir": "/home/mpim/m300064/builds/remote",
"envConfigFiles": ["/etc/profile",".profile"],
......@@ -41,7 +29,7 @@
"CC": ["icc","pgcc","cray","gcc"]
},
"wanglung": {
"hostname": "wanglung.mpi.zmaw.de",
"hostname": "wanglung.mpimet.mpg.de",
"dir": "/home/zmaw/m300064/builds/remote"
},
"ubuntu-32bit": {
......@@ -55,9 +43,9 @@
"remoteUser": "m300064",
"builders": {
"localCLANG_3.8_Debug": {
"localCLANG_4.0_Debug": {
"hostname": "luthien",
"configureCall": "/home/ram/src/cdo/configure --with-netcdf --disable-openmp CC=clang CXX=clang++ CFLAGS='-g -O0'",
"configureCall": "/home/ram/src/cdo/configure --with-netcdf --disable-openmp CC=clang CXX=clang++ CFLAGS='-g -O0' LDFLAGS=-lhdf5",
"makeCall": "make -j 12",
"sync": false
},
......@@ -67,8 +55,14 @@
"makeCall": "make -j 12",
"sync": false
},
"localGCC": {
"hostname": "luthien",
"configureCall": "/home/ram/src/cdo/configure --enable-hirlam-extensions --with-grib_api --with-netcdf --with-magics --with-udunits2 CFLAGS='-g -O3 -std=gnu99 -Wall -fopenmp -march=native' CPPFLAGS='-I/usr/include/magics' LDFLAGS='-leccodes'",
"makeCall": "make -j 12",
"sync": false
},
"mpipcCLANG": {
"hostname": "mpipc",
"hostname": "breeze",
"configureCall": "./configure --with-netcdf=/sw/squeeze-x64/netcdf-4.2-static --disable-openmp CC=clang CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": true
......@@ -79,10 +73,24 @@
"makeCall": "make -j 12",
"sync": true
},
"pgi": {
"hostname": "mistral",
"configureCall": "./configure CC=pgcc CXX=pgc++ FC=pgfortran",
"envConfigFiles": ["/etc/profile",".profile"],
"makeCall": "make -j 12",
"sync": true
},
"localGCC_static": {
"doc": "local builder with default GCC - VPATH build - As-Static-As-Possible",
"hostname": "luthien",
"configureCall": "/home/ram/src/cdo/configure --enable-openmp --enable-all-static --with-grib_api --with-netcdf --with-hdf5 --with-proj --with-udunits2 CC=gcc CFLAGS='-g -O2'",
"configureCall": "/home/ram/src/cdo/configure --enable-openmp --enable-all-static --with-netcdf --with-hdf5 --with-proj --with-udunits2 CC=gcc CFLAGS='-g -O2'",
"makeCall": "make -j 12",
"sync": false
},
"AUR":{
"doc": "local buildder for testing AUR-package",
"hostname": "luthien",
"configureCall": "/home/ram/src/cdo/configure --prefix=/usr --with-netcdf=/usr --with-udunits2=/usr --with-hdf5=/usr --with-szlib=/usr --with-proj=/usr --with-fftw3 --with-curl=/usr --with-grib_api=/usr --with-magics=/usr --with-libxml2=/usr CFLAGS='-g -O3 -std=gnu99 -Wall -fopenmp -march=native' LIBS='-lhdf5 -ljasper -lpng -lopenjpeg' CPPFLAGS='-I/usr/include/magics -I/usr/include/libxml2' LIBS='-leccodes -lhdf5'",
"makeCall": "make -j 12",
"sync": false
},
......@@ -110,6 +118,12 @@
"makeCall": "make -j 12",
"sync": true
},
"mistralHilram": {
"hostname": "mistral",
"configureCall": "./configure --enable-hirlam-extensions --with-grib_api=/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 --with-netcdf=/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 --with-hdf5=/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 --with-szlib=/sw/rhel6-x64/sys/libaec-0.3.2-gcc48 --with-udunits2=/sw/rhel6-x64/util/udunits-2.2.17-gcc48 --with-proj=/sw/rhel6-x64/graphics/proj4-4.9.1-gcc48 CC=gcc CXX=g++ CFLAGS='-g -fopenmp -O2'",
"makeCall": "make -j 12",
"sync": true
},
"linux32bit": {
"hostname": "ubuntu-32bit",
"configureCall": "./configure --with-netcdf ",
......
......@@ -3,9 +3,29 @@
* Using CDI library version 1.9.0
* Version 1.9.0 release
2017-07-25 Uwe Schulzweida
* uvDestag: HIRLAM extensions (patch from Michal Koutek)
2017-07-24 Uwe Schulzweida
* remap: deactivate links_per_value() [Bug #7821]
2017-07-22 Uwe Schulzweida
* grid_search_reg2d_nn: bug fix for nx/ny = 1
2017-07-14 Uwe Schulzweida
* settaxis: made time argument optional
2017-07-13 Uwe Schulzweida
* percentile: fix wrong result with method numpy (linear interpolation) and nist [Bug #7798]
2017-07-01 Uwe Schulzweida
setcodetab: added support for GRIB level type
* setcodetab: added support for GRIB level type
2017-06-28 Uwe Schulzweida
......@@ -13,7 +33,7 @@
2017-06-27 Uwe Schulzweida
* expr: added support for clev in ifthenelse (bug fix).
* expr: added support for clev in ternary operator (bug fix).
* setpartabp: param key values without leading zeros (bug fix).
2017-06-08 Uwe Schulzweida
......
......@@ -4,9 +4,14 @@ CDO NEWS
Version 1.9.0 (15 September 2017):
New features:
* Code changed from ANSI C99 to ISO C++11
* Added range operator to all statistic modules (e.g. yearrange, zonrange)
New operators:
*
Fixed bugs:
* expr: improve ternary operator, no brackets needed anymore.
* expr: added support for clev in ternary operator.
* remapcon/remapycon produces wrong results for some grid combinations (introduced in 1.8.0) [Bug #7821]
* mergetime: wrong time information if first input file does not contain the first time step (bug introduced in 1.8.1) [Bug #7760]
* percentile: fix wrong result with method numpy (linear interpolation) and nist [Bug #7798]
Version 1.8.2 (15 May 2017):
......
......@@ -66,7 +66,7 @@ Building and installing it:
Porting:
This package was designed for maximum portability. It is written entirely
in ANSI C99, and will compile on most UNIX platforms.
in ISO C++11 and ANSI C99, and will compile on most UNIX platforms.
Contact:
......
......@@ -67,20 +67,26 @@ case "${HOSTNAME}" in
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,$HOME/local/eccodes-2.3.0/lib" \
LDFLAGS="/opt/local/lib/gcc5/libstdc++.6.dylib -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" \
LDFLAGS="/opt/local/lib/gcc6/libstdc++.6.dylib -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"
elif test "$COMP" = gribapi ; then
${CONFPATH}configure --prefix=$HOME/local --disable-cgribex \
$CDOLIBS \
LDFLAGS="/opt/local/lib/gcc6/libstdc++.6.dylib -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
# --with-magics=/Users/m214003/local/magics-2.14.9
else
${CONFPATH}configure $CDOLIBS CC=$COMP
${CONFPATH}configure $CDOLIBS
fi
;;
hama*)
......@@ -135,21 +141,12 @@ case "${HOSTNAME}" in
--with-udunits2=/usr \
--with-proj=/usr"
if test "$COMP" = g++ ; then
if test "$COMP" = gnu ; then
${CONFPATH}configure --prefix=/usr/local \
--program-suffix=-g++ \
--enable-cxx \
--enable-maintainer-mode \
$CDOLIBS \
CC=gcc CXX=g++ CFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
LDFLAGS='-L/usr/local/lib' \
LIBS='-lpthread -lm -lcurl -lhdf5_hl -lhdf5 -lz -lsz -laec -ldl'
else
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
--enable-all-static \
$CDOLIBS \
CC=gcc CFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
CXX=g++ CXXFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
LDFLAGS='-L/usr/local/lib' \
LIBS='-lpthread -lm -lcurl -lhdf5_hl -lhdf5 -lz -lsz -laec -ldl'
fi
......@@ -220,30 +217,33 @@ case "${HOSTNAME}" in
;;
# mistral
mlogin*)
CDOLIBS="--with-grib_api=/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 \
CDOLIBS="--with-eccodes=/sw/rhel6-x64/eccodes/eccodes-2.3.0-gcc48 \
--with-netcdf=/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 \
--with-hdf5=/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 \
--with-szlib=/sw/rhel6-x64/sys/libaec-0.3.2-gcc48 \
--with-szlib=/sw/rhel6-x64/sys/libaec-0.3.4-gcc48 \
--with-udunits2=/sw/rhel6-x64/util/udunits-2.2.17-gcc48 \
--with-proj=/sw/rhel6-x64/graphics/proj4-4.9.1-gcc48"
# --with-magics=/sw/rhel6-x64/graphics/magicsxx-2.18.15-gfxonly-gcc48 \
--with-proj=/sw/rhel6-x64/graphics/proj4-4.9.3-gcc48"
# --with-magics=/sw/rhel6-x64/graphics/magicsxx-2.33.0-gfxonly-gcc48"
# --with-cmor=/sw/rhel6-x64/cmor-2.9.2-shared-gcc48 \
if test "$COMP" = intel ; then
${CONFPATH}configure --prefix=$HOME/local \
--with-fftw3 \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.3.0-gcc48/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" = pgi ; then
${CONFPATH}configure --disable-openmp \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.3.0-gcc48/lib" \
CXX=pgc++ CXXFLAGS="-g -fast" \
CC=pgcc CFLAGS="-g -fast"
else
${CONFPATH}configure --prefix=$HOME/local \
--with-fftw3 \
$CDOLIBS \
LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.3.0-gcc48/lib" \
CXX=g++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2' \
CC=gcc CFLAGS='-g -Wall -O3 -march=native -mavx2'
fi
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for cdo 1.9.0rc1.
# Generated by GNU Autoconf 2.68 for cdo 1.9.0rc3.
#
# Report bugs to <http://mpimet.mpg.de/cdo>.
#
......@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cdo'
PACKAGE_TARNAME='cdo'
PACKAGE_VERSION='1.9.0rc1'
PACKAGE_STRING='cdo 1.9.0rc1'
PACKAGE_VERSION='1.9.0rc3'
PACKAGE_STRING='cdo 1.9.0rc3'
PACKAGE_BUGREPORT='http://mpimet.mpg.de/cdo'
PACKAGE_URL=''
......@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures cdo 1.9.0rc1 to adapt to many kinds of systems.
\`configure' configures cdo 1.9.0rc3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1471,7 +1471,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cdo 1.9.0rc1:";;
short | recursive ) echo "Configuration of cdo 1.9.0rc3:";;
esac
cat <<\_ACEOF
......@@ -1623,7 +1623,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cdo configure 1.9.0rc1
cdo configure 1.9.0rc3
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -2216,7 +2216,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cdo $as_me 1.9.0rc1, which was
It was created by cdo $as_me 1.9.0rc3, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
......@@ -3165,7 +3165,7 @@ fi
# Define the identity of the package.
PACKAGE='cdo'
VERSION='1.9.0rc1'
VERSION='1.9.0rc3'
cat >>confdefs.h <<_ACEOF
......@@ -22983,7 +22983,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by cdo $as_me 1.9.0rc1, which was
This file was extended by cdo $as_me 1.9.0rc3, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -23049,7 +23049,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
cdo config.status 1.9.0rc1
cdo config.status 1.9.0rc3
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
......
......@@ -4,7 +4,7 @@
# autoconf 2.68
# libtool 2.4.2
AC_INIT([cdo], [1.9.0rc1], [http://mpimet.mpg.de/cdo])
AC_INIT([cdo], [1.9.0rc3], [http://mpimet.mpg.de/cdo])
AC_DEFINE_UNQUOTED(CDO, ["$PACKAGE_VERSION"], [CDO version])
......
......@@ -7,3 +7,12 @@ GRIB1 standard:
max record length: 2**23 - 1 (---> 8388607)
P8 : gridsize max: <8388607, 4000x2000
P16: gridsize max: <8388607/2, 2880x1440
ECMWF extension:
max record length: (2**23 - 1)*120 (---> 1006632840)
P8 : gridsize max: <1006632840, 44000x22000
P16: gridsize max: <1006632840/2, 30000x15000
GRIB2 standard:
max record length: 8 byte
max data section length: 4 byte
......@@ -49,7 +49,7 @@ Luis also helps with design and planning.
\item[Ralf M\"uller]: He is working on {\CDO} since 2009.
His main contributions are the implementation of the User Portal,
the ruby and python interface for all {\CDO} operators, and the Windows support.
the ruby and python interface for all {\CDO} operators, the building process and the Windows support.
The {\CDO} User Portal was funded by the European Commission infracstructure project IS-ENES.
Ralf also helps a lot with the user support.
Implemented operators: {\htmlref{showunit}{showunit}}, {\htmlref{stdatm}{stdatm}}, {\htmlref{intlevel3d}{intlevel3d}}, {\htmlref{consecsum}{consecsum}},
......
......@@ -57,7 +57,7 @@ INTEGER Index of last latitude (1 - nlat)
@BeginExample
To select the region with the longitudes from 30W to 60E and latitudes from 30N to 80S from all input fields use:
To select the region with the longitudes from 30W to 60E and latitudes from 30N to 80N from all input fields use:
@BeginVerbatim
cdo sellonlatbox,-30,60,30,80 infile outfile
@EndVerbatim
......
......@@ -9,7 +9,7 @@
@BeginDescription
This module sets the time axis or part of the time axis. Which part of the
time axis is overwritten depends on the chosen operator.
time axis is overwritten/created depends on the chosen operator.
@EndDescription
@EndModule
......
libcdi @ 2b8896fb
Subproject commit 1698f3b092d5ee62569665b3d500bca99606d616
Subproject commit 2b8896fbcd2208d5ab773f79b1815dc88dcc918e
......@@ -2237,7 +2237,7 @@ void after_processing(struct Control *globs, struct Variable *vars)
if ( globs->ostreamID != CDI_UNDEFID ) streamClose(globs->ostreamID);
#endif
#if defined(CDO)
processDefVarNum(vlistNvars(globs->ivlistID), globs->istreamID);
processDefVarNum(vlistNvars(globs->ivlistID));
processAddNvals(streamNvals(globs->istreamID));
#endif
streamClose(globs->istreamID);
......
......@@ -38,7 +38,7 @@ void *Arith(void *argument)
enum {FILL_NONE, FILL_TS, FILL_VAR, FILL_VARTS, FILL_FILE};
int filltype = FILL_NONE;
int nmiss;
int nrecs, nrecs2, nvars = 0;
int nrecs, nvars = 0;
int nlevels2 = 1;
int varID, levelID;
int levelID2;
......@@ -211,7 +211,7 @@ void *Arith(void *argument)
{
if ( tsID == 0 || filltype == FILL_NONE || filltype == FILL_FILE || filltype == FILL_VARTS )
{
nrecs2 = pstreamInqTimestep(streamIDx2, tsID2);
int nrecs2 = pstreamInqTimestep(streamIDx2, tsID2);
if ( nrecs2 == 0 )
{
if ( filltype == FILL_NONE && streamIDx2 == streamID2 )
......@@ -254,7 +254,7 @@ void *Arith(void *argument)
if ( tsID == 0 || filltype == FILL_NONE || filltype == FILL_FILE || filltype == FILL_VARTS )
{
int lstatus = nlevels2 > 1 ? varID == 0 : recID == 0;
bool lstatus = nlevels2 > 1 ? varID == 0 : recID == 0;
if ( lstatus || (filltype != FILL_VAR && filltype != FILL_VARTS) )
{
......@@ -293,9 +293,8 @@ void *Arith(void *argument)
if ( filltype == FILL_VAR || filltype == FILL_VARTS )
{
levelID2 = (nlevels2 > 1) ? levelID : 0;
int gridsize = gridInqSize(vlistInqVarGrid(vlistIDx2, 0));
levelID2 = 0;
if ( nlevels2 > 1 ) levelID2 = levelID;
int offset = gridsize*levelID2;
memcpy(fieldx2->ptr, vardata2+offset, gridsize*sizeof(double));
fieldx2->nmiss = varnmiss2[levelID2];
......
......@@ -93,14 +93,13 @@ void *CDIwrite(void *argument)
int nvars = 10, nlevs = 0, ntimesteps = 30;
const char *defaultgrid = "global_.2";
int tsID, varID, levelID;
int gridsize, i;
int i;
int vlistID;
int zaxisID, taxisID;
int vdate, vtime, julday;
int vdate, vtime;
int filetype = -1, datatype = -1;
int irun, nruns = 1;
unsigned int seed = 1;
const char *gridfile;
char sinfo[64];
off_t nvalues = 0;
double file_size = 0, data_size = 0;
......@@ -117,7 +116,7 @@ void *CDIwrite(void *argument)
if ( operatorArgc() > 5 ) cdoAbort("Too many arguments!");
gridfile = defaultgrid;
const char *gridfile = defaultgrid;
if ( operatorArgc() >= 1 ) nruns = parameter2int(operatorArgv()[0]);
if ( operatorArgc() >= 2 ) gridfile = operatorArgv()[1];
if ( operatorArgc() >= 3 ) nlevs = parameter2int(operatorArgv()[2]);
......@@ -133,16 +132,17 @@ void *CDIwrite(void *argument)
if ( nvars <= 0 ) nvars = 1;
int gridID = cdoDefineGrid(gridfile);
gridsize = gridInqSize(gridID);
int gridsize = gridInqSize(gridID);
if ( nlevs == 1 )
zaxisID = zaxisCreate(ZAXIS_SURFACE, 1);
else
{
double levels[nlevs];
double *levels = (double *) Malloc(nlevs*sizeof(double));
for ( i = 0; i < nlevs; ++i ) levels[i] = 100*i;
zaxisID = zaxisCreate(ZAXIS_HEIGHT, nlevs);
zaxisDefLevels(zaxisID, levels);
Free(levels);
}
if ( cdoVerbose )
......@@ -222,7 +222,7 @@ void *CDIwrite(void *argument)
datatype = vlistInqVarDatatype(vlistID, 0);
if ( datatype == CDI_UNDEFID ) datatype = CDI_DATATYPE_FLT32;
julday = date_to_julday(CALENDAR_PROLEPTIC, 19870101);
int julday = date_to_julday(CALENDAR_PROLEPTIC, 19870101);
t0 = timer_val(timer_write);
......
......@@ -313,18 +313,10 @@ void setmisstodis(field_type *field1, field_type *field2, int num_neighbors)
gridInqYunits(gridID, units);
grid_to_radian(units, gridsize, yvals, "grid center lat");
unsigned *mindex = NULL;
unsigned *vindex = NULL;
double *lons = NULL;
double *lats = NULL;
if ( nmiss ) mindex = (unsigned *) Calloc(1, nmiss*sizeof(unsigned));
if ( nvals )
{
vindex = (unsigned *) Calloc(1, nvals*sizeof(unsigned));
lons = (double *) Malloc(nvals*sizeof(double));
lats = (double *) Malloc(nvals*sizeof(double));
}
unsigned *mindex = nmiss ? (unsigned *) Calloc(1, nmiss*sizeof(unsigned)) : NULL;
unsigned *vindex = nvals ? (unsigned *) Calloc(1, nvals*sizeof(unsigned)) : NULL;
double *lons = nvals ? (double *) Malloc(nvals*sizeof(double)) : NULL;
double *lats = nvals ? (double *) Malloc(nvals*sizeof(double)) : NULL;
unsigned nv = 0, nm = 0;
for ( unsigned i = 0; i < gridsize; ++i )
......
......@@ -262,7 +262,7 @@ void *Importamsr(void *argument)
else
cdoAbort("Unexpected file size for AMSR data!");
processDefVarNum(vlistNvars(vlistID), streamID);
processDefVarNum(vlistNvars(vlistID));
pstreamClose(streamID);
......
......@@ -555,7 +555,7 @@ void *Importbinary(void *argument)
} /* end of while (1) loop */
processDefVarNum(vlistNvars(vlistID), streamID);
processDefVarNum(vlistNvars(vlistID));
pstreamClose(streamID);
......
......@@ -1610,7 +1610,7 @@ void *Importcmsaf(void *argument)
status = H5Fclose(file_id);
UNUSED(status);
processDefVarNum(vlistNvars(vlistID), streamID);
processDefVarNum(vlistNvars(vlistID));
pstreamClose(streamID);
......
......@@ -231,7 +231,7 @@ void *Importobs(void *argument)
if ( cdoVerbose )
printf("lonmin=%g, lonmax=%g, latmin=%g, latmax=%g\n", lonmin, lonmax, latmin, latmax);
processDefVarNum(vlistNvars(vlistID), streamID);
processDefVarNum(vlistNvars(vlistID));
pstreamClose(streamID);
......
......@@ -41,15 +41,19 @@ void invertLevDes(int vlistID)
if ( zaxisInqLevels(zaxisID1, NULL) )
{
double yv1[nlev], yv2[nlev];
double *yv1 = (double*) Malloc(nlev*sizeof(double));
double *yv2 = (double*) Malloc(nlev*sizeof(double));
zaxisInqLevels(zaxisID1, yv1);
for ( int ilev = 0; ilev < nlev; ++ilev ) yv2[nlev-ilev-1] = yv1[ilev];
zaxisDefLevels(zaxisID2, yv2);
Free(yv1);
Free(yv2);
}
if ( zaxisInqLbounds(zaxisID1, NULL) && zaxisInqUbounds(zaxisID1, NULL) )
{
double yb1[nlev], yb2[nlev];
double *yb1 = (double*) Malloc(nlev*sizeof(double));
double *yb2 = (double*) Malloc(nlev*sizeof(double));
zaxisInqLbounds(zaxisID1, yb1);
for ( int ilev = 0; ilev < nlev; ++ilev ) yb2[nlev-ilev-1] = yb1[ilev];
zaxisDefLbounds(zaxisID2, yb2);
......@@ -57,6 +61,8 @@ void invertLevDes(int vlistID)
zaxisInqUbounds(zaxisID1, yb1);
for ( int ilev = 0; ilev < nlev; ++ilev ) yb2[nlev-ilev-1] = yb1[ilev];
zaxisDefUbounds(zaxisID2, yb2);
Free(yb1);
Free(yb2);
}
if ( zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF )
......@@ -64,8 +70,8 @@ void invertLevDes(int vlistID)
int vctsize = zaxisInqVctSize(zaxisID1);
if ( vctsize && vctsize%2 == 0 )
{
double vct1[vctsize];
double vct2[vctsize];
double *vct1 = (double*) Malloc(vctsize*sizeof(double));
double *vct2 = (double*) Malloc(vctsize*sizeof(double));
zaxisInqVct(zaxisID1, vct1);
for ( int i = 0; i < vctsize/2; ++i )
{
......@@ -73,6 +79,8 @@ void invertLevDes(int vlistID)
vct2[vctsize-1-i] = vct1[vctsize/2+i];
}
zaxisDefVct(zaxisID2, vctsize, vct2);
Free(vct1);
Free(vct2);
}
}
......
## Process this file with automake to produce Makefile.in