Commit 298823a3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

remaplaf: bug fix for fields with missing values

parent a8160812
......@@ -9,6 +9,7 @@
/OPERATORS -text
/README -text
/aclocal.m4 -text
/cdo.spec -text
/cdo.spec.in -text
config/config.guess -text
config/config.sub -text
......
......@@ -24,6 +24,7 @@
* remapcon: eliminate srch_mask (~40% speed up)
* remapcon: change bound_box to int type (~25% speed up)
* remapcon: optimization of inner loop (~7% speed up)
* remaplaf: bug fix for fields with missing values
* genYbounds: bug fix for non global fields
* mermean: bug fix for weights from 'zonmean' (report: Michael Sigmond)
* replaced strncpy/strncmp by memcpy/memcmp
......
## Process this file with automake to produce Makefile.in
SUBDIRS = src
#
EXTRA_DIST=config/default OPERATORS doc/cdo.pdf doc/cdo_refcard.pdf
EXTRA_DIST=config/default OPERATORS doc/cdo.pdf doc/cdo_refcard.pdf cdo.spec
#
CLEANFILES = `ls *~`
......@@ -172,7 +172,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src
#
EXTRA_DIST = config/default OPERATORS doc/cdo.pdf doc/cdo_refcard.pdf
EXTRA_DIST = config/default OPERATORS doc/cdo.pdf doc/cdo_refcard.pdf cdo.spec
#
CLEANFILES = `ls *~`
all: all-recursive
......
#
# spec file for package cdo
#
Name: cdo
#BuildRequires:
Version: 1.3.1
Release: 1
Summary: Climate Data Operators
License: GNU GENERAL PUBLIC LICENSE Version 2, June 1991
Group: Productivity/Graphics/Visualization/Other
Requires: netcdf
Autoreqprov: on
URL: http://www.mpimet.mpg.de/fileadmin/software/cdo/
Source0: cdo-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
CDO is a collection of command line Operators to manipulate and analyse Climate model Data.
Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG. There are more than 400
operators available. The following table provides a brief overview of the main categories.
Authors:
--------
This program was developed at the Max-Planck-Institute for Meteorology.
Uwe Schulzweida, Uwe.Schulzweida@zmaw.de, is the main author.
Luis Kornblueh, Luis.Kornblueh@zmaw.de
Ralf Quast, Ralf.Quast@brockmann-consult.de
Send questions, comments and bug reports to Uwe.Schulzweida@zmaw.de
%prep
%setup
%build
./configure --prefix=%{_prefix} --with-netcdf
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,755)
%doc AUTHORS COPYING ChangeLog NEWS OPERATORS README doc/cdo.pdf doc/cdo_refcard.pdf
%{_prefix}/bin/cdo
#%{_prefix}/bin/cdotest
%changelog -n cdo
* Mon Aug 25 2008 - petri@pik-potsdam.de
- adapted to cdo-1.2.0
* Tue May 20 2008 - petri@pik-potsdam.de
- adapted to cdo-1.1.1
- dont try to include cdotest in the package
* Fri Jan 05 2007 - petri@pik-potsdam.de
- Created initial spec file
......@@ -47,11 +47,18 @@ case "${HOSTNAME}" in
CC=icc CFLAGS="-g -O2 -Wall -fno-alias"
;;
# x86_64-suse-linux
tornado5)
${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/sles10-x64 \
--with-netcdf=/sw/sles10-x64/netcdf-4.0.1 \
--with-hdf5=/sw/sles10-x64/hdf5-1.8.2 \
--with-szlib=/sw/sles10-x64/szip-2.1 \
CC=gcc CFLAGS="-g -D_REENTRANT -O2 -Wall"
;;
tornado1)
${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/sles9-x64 \
--with-netcdf=/sw/sles9-x64/netcdf-3.6.2 \
--with-szlib=$HOME/local/sles9-x64 \
CC=gcc CFLAGS="-g -D_REENTRANT -O2 -Wall -Bstatic"
CC=gcc CFLAGS="-g -D_REENTRANT -O2 -Wall"
;;
# x86_64-etch-x64-linux
squall1)
......
......@@ -1563,6 +1563,7 @@ void remap_laf(double *dst_array, double missval, int dst_size, int num_links, d
{
if ( i == dst_add[n] )
{
printf("%d %d\n", i, n);
for ( k = 0; k < ncls; k++ )
if ( IS_EQUAL(src_array[src_add[n]], src_cls[k]) ) break;
......@@ -1578,17 +1579,20 @@ void remap_laf(double *dst_array, double missval, int dst_size, int num_links, d
*/
/* only for sorted dst_add! */
{
int min_add, max_add;
int min_add = 1, max_add = 0;
for ( n = 0; n < num_links; n++ )
if ( i == dst_add[n] ) break;
min_add = n;
for ( n = min_add+1; n < num_links; n++ )
if ( i != dst_add[n] ) break;
if ( n < num_links )
{
min_add = n;
for ( n = min_add+1; n < num_links; n++ )
if ( i != dst_add[n] ) break;
max_add = n;
max_add = n;
}
ncls = 0;
for ( n = min_add; n < max_add; n++ )
......@@ -1605,7 +1609,7 @@ void remap_laf(double *dst_array, double missval, int dst_size, int num_links, d
src_wts[k] += map_wts[0][n];
}
}
if ( ncls )
{
imax = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment