Commit 0f30a9ff authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

removed util includes where possible, moved macros from util into cdo_int.h, added cdo_int.cc

parent 391abc97
......@@ -44,6 +44,7 @@
#include "constants.h"
#include "compare.h"
#include "cdo_options.h"
#include "text.h"
#ifdef _OPENMP
#include <omp.h>
......
......@@ -27,6 +27,7 @@
#include "pstream_int.h"
#include "cdo_options.h"
#include "datetime.h"
#include "cimdOmp.h"
#define NALLOC_INC 1024
......
......@@ -40,6 +40,7 @@
#include "percentiles.h"
#include "cdo_options.h"
#include "util_files.h"
#include "cimdOmp.h"
struct ens_file_t
{
......
......@@ -29,6 +29,7 @@
#include "pstream_int.h"
#include "cdo_options.h"
#include "util_files.h"
#include "cimdOmp.h"
// Defines for rank histogram
enum TDATA_TYPE
......
......@@ -29,6 +29,7 @@
#include "pstream_int.h"
#include "grid.h"
#include "cdo_cdiWrapper.h"
#include "util.h"
void cdo_print_zaxis(int zaxisID);
......
......@@ -30,6 +30,7 @@
#include "grid_point_search.h"
#include "cdo_options.h"
#include "progress.h"
#include "cimdOmp.h"
void
fillmiss(Field *field1, Field *field2, int nfill)
......
......@@ -35,6 +35,7 @@
#include "pstream_int.h"
#include "cdo_options.h"
#include "datetime.h"
#include "cimdOmp.h"
#ifdef HAVE_LIBFFTW3
#include <fftw3.h>
......
......@@ -22,6 +22,7 @@
#include "pstream_int.h"
#include "statistic.h"
#include "cdo_options.h"
#include "cimdOmp.h"
#define NALLOC_INC 1024
......
......@@ -38,6 +38,7 @@
#include "grid.h"
#include "cdo_options.h"
#include "progress.h"
#include "cimdOmp.h"
static void
genBoxGridReg2D(int gridID1, size_t xinc, size_t yinc, int gridID2)
......
......@@ -4,6 +4,7 @@ libcdo_la_SOURCES = \
array.h \
array.cc \
cdo_int.h \
cdo_int.cc \
cdo_cmor.h \
cdo_wtime.h \
compare.h \
......
......@@ -25,6 +25,7 @@
#include "cdo_int.h"
#include "parse_literals.h"
#include "pmlist.h"
#include "util.h"
static void
printValues(const int nvalues, const std::vector<std::string> &values)
......
......@@ -232,7 +232,6 @@ static bool lextrapolate = false;
int max_remaps = -1;
int sort_mode = HEAP_SORT;
double remap_frac_min = 0;
bool REMAP_genweights = true;
static void
remapGetenv(void)
......@@ -388,13 +387,13 @@ remapGetenv(void)
if (*envstr)
{
if (memcmp(envstr, "ON", 2) == 0 || memcmp(envstr, "on", 2) == 0)
REMAP_genweights = true;
Options::REMAP_genweights = true;
else if (memcmp(envstr, "OFF", 3) == 0 || memcmp(envstr, "off", 3) == 0)
REMAP_genweights = false;
Options::REMAP_genweights = false;
else
cdoWarning("Environment variable CDO_REMAP_GENWEIGHTS has wrong value!");
if (Options::cdoVerbose) cdoPrint("Generation of weights %s!", REMAP_genweights ? "enabled" : "disabled");
if (Options::cdoVerbose) cdoPrint("Generation of weights %s!", Options::REMAP_genweights ? "enabled" : "disabled");
}
}
}
......@@ -800,7 +799,7 @@ Remap(void *argument)
{
RemapMethod mapType(RemapMethod::UNDEF);
SubmapType submapType(SubmapType::NONE);
bool remap_genweights = REMAP_genweights;
bool remap_genweights = Options::REMAP_genweights;
int streamID2 = -1;
int nrecs;
int varID, levelID;
......
......@@ -29,7 +29,7 @@
#include "pstream_int.h"
#include "cdi_uuid.h"
#include "util.h"
#include "printinfo.h"
#include "text.h"
#include "cdo_options.h"
......
......@@ -32,6 +32,7 @@
#include "pmlist.h"
#include "cdo_options.h"
#include "progress.h"
#include "cimdOmp.h"
#include "grid_point_search.h"
......
......@@ -26,6 +26,7 @@
#include "cdo_int.h"
#include "pstream_int.h"
#include "cdo_options.h"
#include "cimdOmp.h"
#define NALLOC_INC 1024
......
......@@ -27,6 +27,7 @@
#include "param_conversion.h"
#include "pstream_int.h"
#include "cdo_options.h"
#include "cimdOmp.h"
#define NALLOC_INC 1024
......
......@@ -24,6 +24,7 @@
#include "cdo_int.h"
#include "cdo_options.h"
#include "cimdOmp.h"
#ifdef SX
#define NFFT 1024
......
......@@ -26,6 +26,7 @@
#include "cimdOmp.h"
#include "dmemory.h"
#include "constants.h"
#include "cimdOmp.h"
#define OPENMP4 201307
#if defined(_OPENMP) && defined(OPENMP4) && _OPENMP >= OPENMP4
......
......@@ -74,6 +74,7 @@
#include "exception.h"
#include "cdo_features.h"
#include "cdo_zaxis.h"
#include "util.h"
#ifdef _OPENMP
#include <omp.h>
......@@ -1238,7 +1239,7 @@ parse_options_long(int argc, char *argv[])
{
const int intarg = parameter2int(CDO_optarg);
if (intarg != 0 && intarg != 1) cdoAbort("Unsupported value for option --remap_genweights %d [0/1]", intarg);
REMAP_genweights = intarg;
Options::REMAP_genweights = intarg;
}
else if (lsortname)
{
......
......@@ -17,8 +17,9 @@
#include <string.h>
#include <assert.h>
#include <cstdio>
#include "cdo_getopt.h"
#include "util.h" // refactor: necessary for accessing global vars
// refactor: necessary for accessing global vars
static int CDO_optopt = 0;
static int CDO_optreset = 0; // TODO refactor: var without semantic effect
......
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