WSL/SLF GitLab Repository

Skip to content
  • Thomas Egger's avatar
    Performance boost: Redesign of class MeteoData. The individual public double... · 8d46d04d
    Thomas Egger authored
    Performance boost: Redesign of class MeteoData. The individual public double members like tss, ta, rh have been removed and instead of the rather complicated internal representation with the help of std::map and pointers, the MeteoData object now holds all its important information in one double vector (meteo data) and one string vector (parameter names). Thus the overloaded copy constructor could be slashed radically. This leads to huge performance gains, especially when dealing with huge vectors of MeteoData (which are needed for filtering, resampling, etc).
    
    Furthermore the access to the meteo parameters has been simpleified by overloading the operator(), replacing the old .param(size_t index) and .param(string paramname) functions:
    
    MeteoData md;
    double ta = md(MeteoData::TA);
    
    OR
    
    double ta = md("TA");
    
    These changes were propagated into all of MeteoIO.
    8d46d04d