WSL/SLF GitLab Repository

Commit bc4e2fca authored by Thomas Egger's avatar Thomas Egger
Browse files

NetCDFIO: checkEpsilonEquality for modified julian dates instead of test for double equality

parent 3872edb2
......@@ -77,6 +77,7 @@ namespace mio {
const double NetCDFIO::plugin_nodata = -9999999.; //CNRM-GAME nodata value
const double NetCDFIO::epsilon = 1.0e-10; //when comparing timestamps
const std::string NetCDFIO::cf_time = "time";
const std::string NetCDFIO::cf_units = "units";
......@@ -939,7 +940,8 @@ void NetCDFIO::get_parameters(const std::vector< std::vector<MeteoData> >& vecMe
for (size_t jj=0; jj<vecMeteo[ii].size(); ++jj) {
const MeteoData& meteo_data = vecMeteo[ii][jj];
if (dates[jj] != inconsistent = true;
if (!IOUtils::checkEpsilonEquality(dates[jj],, NetCDFIO::epsilon))
inconsistent = true;
if (jj == 0) {
map_data_1D[cnrm_latitude][ii] = meteo_data.meta.position.getLat();
......@@ -98,6 +98,7 @@ class NetCDFIO : public IOInterface {
// Private variables
static const double plugin_nodata; //plugin specific nodata value, e.g. -999
static const double epsilon; //for numerical comparisons of double values
static const std::string cf_time, cf_units, cf_days, cf_hours, cf_seconds, cf_latitude, cf_longitude, cf_altitude, cf_ta, cf_rh, cf_p;
static const std::string cnrm_points, cnrm_latitude, cnrm_longitude, cnrm_altitude, cnrm_aspect, cnrm_slope, cnrm_ta, cnrm_rh, cnrm_vw, cnrm_dw, cnrm_qair;
static const std::string cnrm_co2air, cnrm_theorsw, cnrm_neb, cnrm_hnw, cnrm_snowf, cnrm_swr_direct, cnrm_swr_diffuse, cnrm_p, cnrm_ilwr, cnrm_timestep;
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