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

Namespaces

 Color
 
 Cst
 
 FileUtils
 
 IOUtils
 
 Optim
 

Classes

class  Config
 A class that reads a key/value file. These files (typically named *.ini) follow the INI file format standard (see http://en.wikipedia.org/wiki/INI_file) and have the following structure: More...
 
class  ConfigProxy
 
class  DataCreator
 A class to create new meteo data parameters from user-selected models or parametrizations. This class sits in between the actual implementation of the various methods and the IOManager in order to offer some high level interface. It basically reads the arguments and creates the objects for the various data generators in its constructor and loop through the parameters and stations when called. More...
 
class  DataGenerator
 A class to generate meteo data from user-selected models or parametrizations. This class sits in between the actual implementation of the various methods and the IOManager in order to offer some high level interface. It basically reads the arguments and creates the objects for the various data generators in its constructor and loop through the parameters and stations when called to fill the data. More...
 
class  Legend
 This creates a legend as pixels in a Grid2DObject. This should be used with/by a plugin that would then convert this Grid2DObject into a true graphic file (png, etc). More...
 
class  Gradient_model
 
class  Gradient
 This converts numeric values into rgb values. The object is initialized with the range that the gradient should cover and the gradient type. Then each numeric value that is given will be converted into rgb values from the selected gradient. Data out of range are converted to either the minimum or the maximum of the gradient. Special pixels should return a=true to indicate transparency (however, pure white is the transparency color, so do not use it in your gradients!). More...
 
class  gr_heat
 
class  gr_blue_pink
 
class  gr_freeze
 
class  gr_bluewhitered
 
class  gr_whitetoblk
 
class  gr_blktowhite
 
class  gr_blue
 
class  gr_bg_isomorphic
 
class  gr_terrain
 
class  gr_slope
 
class  gr_azi
 
class  gr_pastel
 
class  GridsManager
 
class  IOException
 The basic exception class adjusted for the needs of SLF software. More...
 
class  NotFoundException
 thrown when a there is an unsuccessful attempt to locate a file/server/... More...
 
class  AccessException
 thrown when a there are insufficient rights to access a file/server/... in a certain way (e.g. read, write) More...
 
class  InvalidNameException
 thrown when a given filename/servername/... is not valid (e.g. "..", "." or empty) More...
 
class  InvalidFormatException
 thrown when parsed data does not reflect an expected format (e.g. premature end of a line, file) More...
 
class  IndexOutOfBoundsException
 thrown when an index is out of bounds More...
 
class  ConversionFailedException
 thrown when an unsuccessful to convert data types/classes is made (e.g. attempt to convert a literal into a number) More...
 
class  InvalidArgumentException
 thrown when encountered an unexpected function's argument (e.g. bad index, bad or missing parameter name, etc.) More...
 
class  UnknownValueException
 thrown when encountered an unexpected value (e.g. unknown name or key) More...
 
class  NoDataException
 thrown when no data is available More...
 
class  IOHandler
 This class is the class to use for raw I/O operations. It is responsible for transparently loading the plugins and it follows the interface defined by the IOInterface class with the addition of a few convenience methods. More...
 
class  IOInterface
 A class representing the IO Layer of the software Alpine3D. For each type of IO (File, DB, Webservice, etc) a derived class is to be created that holds the specific implementation of the appropriate virtual methods. The IOHandler class is a wrapper class that is able to deal with all above implementations of the IOInterface abstract base class. More...
 
class  IOManager
 
class  Meteo1DInterpolator
 A class that can resample MeteoData objects. More...
 
class  Meteo2DInterpolator
 A class to spatially interpolate meteo parameters. For more, see Spatial interpolations. More...
 
class  MeteoProcessor
 A facade class that invokes the processing of the filters and the resampling. More...
 
class  ResamplingAlgorithms2D
 Spatial resampling algorithms. More...
 
class  Timer
 Time code execution with at least 1 us resolution. The time resolution can be stored up to .1 ns resolution, but is measured to the following accuracy: More...
 
class  UsageTimer
 Process usage timer for Posix This is based on getrusage and thus returns detailed timing information about how the time was spend (userland, system time). More...
 
class  TimeSeriesManager
 
class  Array1D
 The template class Array1D is a 1D array (vector) able to hold any type of object as datatype. If the compilation flag NOSAFECHECKS is used, bounds check is turned off (leading to increased performances). More...
 
class  Array2D
 The template class Array2D is a 2D Array (Matrix) able to hold any type of object as datatype. It relies on the Array2DProxy class to provide the [][] operator (slower than the (i,j) call). If the compilation flag NOSAFECHECKS is used, bounds check is turned off (leading to increased performances). More...
 
class  Array2DProxy
 The template class Array2DProxy is a helper class for the template class Array2D with the purpose of adding the [][] operator to Array2D.
 
class  Array3D
 The template class Array3D is a 3D Array (Tensor) able to hold any type of object as datatype. It relies on the Array3DProxy2 class to provide the [][][] operator (slower than the (i,j,k) call). If the compilation flag NOSAFECHECKS is used, bounds check is turned off (leading to increased performances). More...
 
class  Array3DProxy2
 The template class Array3DProxy2 is a helper class for the template class Array3D with the purpose of adding the [][][] operator to Array3D.
 
class  Array3DProxy
 The template class Array3DProxy is a helper class for the template class Array3D with the purpose of adding the [][] operator to Array3D.
 
class  Array4D
 The template class Array4D is a 4D Array (Tensor) able to hold any type of object as datatype. More...
 
class  MeteoBuffer
 A class to buffer meteorological data. This class buffers MeteoData objects. It is currently NOT a proper ring buffer, this should come in a later implementation. More...
 
class  GridBuffer
 A class to buffer gridded data. This class buffers Grid2D objects. It implements a proper ring buffer, thus removing old bufered grids when necessary. More...
 
class  Coords
 A class to handle geographic coordinate systems. This class offers an easy way to transparently convert between various coordinate systems. For any given object, as soon as a latitude/longitude can be computed/read, it will be used as a reference. This means that every subsequent change of projection system or read will be the conversion of this reference lat/lon position (until a new "set" is called). See Coords::setProj for the supported coordinate systems. More...
 
class  CoordsAlgorithms
 A static class to handle geographic algorithms. This class offers methods to handle lat/lon coordinates, to transform lat/lon coordinates, to compute distances on a sphere or to convert between coordinate systems. More...
 
class  Date
 A class to handle timestamps. This class handles conversion between different time display formats (ISO, numeric) as well as different time representation (julian date, modified julian date, etc). It also handles time zones as well as very basic Daylight Saving Time (DST). Since the activation dates of DST are political and not technical, it can not be automatically calculated. Therefore, it has to be provided by the caller: when the dst flag is set, the dst time shift is automatically applied. When the dst flag ceases to be set, the dst time shift is no longer applied. This is very crude, but please keep in mind that using DST for monitoring data is usually a bad idea... Finally, we assume that dates are positive. If this would not be the case, this class has to be recompiled with the proper define. More...
 
class  DEMObject
 A class to represent DEMs and automatically compute some properties. This class stores elevation grids and their georeferencing, expressed as the lower-left coordinates, the cellsize (cells are assumed to be square) and a nodata code for potentially empty cells (The nodata parameter is supposed to be IOUtils::nodata). This class also automatically computes local slope, azimuth, curvature, normals and minimal/maximal for normalization. Various algorithms are available to compute these properties (see mio::DEMObject::slope_type) and it is possible to toggle between automatic refresh or not. Several other DEM related values can be computed, such as the horizon, displacements within the DEM, etc. More...
 
class  Grid2DObject
 A class to represent 2D Grids. Typical application as DEM or Landuse Model. More...
 
class  Grid3DObject
 A class to represent 3D Grids. Typical application: wind field. More...
 
class  Matrix
 This class implements the basic operations on matrices. Elements are access in matrix notation: that is A(1,2) represents the second element of the first line. Index go from 1 to nrows/ncols. More...
 
class  MeteoGrids
 A class to represent the meteorological parameters that could be contained in a grid. This should be very close to MeteoData with a few additions (like the wind u,v,w) More...
 
class  MeteoData
 A class to represent a singular measurement received from one station at a certain time (represented by the Date object) More...
 
class  StationData
 A class to represent meteo stations with attributes like longitude, latitude, etc. More...
 
class  AllSkyLWGenerator
 ILWR all sky parametrization Using air temperature (TA) and relative humidity (RH) and optionnally cloud transmissivity (TAU_CLD), this offers the choice of several all-sky parametrizations: More...
 
class  AllSkySWGenerator
 ISWR all sky parametrization. More...
 
class  ClearSkyLWGenerator
 ILWR clear sky parametrization Using air temperature (TA) and relative humidity (RH), this offers the choice of several clear sky parametrizations: More...
 
class  ClearSkySWGenerator
 ISWR clear sky parametrization. More...
 
class  ConstGenerator
 Constant value generator. Generate a constant value for this parameter, as provided in argument (please remember that it must be in SI units). More...
 
class  ESOLIPGenerator
 Generate precipitation from changes in snow height. This implements the approach laid out in Mair et al., "ESOLIP–estimate of solid and liquid precipitation at sub-daily time resolution by combining snow height and rain gauge measurements", Hydrology and Earth System Sciences Discussions, 10(7), 8683-8714, 2013. or Mair E., Leitinger G., Della Chiesa S., Niedrist G., Tappeiner U., Bertoldi G., "A simple method to combine snow height and meteorological observations to estimate winter precipitation at sub-daily resolution", Journal of Hydrological Sciences, in revision, 2015. The snow density relies on Zwart, "Significance of new-snow properties for snowcover development",master's thesis, Institute for Marine and Atmospheric Research, University of Utrecht, 78 pp, 2007. More...
 
class  GeneratorAlgorithm
 Interface class for the generator models. These models generate data for a specific parameter when all other options failed (the resampling could not help). Therefore, there is nothing more that could be done with the temporal history of the data, we have to use a totally different approach: either generic data (constant value, etc) or generate the data from other meteorological parameters (relying on a parametrization, like clear sky for ILWR). More...
 
class  GeneratorAlgorithmFactory
 
class  IswrAlbedoGenerator
 Incoming or reflected short wave generator. Generate the incoming short wave radiation from the reflected short wave radiation or the opposite. The albedo ie either a grassy soil albedo or a snow albedo depending on the snow height. If no snow height is available, the generator will simply return unless the "FORCE" argument is provided. More...
 
class  PPhaseGenerator
 Generate precipitation splitting according to the selected method The methods that are offered are currently the following: More...
 
class  RhGenerator
 Relative humidity generator. Generate the relative humidity from either dew point temperature or specific humidity and air temperature. The dew point temperature must be named "TD" and the specific humidity "SH". More...
 
class  SinGenerator
 Sinusoid generator. Generate a sinusoidal variation for this parameter, as provided in argument (please remember that it must be in SI units). The arguments that must be provided are the following: the sinusoidal period (either "yearly" or "daily"), the minimum value, the maximum value and the offset specifying when the minimum value should be reached, within one period (expressed as fraction of such period). The example below generates a yearly sinusoidal variation for the air temperature, the minimum being 268.26 K and occuring at 1/12 of the period (which practically means, at the end of the first month). More...
 
class  StandardPressureGenerator
 Standard atmospheric pressure generator. Generate a standard atmosphere's pressure, depending on the local elevation. More...
 
class  TauCLDGenerator
 Atmospheric transmissivity generator. Generate the atmospheric transmissivity (or clearness index, see meteoparam) from other parameters. If a parameter named "CLD" is available, it will be interpreted as cloud cover / cloudiness: in okta between 0 (fully clear) and 8 (fully cloudy). For synop reports, it is possible to include a value of exactly 9 (sky obstructed from view by fog, heavy precipitation...) that will be transparently reset to 8 (fully cloudy). More...
 
class  TsGenerator
 Surface temperature generator. Generate the surface temperature from the outgoing long wave (OLWR). More...
 
class  A3DIO
 
class  ALPUG
 This plugin reads data as they come out of ALPUG stations, in ASCII. More...
 
class  ARCIO
 This class enables the access to 2D grids stored in ESRI ASCII (ARCGIS) format. More...
 
class  ARPSIO
 This class enables the access to 2D grids stored in ARPS format. More...
 
class  BormaIO
 This class enables the access meteo data in Borma's XML format. More...
 
class  CNRMIO
 This plug-in allows reading and writing of NetCDF files formatted according to CNRM standard. More...
 
class  CosmoXMLIO
 Reading of FieldExtra XML meteorological data. This is the plugin for reading the XML data generated by FieldExtra, the post-processor of the MeteoSwiss COSMO meteorological model. More...
 
class  DBO
 This class enables the access to the DBO RESTful web service. More...
 
class  GeotopIO
 This class enables the access meteo data in legacy Geotop format. More...
 
class  GrassIO
 This class enables the access to 2D grids stored in GRASS ASCII (e.g. JGrass) format. More...
 
class  GRIBIO
 This plugin reads GRIB 1 or 2 data files. More...
 
class  GSNIO
 This class enables the access to the GSN RESTful web service. More...
 
class  AnetzData
 
class  ImisIO
 The class with-in the data from the database are treated. The MeteoData and the StationData will be set in. This class also herited to IOInterface class which is abstract. More...
 
struct  sort_pred
 
class  NetCDFIO
 This plug-in allows reading and writing of NetCDF files formatted according to CNRM standard. More...
 
class  OshdIO
 This plugin reads Matlab binary files, relying on the MatIO library. More...
 
class  PGMIO
 This class writes 2D grids as Portable Grey Map file format. More...
 
class  PNGIO
 This plugin write 2D grids as PNG images. More...
 
class  PSQLIO
 This plugin connects to a generic PostgreSQL server to retrieve its meteorological data. More...
 
class  SASEIO
 This is the plugin required to get meteorological data from the SASE database. More...
 
class  SMETIO
 Reads meteo data in the SMET ASCII or binary format. More...
 
class  SNIO
 This class enables the access to meteo data stored in SNOWPACK format. More...
 
class  Atmosphere
 A class to calculate the atmosphere's parameters. More...
 
class  SunObject
 A class to calculate Solar radiation characteristics This is largely based on M. Iqbal, "An introduction to solar radiation", 1983, Academic Press, ISBN: 0-12-373750-8. The Sun's position is provided by the SunTrajectory class (currently the only implemented algorithm is Meeus). All units are SI. See http://www.meteoexploration.com/products/solarcalc.php for a validation calculator. More...
 
class  SunTrajectory
 A class to calculate the Sun's position This class is purely virtual. More...
 
class  SunMeeus
 Calculate the Sun's position based on the Meeus algorithm. See J. Meeus, "Astronomical Algorithms", 1998, 2nd ed, Willmann-Bell, Inc., Richmond, VA, USA, ISBN 0-943396-61-1. A useful reference is also NOAA's spreadsheet at http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html or http://energyworksus.com/solar_installation_position.html for comparing positional data. The technical report I. Reda, A. Andreas, "Solar Position Algorithm for Solar Radiation Applications", 2008, NREL/TP-560-34302 also contains an alternative algorithm and very detailed validation data sets. More...
 
class  FilterBlock
 An abstract class. More...
 
class  FilterDeGrass
 This filter is used to distinguish if snow (HS) is on the ground or not, because the ultrasonic sensor cannot distinguish between snow or vegetation/grass on the ground. The filter is based on total snow depth (HS), snow surface temperature (TSS), ground surface temperature (TSG) and reflected shortwave radiation (RSWR). Different steps to do:

  1. calculate possible offset of TSS (raison: at some stations in some springs the TSS increases although snow is still on the ground)
  2. calculate correlation of TSS and TSG in spring (normally both temperatures increase at the same time in spring which results in a high correlation; low correlation if TSS and TSG increase not parallel which leads in connection with a high offset of TSS to the assumption, that TSS is false), then:
    1. if TSS has a low offset and the correlation between TSS and TSG is high, the algorithm analyses based on the daily Max/Min/Mean of TSS if snow is on the ground or not
    2. if no TSS is available or the offset of TSS is high/correlation of TSS and TSG is low, the algorithm analyses based on the variance of TSG and the value of TSG if snow is on the ground or not.
More...
 
class  FilterMAD
 Median Absolute Deviation. Values outside of median ± 3 σ_MAD are rejected. The σ_MAD is calculated as follows:

$ \sigma_{MAD} = K \cdot \mathop{median_i} \left( \left| X_i - \mathop{median_j} ( X_j ) \right| \right) $ with $ K = \Phi^{-1}; \Phi = 0.6745 $


See http://en.wikipedia.org/wiki/Median_absolute_deviation for more information about the Mean Absolute Deviation. Examples for the io.ini file: More...

 
class  FilterMax
 Max range filter. Reject all values greater than the max. Remarks: More...
 
class  FilterMin
 Min range filter. Reject all values smaller than the min. Remarks: More...
 
class  FilterMinMax
 Min/Max range filter. More...
 
class  FilterNoChange
 This filter removes periods showing insufficient changes. It searches for time periods in which the value of the certain variable doesn't change by looking at the variance. It expects the following arguments, in order to define the data window where the variance will be computed: More...
 
class  FilterOffsetsnowdepth
 Correct offset of snow depth (HS) measurements because of wrong offset justifications of the sensor First, the mean daily snow surface temperature (SST) is calculated. If it is higher than a given threshold for a certain time period, the offset of snow depth (HS) can be determined. The offset of HS is the median of the measured HS in the certain time period. This is done for the first and last week of the year with SST higher the chosen threshold. That means that normally one offset is calculated in spring and one offset in autumn. More...
 
class  FilterPotentialSW
 Checks for physically reallistic incoming short wave radiation (ISWR) values. For each data point, the measured value must be: More...
 
class  FilterRate
 Rate of change filter. Calculate the change rate (ie: slope) between two points, if it is above a user given value, reject the point. More...
 
class  FilterStdDev
 Standard deviation filter. Values outside of mean ± 2 std_dev are rejected. More...
 
class  FilterSuppr
 Suppression filter. Normally, this filter simply reject all values. This is convenient to quickly turn a parameter off without modifying the original data. It is also possible to provide a list of station ID's and timesteps where the parameter should be suppressed. More...
 
class  FilterTimeconsistency
 Compare sum of differences between snow depth (HS) value and HS value before and HS value afterwards, respectively, with 4 times of the standard deviation of HS in a defined time period (something like MAD) First, the standard deviation of HS is calculated for a certain time period. Afterwards, the difference between the value and the value before and the difference between the value and the following value are calculated. Then, the sum of the two differences is calculated and compared with 4 times of the standard deviation. Is the sum lower than the standard deviation, the HS value is accepted. Otherwise the HS value gets invalid. References/Literature: Zahumensky, Igor, 2004: Guidelines on Quality Control Procedures for Data from Automatic Weather Stations, World Meteorological Organisation. More...
 
class  FilterTukey
 Tukey 53H method A smooth time sequence is generated from the median, substracted from the original signal and compared with the standard deviation. see "Despiking Acoustic Doppler Velocimeter Data", Derek G. Goring and Vladimir L. Nikora, Journal of Hydraulic Engineering, 128, 1, 2002 The deviation factor coeffecient is currently hard-coded as k=1.5. More...
 
class  FilterUnheatedPSUM
 Filters out snow melting in an unheated rain gauge. This filter can ONLY be applied to precipitation. Non-zero measurements are accepted only if they take place when the relative humidity is greater than 0.5 and (TA-TSS) < 3, otherwise they get reset to 0. It can take two optional arguments overwriting these thresholds. If none of these conditions could be tested (for lack of data), then the precipitation is reset to nodata. On the contrary, if the "soft" option is given, the lack of validation data keeps the precipitation as it is. More...
 
class  ProcAdd
 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. More...
 
class  ProcAggregate
 Data aggregation. This aggregates the input data over the defined window with the defined aggregation algorithm. The aggregation algorithm must be declared first and can be any of the following: More...
 
class  ProcessingProperties
 
class  ProcessingBlock
 An abstract class. More...
 
class  BlockFactory
 
class  ProcessingStack
 
class  ProcExpSmoothing
 Exponential smoothing. This implements an exponential moving average smoothing of parameter alpha (https://en.wikipedia.org/wiki/Exponential_smoothing) such as (s being the filtered values and x the raw data): More...
 
class  ProcIIR
 Infinite Impulse Response (IIR) filter. This filter can either be used as a low pass or high pass filter. It is based on a Critically Damped, 2 poles filter (considering that it is better avoid overshooting even at the cost of a gentler falloff). It is possible to use it as a Low Pass (LP) or High Pass (HP) More...
 
class  ProcMult
 Multiply values. This multiplies all values by a given factor. 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 factors 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 factor in the second column (whitespace delimited). Comments following the same syntax as in the ini file are accepted, missing indices are treated as 1. More...
 
class  ProcNoise
 Generate a noise signal to modify the input. The noise signal is either added ("add") to the input or used as a fraction and multiplied by the input signal ("mult"). This filter always takes three arguments: a type specifying if the noise is added or multiplied, a distribution specifying the random numbers distribution and a range that is the scaling factor to apply. The following random distributions are supported: More...
 
class  ProcPSUMDistribute
 Distributes precipitation on the preceeding timesteps in a physically plausible way This assumes that the precipitation has been measured on intervals greater than the sampling interval of the data file (for example, 24 hours accumulations written once per day in an hourly file, the other timesteps receiving nodata). The accumulation has to be written on the last timestep of the accumulation period.

The measured accumulation period is provided as argument (in seconds). If using the "soft" argument, missing accumulated values would be replaced by "0". The precipitation is distributed on the preceeding timesteps by using criterias on relative humidity and the difference between the air temperature and the surface temperature. More...
 
class  ProcShade
 Apply a shading mask to the Incoming or Reflected Short Wave Radiation A shading mask that is either computed from the DEM or read from a separate file will be applied to the radiation and combined with the radiation splitting model in order to properly compute the shading effects on the measurement point. This mask will be linearly interpolated between the provided points in order to be applied to the true sun position. More...
 
class  ProcUndercatch_Forland
 Correct precipitation for undercatch in winter conditions. More...
 
class  ProcUndercatch_Hamon
 Correct precipitation for undercatch in winter conditions. More...
 
class  ProcUndercatch_WMO
 Correct precipitation for undercatch in winter conditions. More...
 
class  ProcUnventilatedT
 Filters and corrects temperatures from unventilated sensor. This either deletes all air temperature values when the wind speed is below a given threshold or corrects the air temperature data according to "Air Temperature Measurement Errors in Naturally Ventilated Radiation Shields", Reina Nakamura, L. Mahrt, J. Atmos. Oceanic Technol., 22, 2005, pp 1046–1058 with an albedo dependency as introduced in "Albedo effect on radiative errors in air temperature measurements", H. Huwald, C. W. Higgins, M.-O. Boldi, E. Bou-Zeid, M. Lehning, and M. B. Parlange, Water Resour. Res., 45, W08431, 2009. More...
 
class  ProcWMASmoothing
 Weighted moving average smoothing. This implements a weighted moving average smoothing (see http://en.wikipedia.org/wiki/Simple_moving_average#Weighted_moving_average) such as: More...
 
class  WindowedFilter
 
class  Accumulate
 Accumulation over a user given period. The input data is accumulated over a given time interval (given as filter argument, in seconds). This is for example needed for converting rain gauges measurements read every 10 minutes to hourly precipitation measurements. Remarks: More...
 
class  DailyAverage
 Generate daily variations of a given amplitude around a single daily average. The paremeter to be interpolated is assumed to be a daily average and a sinusoidal variation of the amplitude given as argument will be generated (it is also possible to provide the "phase" or the fraction of the day when the minimum is reached). If data bearing the same name followed by "_MIN" or "_MAX" exist, there is no need to provide an amplitude as they will be used instead (but if the amplitude is provided, it will be used as a fallback when no min or max is available). More...
 
class  Daily_solar
 Generate solar radiation out of daily sums. Daily sums of solar radiation (once, per day, any time during the day). Data provided at midnight is considered to belong to the day that just finished) are compared to the potential radiation, leading to an atmospheric loss factor. This loss factor is then applied to the potential solar radiation calculated at the requested time. When using this algorithm for RSWR, an albedo is required. A default value of 0.5 is used. If the snow height is available and greater than a 10cm threshold, a snow albedo is used. Below this threshold, a soil albedo is used. More...
 
class  LinearResampling
 Linear data resampling: If a point is requested that is in between two input data points, the requested value is automatically calculated using a linear interpolation. Furthermore if the argument extrapolate is provided there will be an attempt made to extrapolate the point if the interpolation fails, by solving the line equation y = kx + d The window size can be specified as argument but must appear in first position. More...
 
class  NearestNeighbour
 Nearest Neighbour data resampling Find the nearest neighbour of a desired data point that is not IOUtils::nodata and copy that value into the desired data point. More...
 
class  NoResampling
 No resampling: do not resample parameter but keep original sampling rate It is enabled either with the "none" or "no" key. More...
 
class  ResamplingAlgorithms
 Interface class for the temporal resampling algorithms These models generate data points that are missing based on neighbouring points in a time series. More...
 
class  ResamplingAlgorithmsFactory
 
class  Solar
 Interpolate solar radiation. The available solar radiation data is compared to the potential radiation, leading to atmospheric loss factors. At the point that has to be interpolated, the loss factor is linearly interpolated and applied to the potential radiation. When extrapolating the data as well as at the start/end of the day (ie when only one measured value is available), the available value is kept and applied (thus this behaves as a nearest neighbour on the atmospheric loss factor). More...
 
class  ALS_Interpolation
 Scale and distribute the precipitation according to Airborn Laser Scans (ALS) grids. This needs two arguments: first the base method to fill the grid (for example, idw_lapse) and then the name of the file (in GRID2DPATH) containing the gridded ALS data (relying on the GRID2D plugin). If there are some time steps when only one station provides the necessary parameter, the base method will automatically switch to "AVG". A third (optional) argument can be provided that is the air temperature threshold (in K) below which such redistribution occurs (so liquid precipitation is not redistributed). More...
 
class  AvgAlgorithm
 Average filling interpolation algorithm. Fill the grid with the average of the inputs for this parameter. More...
 
class  AvgLapseRateAlgorithm
 Average filling with elevation lapse rate interpolation algorithm. The grid is filled with the average of the detrended measured values and then re-trended. Or to put it differently, the following operations are performed: detrending - averaging - re-trending. The lapse rate is either calculated from the data (if no extra argument is provided), or given by the user-provided the optional argument "avg_lapse". If followed by "soft", then an attempt to calculate the lapse rate from the data is made, any only if unsuccessful, then user provided lapse rate is used as a fallback. If the optional user given lapse rate is followed by "frac", then the lapse rate is understood as a fractional lapse rate, that is a relative change of the value as a function of the elevation (for example, +0.05% per meters given as 0.0005). In this case, no attempt to calculate the fractional lapse from the data is made. More...
 
class  ConstAlgorithm
 Constant filling interpolation algorithm. Fill the grid with a user provided constant. More...
 
class  IDWAlgorithm
 Inverse Distance Weighting interpolation algorithm. Each cell receives the weighted average of the whole data set with weights being 1/r² (r being the distance of the current cell to the contributing station) and renormalized (so that the sum of the weights is equal to 1.0). More...
 
class  IDWLapseAlgorithm
 Inverse Distance Weighting interpolation algorithm with elevation detrending/reprojection. The input data is detrended and the residuals are spatially interpolated using an Inverse Distance Weighting interpolation algorithm (see IDWAlgorithm). Then, each value is reprojected to the real elevation of the relative cell (re-trending). The lapse rate is either calculated from the data (if no extra argument is provided), or given by the user-provided the optional argument "idw_lapse". If followed by "soft", then an attempt to calculate the lapse rate from the data is made, any only if unsuccessful or too bad (r^2<0.6), then the user provided lapse rate is used as a fallback. If the optional user given lapse rate is followed by "frac", then the lapse rate is understood as a fractional lapse rate, that is a relative change of the value as a function of the elevation (for example, +0.05% per meters given as 0.0005). In this case, no attempt to calculate the fractional lapse from the data is made. More...
 
class  LocalIDWLapseAlgorithm
 Inverse Distance Weighting interpolation algorithm with elevation detrending/reprojection. The closest n stations (n being given as an extra argument of "lidw_lapse") to each pixel are used to compute the local lapse rate, allowing to project the contributions of these n stations to the local pixel with an inverse distance weight. Beware, this method sometimes produces very sharp transitions as it spatially moves from one station's area of influence to another one! More...
 
class  ILWREpsAlgorithm
 Incoming Long Wave Radiation interpolation algorithm. Each ILWR is converted to an emissivity (using the local air temperature), interpolated using AVG_LAPSE or IDW_LAPSE with a fixed lapse rate and reconverted to ILWR. More...
 
class  InterpolationAlgorithm
 A class to perform 2D spatial interpolations. For more, see Spatial interpolations. More...
 
class  AlgorithmFactory
 
class  ListonWindAlgorithm
 Curvature/slope influenced wind interpolation algorithm. This is an implementation of the method described in G. E. Liston and K. Elder, "A meteorological distribution system for high-resolution terrestrial modeling (MicroMet)", Journal of Hydrometeorology, 7.2, 2006. The wind speed and direction are spatially interpolated using IDWLapseAlgorithm. Then, the wind speed and direction fields are altered by wind weighting factors and wind diverting factors (respectively) calculated from the local curvature and slope (as taken from the DEM, see DEMObject). The wind diverting factor is actually the same as in RyanAlgorithm. More...
 
class  NoneAlgorithm
 Returns a nodata filled grid This allows to tolerate missing data, which can be usefull if an alternate strategy could later be used to generate the data (ie. a parametrization). This algorithm will only run after all others failed. More...
 
class  OrdinaryKrigingAlgorithm
 Ordinary kriging. This implements ordinary krigging (see https://secure.wikimedia.org/wikipedia/en/wiki/Kriging) with user-selectable variogram model (see https://secure.wikimedia.org/wikipedia/en/wiki/Variogram). More details about the specific computation steps of kriging are provided in Interpol2D::ODKriging. More...
 
class  LapseOrdinaryKrigingAlgorithm
 Ordinary kriging with detrending. This is very similar to OrdinaryKrigingAlgorithm but performs detrending on the data. More...
 
class  PPHASEInterpolation
 Precipitation phase splitting generation This does not interpolate any measured precipitation phase but generates it for each point based on parametrizations, similarly to the PPHASE generator (see PPhaseGenerator). More...
 
class  RHListonAlgorithm
 Relative humidity interpolation algorithm. This is an implementation of the method described in (Liston & Elder, 2006): for each input point, the dew point temperature is calculated. Then, the dew point temperatures are spatially interpolated using IDWLapseAlgorithm (if only one station is available, no altitudinal trends will be applied). Finally, each local dew point temperature is converted back to a local relative humidity. More...
 
class  RyanAlgorithm
 DEM-based wind direction interpolation algorithm. This is an implementation of the method described in Ryan, "a mathematical model for diagnosis and prediction of surface winds in mountainous terrain", 1977, journal of applied meteorology, 16, 6. The DEM is used to compute wind drection changes that are used to alter the wind direction fields. More...
 
class  SnowPSUMInterpolation
 Precipitation distribution according to the local slope and curvature. The precipitation distribution is initialized using a specified algorithm (IDW_LAPSE by default, see IDWLapseAlgorithm). An optional parameter can be given to specify which algorithm has to be used for initializing the grid. Please do not forget to provide the arguments of the chosen algorithm itself if necessary! More...
 
class  StandardPressureAlgorithm
 Standard atmospheric pressure interpolation algorithm. This first fills the grid with the standard atmosphere's pressure, depending on the local elevation. Then, depending on the available data: More...
 
class  SWRadInterpolation
 Solar radiation interpolation with optional terrain shading. The splitting coefficients and an atmospheric losses factors are computed at each station that provides ISWR and spatially interpolated with an Inverse Distance Weighting scheme. Then the potential radiation is computed at each pixel and scaled appropriately with the atmospheric loss factor for this pixel. When applying topographic shading (default), the local splitting coefficient is used. The global, horizontal short wave radiation is then returned. To turn off the topographic shading, provide the "no_shading" argument. More...
 
class  USERInterpolation
 Reads user provided gridded data on the disk. The grids are all in the GRID2DPATH directory given in the [Input] section or in one of its sub-directories that is given as the algorithm's argument (optional). By default, the file extension is assumed to be ".asc" but it is possible to provide as second argument another file extension (then it is mandatory to also provide a sub-directory argument in first position). The files must be named according to the following schema: {numeric date with second resolution}_{capitalized meteo parameter}.{ext}, for example 20081201150000_TA.asc The meteo parameters can be found in MeteoData. Example of use: More...
 
class  WinstralAlgorithm
 DEM-based wind-exposure interpolation algorithm. This is an implementation of the method described in Winstral, Elder, & Davis, "Spatial snow modeling of wind-redistributed snow using terrain-based parameters", 2002, Journal of Hydrometeorology, 3(5), 524-538. The DEM is used to compute wind exposure factors that are used to alter the precipitation fields. It is usually a good idea to provide a DEM that also contain the accumulated snow height in order to get a progressive softening of the terrain features. More...
 
class  WinstralListonAlgorithm
 
class  Zero
 
class  SimpleLinear
 
class  NoisyLinear
 
class  SphericVario
 
class  LinVario
 
class  ExpVario
 
class  RatQuadVario
 
class  LinearLS
 
class  Quadratic
 
class  Fit1D
 A class to perform 1D regressions It works on a time serie and uses either ad-hoc methods or matrix arithmetic to perform an arbitrary fit. Currently, the following models are supported: More...
 
class  FitModel
 
class  FitLeastSquare
 A class to perform non-linear least square fitting. It works on a time serie and uses matrix arithmetic to perform an arbitrary fit (see http://mathworld.wolfram.com/NonlinearLeastSquaresFitting.html). More...
 
class  Interpol1D
 A class to perform basic 1D statistics. Each method is static. More...
 
class  Interpol2D
 A class to perform 2D spatial interpolations. Each parameter to be interpolated declares which interpolation method to use. Then the class computes the interpolation for each 2D grid point, combining the inputs provided by the available data sources. More...
 

Typedefs

typedef Date Duration
 
typedef std::vector< MeteoDataMETEO_SET
 
typedef std::vector< StationDataSTATIONS_SET
 

Functions

std::iostream & operator<< (std::iostream &os, const Config &cfg)
 
std::iostream & operator>> (std::iostream &is, Config &cfg)
 
std::string getLibVersion ()
 Return the library version. More...
 
template<class P >
std::iostream & operator<< (std::iostream &os, const Array1D< P > &array)
 
template<class P >
std::iostream & operator>> (std::iostream &is, Array1D< P > &array)
 
template<class P >
std::iostream & operator<< (std::iostream &os, const Array2D< P > &array)
 
template<class P >
std::iostream & operator>> (std::iostream &is, Array2D< P > &array)
 
template<class P >
std::iostream & operator<< (std::iostream &os, const Array3D< P > &array)
 
template<class P >
std::iostream & operator>> (std::iostream &is, Array3D< P > &array)
 
template<class P >
std::iostream & operator<< (std::iostream &os, const Array4D< P > &array)
 
template<class P >
std::iostream & operator>> (std::iostream &is, Array4D< P > &array)
 
std::iostream & operator<< (std::iostream &os, const Coords &coord)
 
std::iostream & operator>> (std::iostream &is, Coords &coord)
 
std::iostream & operator<< (std::iostream &os, const Date &date)
 
std::iostream & operator>> (std::iostream &is, Date &date)
 
std::iostream & operator<< (std::iostream &os, const DEMObject &dem)
 
std::iostream & operator>> (std::iostream &is, DEMObject &dem)
 
std::iostream & operator<< (std::iostream &os, const Grid2DObject &grid)
 
std::iostream & operator>> (std::iostream &is, Grid2DObject &grid)
 
std::iostream & operator<< (std::iostream &os, const Grid3DObject &grid)
 
std::iostream & operator>> (std::iostream &is, Grid3DObject &grid)
 
std::iostream & operator<< (std::iostream &os, const MeteoData &data)
 
std::iostream & operator>> (std::iostream &is, MeteoData &data)
 
std::iostream & operator<< (std::iostream &os, const StationData &station)
 
std::iostream & operator>> (std::iostream &is, StationData &station)
 
void printJSON (const picojson::value &v, const unsigned int &depth)
 
picojson::value goToJSONPath (const std::string &path, picojson::value &v)
 
void JSONQuery (const std::string &path, picojson::value &v, std::vector< picojson::value > &results)
 
std::string getString (const std::string &path, picojson::value &v)
 
std::vector< std::string > getStrings (const std::string &path, picojson::value &v)
 
double getDouble (const std::string &path, picojson::value &v)
 
std::vector< double > getDoubles (const std::string &path, picojson::value &v)
 
double convertUnits (const MeteoData::Parameters &param, const double &value)
 
bool parseTsPoint (const picojson::value &v, Date &datum, double &value)
 
void parseTimeSerie (const std::string &tsID, const MeteoData::Parameters &param, const StationData &sd, picojson::value &v, std::vector< MeteoData > &vecMeteo)
 
unsigned int parseInterval (const std::string &interval_str)
 
std::map< std::string,
std::vector< DBO::tsMeta > > 
getTsProperties (picojson::value &v)
 
void listFields (matvar_t *matvar)
 
void printStructure (matvar_t *matvar)
 
std::string readString (const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar)
 
void readStringVector (const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar, std::vector< std::string > &vecString)
 
void readDoubleVector (const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar, std::vector< double > &vecData)
 
void printFileStructure (const std::string &filename)
 

Typedef Documentation

typedef std::vector<MeteoData> mio::METEO_SET
typedef std::vector<StationData> mio::STATIONS_SET

Function Documentation

double mio::convertUnits ( const MeteoData::Parameters &  param,
const double &  value 
)
double mio::getDouble ( const std::string &  path,
picojson::value v 
)
std::vector<double> mio::getDoubles ( const std::string &  path,
picojson::value v 
)
std::string mio::getLibVersion ( )

Return the library version.

Returns
library version string
std::string mio::getString ( const std::string &  path,
picojson::value v 
)
std::vector<std::string> mio::getStrings ( const std::string &  path,
picojson::value v 
)
std::map<std::string, std::vector<DBO::tsMeta> > mio::getTsProperties ( picojson::value v)
picojson::value mio::goToJSONPath ( const std::string &  path,
picojson::value v 
)
void mio::JSONQuery ( const std::string &  path,
picojson::value v,
std::vector< picojson::value > &  results 
)
void mio::listFields ( matvar_t *  matvar)
std::iostream& mio::operator<< ( std::iostream &  os,
const Config &  cfg 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const StationData &  station 
)
template<class P >
std::iostream& mio::operator<< ( std::iostream &  os,
const Array1D< P > &  array 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const Coords &  coord 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const MeteoData &  data 
)
template<class P >
std::iostream& mio::operator<< ( std::iostream &  os,
const Array2D< P > &  array 
)
template<class P >
std::iostream& mio::operator<< ( std::iostream &  os,
const Array4D< P > &  array 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const Grid2DObject &  grid 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const Grid3DObject &  grid 
)
template<class P >
std::iostream& mio::operator<< ( std::iostream &  os,
const Array3D< P > &  array 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const DEMObject &  dem 
)
std::iostream& mio::operator<< ( std::iostream &  os,
const Date &  date 
)
std::iostream& mio::operator>> ( std::iostream &  is,
StationData &  station 
)
std::iostream& mio::operator>> ( std::iostream &  is,
Config &  cfg 
)
template<class P >
std::iostream& mio::operator>> ( std::iostream &  is,
Array1D< P > &  array 
)
std::iostream& mio::operator>> ( std::iostream &  is,
Coords &  coord 
)
std::iostream& mio::operator>> ( std::iostream &  is,
MeteoData &  data 
)
template<class P >
std::iostream& mio::operator>> ( std::iostream &  is,
Array2D< P > &  array 
)
template<class P >
std::iostream& mio::operator>> ( std::iostream &  is,
Array4D< P > &  array 
)
std::iostream& mio::operator>> ( std::iostream &  is,
Grid2DObject &  grid 
)
std::iostream& mio::operator>> ( std::iostream &  is,
Grid3DObject &  grid 
)
template<class P >
std::iostream& mio::operator>> ( std::iostream &  is,
Array3D< P > &  array 
)
std::iostream& mio::operator>> ( std::iostream &  is,
DEMObject &  dem 
)
std::iostream& mio::operator>> ( std::iostream &  is,
Date &  date 
)
unsigned int mio::parseInterval ( const std::string &  interval_str)
void mio::parseTimeSerie ( const std::string &  tsID,
const MeteoData::Parameters &  param,
const StationData &  sd,
picojson::value v,
std::vector< MeteoData > &  vecMeteo 
)
bool mio::parseTsPoint ( const picojson::value v,
Date &  datum,
double &  value 
)
void mio::printFileStructure ( const std::string &  filename)
void mio::printJSON ( const picojson::value v,
const unsigned int &  depth 
)
void mio::printStructure ( matvar_t *  matvar)
void mio::readDoubleVector ( const std::string &  filename,
const std::string &  fieldname,
mat_t *  matfp,
matvar_t *  matvar,
std::vector< double > &  vecData 
)
std::string mio::readString ( const std::string &  filename,
const std::string &  fieldname,
mat_t *  matfp,
matvar_t *  matvar 
)
void mio::readStringVector ( const std::string &  filename,
const std::string &  fieldname,
mat_t *  matfp,
matvar_t *  matvar,
std::vector< std::string > &  vecString 
)