Commit 0838f483 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added Gridsearch.c

parent 4dc092c2
......@@ -350,6 +350,7 @@ src/Gengrid.c -text
src/Gradsdes.c -text
src/Gridboxstat.c -text
src/Gridcell.c -text
src/Gridsearch.c -text
src/Harmonic.c -text
src/Hi.c -text
src/Histogram.c -text
......
......@@ -29,21 +29,22 @@ set -x
case "${HOSTNAME}" in
# i386-apple-darwin10
bailung*|d133*|d134*)
CDOLIBS=" --with-jasper=$HOME/local \
--with-grib_api=$HOME/local/gribapi-1.10.4 \
--with-netcdf=$HOME/local \
--with-hdf5=$HOME/local \
--with-szlib=$HOME/local \
--with-udunits2=$HOME/local/udunits-2.1.24 \
--with-proj=/opt/local \
--with-curl=/opt/local"
CDOLIBS="--with-jasper=$HOME/local \
--with-grib_api=$HOME/local/gribapi-1.10.4 \
--with-netcdf=$HOME/local \
--with-hdf5=$HOME/local \
--with-szlib=$HOME/local \
--with-udunits2=$HOME/local/udunits-2.1.24 \
--with-proj=/opt/local \
--with-curl=/opt/local"
if test "$COMP" = icc ; then
${CONFPATH}configure --prefix=$HOME/local \
${CONFPATH}configure \
$CDOLIBS \
LIBS="-L/opt/local/lib -lopenjpeg" \
CC=icc CFLAGS="-g -Wall -O3 -vec-report2 -march=native -fp-model source -fast-transcendentals"
elif test "$COMP" = clang ; then
${CONFPATH}configure --prefix=$HOME/local \
${CONFPATH}configure \
$CDOLIBS \
LIBS="-L/opt/local/lib -lopenjpeg" \
CC=clang CFLAGS="-g -Wall -O3"
......@@ -58,27 +59,26 @@ case "${HOSTNAME}" in
fi
;;
hama*)
CDOLIBS="--with-jasper=/opt/local \
--with-grib_api=$HOME/local/gribapi-1.9.16 \
--with-netcdf=/opt/local \
--with-hdf5=/opt/local \
--with-szlib=$HOME/local \
--with-proj=/opt/local \
--with-curl=/opt/local"
if test "$COMP" = icc ; then
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
--with-jasper=/opt/local \
--with-grib_api=$HOME/local/gribapi-1.9.16 \
--with-netcdf=/opt/local \
--with-hdf5=/opt/local \
--with-szlib=$HOME/local \
--with-proj=/opt/local \
--with-curl=/opt/local \
$CDOLIBS \
CC=icc CFLAGS="-g -Wall -O3 -vec-report2 -march=native -openmp -fp-model source -fast-transcendentals"
elif test "$COMP" = clang ; then
${CONFPATH}configure \
$CDOLIBS \
CC=clang CFLAGS="-g -Wall -O3"
else
${CONFPATH}configure --prefix=$HOME/local \
--enable-maintainer-mode \
--with-jasper=/opt/local \
--with-grib_api=$HOME/local/gribapi-1.9.16 \
--with-netcdf=/opt/local \
--with-hdf5=/opt/local \
--with-szlib=$HOME/local \
--with-proj=/opt/local \
--with-curl=/opt/local \
$CDOLIBS \
CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
# --with-libxml2=/usr \
# --with-magics=/Users/m214003/local/Magics-2.18.14nio \
......
/*
This file is part of CDO. CDO is a collection of Operators to
manipulate and analyse Climate model Data.
Copyright (C) 2003-2014 Uwe Schulzweida, Uwe.Schulzweida@zmaw.de
See COPYING file for copying and redistribution conditions.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "pstream.h"
void *Gridsearch(void *argument)
{
int gridID1, gridID2;
cdoInitialize(argument);
cdoOperatorAdd("testpointsearch", 0, 0, NULL);
cdoOperatorAdd("testcellsearch", 0, 0, NULL);
operatorInputArg("source and target grid description file or name");
operatorCheckArgc(2);
gridID1 = cdoDefineGrid(operatorArgv()[0]);
gridID2 = cdoDefineGrid(operatorArgv()[1]);
cdoFinish();
return (0);
}
......@@ -54,6 +54,7 @@ cdo_SOURCES += Adisit.c \
Gradsdes.c \
Gridboxstat.c \
Gridcell.c \
Gridsearch.c \
Harmonic.c \
Hi.c \
Histogram.c \
......
......@@ -123,16 +123,16 @@ am__cdo_SOURCES_DIST = cdo.c Adisit.c Arith.c Arithc.c Arithdays.c \
Ensstat.c Ensstat3.c Ensval.c Eofcoeff.c Eofcoeff3d.c Exprf.c \
FC.c Filedes.c Fillmiss.c Filter.c Fldrms.c Fldstat.c \
Fldstat2.c Fourier.c Gather.c Gengrid.c Gradsdes.c \
Gridboxstat.c Gridcell.c Harmonic.c Hi.c Histogram.c \
Importamsr.c Importbinary.c Importcmsaf.c Importobs.c Info.c \
Input.c Intgrid.c Intgridtraj.c Intlevel.c Intlevel3d.c \
Intntime.c Inttime.c Intyear.c Invert.c Invertlev.c \
Isosurface.c Kvl.c Log.c Maskbox.c Mastrfu.c Math.c Merge.c \
Mergegrid.c Mergetime.c Merstat.c Monarith.c Mrotuv.c \
Mrotuvb.c Ninfo.c Nmltest.c Output.c Outputgmt.c Pack.c \
Pinfo.c Pressure.c Regres.c Remap.c Remapeta.c Replace.c \
Replacevalues.c Rhopot.c Rotuv.c Runpctl.c Runstat.c Scatter.c \
Seascount.c Seaspctl.c Seasstat.c Selbox.c Select.c \
Gridboxstat.c Gridcell.c Gridsearch.c Harmonic.c Hi.c \
Histogram.c Importamsr.c Importbinary.c Importcmsaf.c \
Importobs.c Info.c Input.c Intgrid.c Intgridtraj.c Intlevel.c \
Intlevel3d.c Intntime.c Inttime.c Intyear.c Invert.c \
Invertlev.c Isosurface.c Kvl.c Log.c Maskbox.c Mastrfu.c \
Math.c Merge.c Mergegrid.c Mergetime.c Merstat.c Monarith.c \
Mrotuv.c Mrotuvb.c Ninfo.c Nmltest.c Output.c Outputgmt.c \
Pack.c Pinfo.c Pressure.c Regres.c Remap.c Remapeta.c \
Replace.c Replacevalues.c Rhopot.c Rotuv.c Runpctl.c Runstat.c \
Scatter.c Seascount.c Seaspctl.c Seasstat.c Selbox.c Select.c \
Seloperator.c Selrec.c Seltime.c Selvar.c Set.c Setbox.c \
Setgatt.c Setgrid.c Sethalo.c Setmiss.c Setpartab.c \
Setrcaname.c Settime.c Setzaxis.c Showinfo.c Sinfo.c Smooth9.c \
......@@ -212,20 +212,21 @@ am_cdo_OBJECTS = cdo-cdo.$(OBJEXT) cdo-Adisit.$(OBJEXT) \
cdo-Fourier.$(OBJEXT) cdo-Gather.$(OBJEXT) \
cdo-Gengrid.$(OBJEXT) cdo-Gradsdes.$(OBJEXT) \
cdo-Gridboxstat.$(OBJEXT) cdo-Gridcell.$(OBJEXT) \
cdo-Harmonic.$(OBJEXT) cdo-Hi.$(OBJEXT) \
cdo-Histogram.$(OBJEXT) cdo-Importamsr.$(OBJEXT) \
cdo-Importbinary.$(OBJEXT) cdo-Importcmsaf.$(OBJEXT) \
cdo-Importobs.$(OBJEXT) cdo-Info.$(OBJEXT) cdo-Input.$(OBJEXT) \
cdo-Intgrid.$(OBJEXT) cdo-Intgridtraj.$(OBJEXT) \
cdo-Intlevel.$(OBJEXT) cdo-Intlevel3d.$(OBJEXT) \
cdo-Intntime.$(OBJEXT) cdo-Inttime.$(OBJEXT) \
cdo-Intyear.$(OBJEXT) cdo-Invert.$(OBJEXT) \
cdo-Invertlev.$(OBJEXT) cdo-Isosurface.$(OBJEXT) \
cdo-Kvl.$(OBJEXT) cdo-Log.$(OBJEXT) cdo-Maskbox.$(OBJEXT) \
cdo-Mastrfu.$(OBJEXT) cdo-Math.$(OBJEXT) cdo-Merge.$(OBJEXT) \
cdo-Mergegrid.$(OBJEXT) cdo-Mergetime.$(OBJEXT) \
cdo-Merstat.$(OBJEXT) cdo-Monarith.$(OBJEXT) \
cdo-Mrotuv.$(OBJEXT) cdo-Mrotuvb.$(OBJEXT) cdo-Ninfo.$(OBJEXT) \
cdo-Gridsearch.$(OBJEXT) cdo-Harmonic.$(OBJEXT) \
cdo-Hi.$(OBJEXT) cdo-Histogram.$(OBJEXT) \
cdo-Importamsr.$(OBJEXT) cdo-Importbinary.$(OBJEXT) \
cdo-Importcmsaf.$(OBJEXT) cdo-Importobs.$(OBJEXT) \
cdo-Info.$(OBJEXT) cdo-Input.$(OBJEXT) cdo-Intgrid.$(OBJEXT) \
cdo-Intgridtraj.$(OBJEXT) cdo-Intlevel.$(OBJEXT) \
cdo-Intlevel3d.$(OBJEXT) cdo-Intntime.$(OBJEXT) \
cdo-Inttime.$(OBJEXT) cdo-Intyear.$(OBJEXT) \
cdo-Invert.$(OBJEXT) cdo-Invertlev.$(OBJEXT) \
cdo-Isosurface.$(OBJEXT) cdo-Kvl.$(OBJEXT) cdo-Log.$(OBJEXT) \
cdo-Maskbox.$(OBJEXT) cdo-Mastrfu.$(OBJEXT) cdo-Math.$(OBJEXT) \
cdo-Merge.$(OBJEXT) cdo-Mergegrid.$(OBJEXT) \
cdo-Mergetime.$(OBJEXT) cdo-Merstat.$(OBJEXT) \
cdo-Monarith.$(OBJEXT) cdo-Mrotuv.$(OBJEXT) \
cdo-Mrotuvb.$(OBJEXT) cdo-Ninfo.$(OBJEXT) \
cdo-Nmltest.$(OBJEXT) cdo-Output.$(OBJEXT) \
cdo-Outputgmt.$(OBJEXT) cdo-Pack.$(OBJEXT) cdo-Pinfo.$(OBJEXT) \
cdo-Pressure.$(OBJEXT) cdo-Regres.$(OBJEXT) \
......@@ -568,15 +569,15 @@ cdo_SOURCES = cdo.c Adisit.c Arith.c Arithc.c Arithdays.c Arithlat.c \
Ensval.c Eofcoeff.c Eofcoeff3d.c Exprf.c FC.c Filedes.c \
Fillmiss.c Filter.c Fldrms.c Fldstat.c Fldstat2.c Fourier.c \
Gather.c Gengrid.c Gradsdes.c Gridboxstat.c Gridcell.c \
Harmonic.c Hi.c Histogram.c Importamsr.c Importbinary.c \
Importcmsaf.c Importobs.c Info.c Input.c Intgrid.c \
Intgridtraj.c Intlevel.c Intlevel3d.c Intntime.c Inttime.c \
Intyear.c Invert.c Invertlev.c Isosurface.c Kvl.c Log.c \
Maskbox.c Mastrfu.c Math.c Merge.c Mergegrid.c Mergetime.c \
Merstat.c Monarith.c Mrotuv.c Mrotuvb.c Ninfo.c Nmltest.c \
Output.c Outputgmt.c Pack.c Pinfo.c Pressure.c Regres.c \
Remap.c Remapeta.c Replace.c Replacevalues.c Rhopot.c Rotuv.c \
Runpctl.c Runstat.c Scatter.c Seascount.c Seaspctl.c \
Gridsearch.c Harmonic.c Hi.c Histogram.c Importamsr.c \
Importbinary.c Importcmsaf.c Importobs.c Info.c Input.c \
Intgrid.c Intgridtraj.c Intlevel.c Intlevel3d.c Intntime.c \
Inttime.c Intyear.c Invert.c Invertlev.c Isosurface.c Kvl.c \
Log.c Maskbox.c Mastrfu.c Math.c Merge.c Mergegrid.c \
Mergetime.c Merstat.c Monarith.c Mrotuv.c Mrotuvb.c Ninfo.c \
Nmltest.c Output.c Outputgmt.c Pack.c Pinfo.c Pressure.c \
Regres.c Remap.c Remapeta.c Replace.c Replacevalues.c Rhopot.c \
Rotuv.c Runpctl.c Runstat.c Scatter.c Seascount.c Seaspctl.c \
Seasstat.c Selbox.c Select.c Seloperator.c Selrec.c Seltime.c \
Selvar.c Set.c Setbox.c Setgatt.c Setgrid.c Sethalo.c \
Setmiss.c Setpartab.c Setrcaname.c Settime.c Setzaxis.c \
......@@ -832,6 +833,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Gradsdes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Gridboxstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Gridcell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Gridsearch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Harmonic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Hi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdo-Histogram.Po@am__quote@
......@@ -1798,6 +1800,20 @@ cdo-Gridcell.obj: Gridcell.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridcell.obj `if test -f 'Gridcell.c'; then $(CYGPATH_W) 'Gridcell.c'; else $(CYGPATH_W) '$(srcdir)/Gridcell.c'; fi`
cdo-Gridsearch.o: Gridsearch.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridsearch.o -MD -MP -MF $(DEPDIR)/cdo-Gridsearch.Tpo -c -o cdo-Gridsearch.o `test -f 'Gridsearch.c' || echo '$(srcdir)/'`Gridsearch.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gridsearch.Tpo $(DEPDIR)/cdo-Gridsearch.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Gridsearch.c' object='cdo-Gridsearch.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridsearch.o `test -f 'Gridsearch.c' || echo '$(srcdir)/'`Gridsearch.c
cdo-Gridsearch.obj: Gridsearch.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Gridsearch.obj -MD -MP -MF $(DEPDIR)/cdo-Gridsearch.Tpo -c -o cdo-Gridsearch.obj `if test -f 'Gridsearch.c'; then $(CYGPATH_W) 'Gridsearch.c'; else $(CYGPATH_W) '$(srcdir)/Gridsearch.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Gridsearch.Tpo $(DEPDIR)/cdo-Gridsearch.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Gridsearch.c' object='cdo-Gridsearch.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdo-Gridsearch.obj `if test -f 'Gridsearch.c'; then $(CYGPATH_W) 'Gridsearch.c'; else $(CYGPATH_W) '$(srcdir)/Gridsearch.c'; fi`
cdo-Harmonic.o: Harmonic.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdo-Harmonic.o -MD -MP -MF $(DEPDIR)/cdo-Harmonic.Tpo -c -o cdo-Harmonic.o `test -f 'Harmonic.c' || echo '$(srcdir)/'`Harmonic.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cdo-Harmonic.Tpo $(DEPDIR)/cdo-Harmonic.Po
......
......@@ -92,6 +92,7 @@ void *Gengrid(void *argument);
void *Gradsdes(void *argument);
void *Gridboxstat(void *argument);
void *Gridcell(void *argument);
void *Gridsearch(void *argument);
void *Harmonic(void *argument);
void *Histogram(void *argument);
void *Importamsr(void *argument);
......@@ -324,6 +325,7 @@ void *Maggraph(void *argument);
#define GradsdesOperators {"gradsdes", "dumpmap"}
#define GridboxstatOperators {"gridboxmin", "gridboxmax", "gridboxsum", "gridboxmean", "gridboxavg", "gridboxvar", "gridboxstd"}
#define GridcellOperators {"gridarea", "gridweights", "gridmask", "griddx", "griddy"}
#define GridsearchOperators {"testpointsearch", "testcellsearch"}
#define HarmonicOperators {"harmonic"}
#define HistogramOperators {"histcount", "histsum", "histmean", "histfreq"}
#define ImportamsrOperators {"import_amsr"}
......@@ -591,6 +593,7 @@ static modules_t Modules[] =
{ Gradsdes, GradsdesHelp, GradsdesOperators, CDI_REAL, 1, 0 },
{ Gridboxstat, GridboxstatHelp, GridboxstatOperators, CDI_REAL, 1, 1 },
{ Gridcell, GridcellHelp, GridcellOperators, CDI_REAL, 1, 1 },
{ Gridsearch, NULL, GridsearchOperators, CDI_REAL, 0, 0 },
{ Harmonic, NULL, HarmonicOperators, CDI_REAL, 1, 1 },
{ Histogram, HistogramHelp, HistogramOperators, CDI_REAL, 1, 1 },
{ Importamsr, ImportamsrHelp, ImportamsrOperators, CDI_REAL, 1, 1 },
......
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