MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mio::ProcAdd Class Reference

Detailed Description

Add an offset to the values. This adds to all values a given offset. Either a fixed value is given as single argument or a period (hourly/daily/monthly) as well as a filename (and absolute or relative path) containing the offsets to apply. This file must contain in the first column the indices (months from 1 to 12 or days from 1 to 366 or hours from 0 to 23) and the matching offset in the second column (whitespace delimited). Comments following the same syntax as in the ini file are accepted, missing indices are treated as 0.

Author
Mathias Bavay
Date
2012-02-06
TA::filter1 = add
TA::arg1 = 2.5
TSG::filter1 = add
TSG::arg1 = daily input/TSG_corr.dat

Example of correction file (monthly correction, December will receive a correction of 0):

01 -0.375
02 -1.932
03 -4.304
04 -2.449
05 -1.629
06 -1.734
07 -2.414
09 -1.289
10 -1.086
11 -0.769

#include <ProcAdd.h>

Public Member Functions

 ProcAdd (const std::vector< std::string > &vec_args, const std::string &name, const std::string &i_root_path)
 
virtual void process (const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
 
- Public Member Functions inherited from mio::ProcessingBlock
virtual ~ProcessingBlock ()
 
std::string getName () const
 
const ProcessingPropertiesgetProperties () const
 
const std::string toString () const
 

Static Protected Member Functions

static void readCorrections (const std::string &filter, const std::string &filename, const char &c_type, std::vector< double > &corrections)
 
- Static Protected Member Functions inherited from mio::ProcessingBlock
static bool is_soft (std::vector< std::string > &vec_args)
 
static void readCorrections (const std::string &filter, const std::string &filename, const char &c_type, const double &init, std::vector< double > &corrections)
 

Additional Inherited Members

- Protected Member Functions inherited from mio::ProcessingBlock
 ProcessingBlock (const std::string &name)
 protected constructor only to be called by children More...
 
void convert_args (const size_t &min_nargs, const size_t &max_nargs, const std::vector< std::string > &vec_args, std::vector< double > &dbl_args) const
 
- Protected Attributes inherited from mio::ProcessingBlock
ProcessingProperties properties
 
const std::string block_name
 
- Static Protected Attributes inherited from mio::ProcessingBlock
static const double soil_albedo = .23
 
static const double snow_albedo = .85
 
static const double snow_thresh = .1
 parametrize the albedo from HS More...
 

Constructor & Destructor Documentation

mio::ProcAdd::ProcAdd ( const std::vector< std::string > &  vec_args,
const std::string &  name,
const std::string &  i_root_path 
)

Member Function Documentation

void mio::ProcAdd::process ( const unsigned int &  param,
const std::vector< MeteoData > &  ivec,
std::vector< MeteoData > &  ovec 
)
virtual

Implements mio::ProcessingBlock.

static void mio::ProcAdd::readCorrections ( const std::string &  filter,
const std::string &  filename,
const char &  c_type,
std::vector< double > &  corrections 
)
staticprotected

The documentation for this class was generated from the following files: