WSL/SLF GitLab Repository

Commit 7d78f32e authored by Mathias Bavay's avatar Mathias Bavay
Browse files

More warning fixes, removed/fixed a few "HACK" comments

parent d4775cdf
......@@ -921,7 +921,6 @@ void WinstralAlgorithm::calculate(const DEMObject& dem, Grid2DObject& grid)
return;
}
//HACK: also get Synoptic_VW and use a threshold to trigger snow transport?
double synoptic_bearing = user_synoptic_bearing;
if (synoptic_bearing==IOUtils::nodata) {
if (!ref_station.empty())
......@@ -1052,7 +1051,6 @@ void WinstralListonAlgorithm::calculate(const DEMObject& dem, Grid2DObject& grid
std::string USERInterpolation::getGridFileName() const
{
//HACK: use read2DGrid(grid, MeteoGrid::Parameters, Date) instead?
const size_t nrArgs = vecArgs.size();
if (nrArgs > 2){
throw InvalidArgumentException("Too many arguments for the "+algo+" interpolation algorithm", AT);
......
......@@ -60,7 +60,6 @@ Meteo2DInterpolator::~Meteo2DInterpolator()
*/
void Meteo2DInterpolator::setAlgorithms()
{
//HACK set callback to internal iomanager for virtual stations and downsampling!
set<string> set_of_used_parameters;
get_parameters(cfg, set_of_used_parameters);
......@@ -358,7 +357,7 @@ void Meteo2DInterpolator::initVirtualStations(const bool& adjust_coordinates)
}
size_t Meteo2DInterpolator::getVirtualStationsData(const Date& i_date, METEO_SET& vecMeteo)
{ //HACK use own private iomanager and do caching in its private one
{
vecMeteo.clear();
// Check if data is available in cache
......
......@@ -97,7 +97,7 @@ double ResamplingAlgorithms::partialAccumulateAtRight(const std::vector<MeteoDat
* @param indexP2 index of point after the current position (IOUtils::npos if none could be found)
*/
void ResamplingAlgorithms::getNearestValidPts(const size_t& pos, const size_t& paramindex, const std::vector<MeteoData>& vecM, const Date& resampling_date,
const double& window_size, size_t& indexP1, size_t& indexP2) //HACK
const double& window_size, size_t& indexP1, size_t& indexP2)
{
indexP1=IOUtils::npos;
indexP2=IOUtils::npos;
......
......@@ -192,7 +192,6 @@ class Matrix {
* @brief matrix LU decomposition.
* Perform LU decomposition by the Dolittle algorithm,
* (cf http://math.fullerton.edu/mathews/numerical/linear/dol/dol.html)
* HACK: there is no permutation matrix, so it might not be able to give a decomposition...
* @param L lower diagonal matrix
* @param U upper diagonal matrix
* @return false if the decomposition can not be performed (division by zero)
......
......@@ -15,8 +15,8 @@
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _FilterFlatline_H_
#define _FilterFlatline_H_
#ifndef FilterFlatline_H
#define FilterFlatline_H
#include <meteoio/meteoFilters/WindowedFilter.h> //use this one for filters relying on a data window, for example std_dev
......
......@@ -27,7 +27,7 @@ FilterMAD::FilterMAD(const std::vector<std::string>& vec_args, const std::string
{
parse_args(vec_args);
//This is safe, but maybe too imprecise: //HACK: does not account for centering!
//This is safe, but maybe too imprecise
properties.time_before = min_time_span;
properties.time_after = min_time_span;
properties.points_before = min_data_points;
......
......@@ -15,8 +15,8 @@
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _FilterOffsetsnowdepth_H_
#define _FilterOffsetsnowdepth_H_
#ifndef FilterOffsetsnowdepth_H
#define FilterOffsetsnowdepth_H
#include <meteoio/meteoFilters/WindowedFilter.h>
......
......@@ -15,8 +15,8 @@
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _FilterSnowNosnow_H_
#define _FilterSnowNosnow_H_
#ifndef FilterSnowNosnow_H
#define FilterSnowNosnow_H
//#include <meteoio/meteoFilters/WindowedFilter.h> //use this one for filters relying on a data window, for example std_dev
#include <meteoio/meteoFilters/FilterBlock.h> //use this one for all others
......
......@@ -15,8 +15,8 @@
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _FilterTimeconsistency_H_
#define _FilterTimeconsistency_H_
#ifndef FilterTimeconsistency_H
#define FilterTimeconsistency_H
#include <meteoio/meteoFilters/WindowedFilter.h>
......
......@@ -134,7 +134,7 @@ double Atmosphere::wetBulbTemperature(const double& T, const double& RH, const d
double Atmosphere::blackGlobeTemperature(const double& TA, const double& RH, const double& VW, const double& iswr_dir, const double& iswr_diff, const double& cos_Z)
{
const double S = iswr_dir + iswr_diff;
//const double a=1, b=1, c=1; //HACK: get real values!
//const double a=1, b=1, c=1; // get real values!
//const double h = a * pow(S, b) * pow(cos_Z, c);
const double h = 0.315; //personnal communication from S. Amburn
const double emissivity = 0.575 * pow(RH*waterSaturationPressure(TA), 1./7.);
......
......@@ -49,7 +49,7 @@ class SunObject {
void setLatLon(const double& i_latitude, const double& i_longitude, const double& i_altitude);
void setElevationThresh(const double& i_elevation_threshold);
void calculateRadiation(const double& ta, const double& rh, const double& pressure, const double& ground_albedo); //HACK handle cloudy atmosphere?
void calculateRadiation(const double& ta, const double& rh, const double& pressure, const double& ground_albedo);
void calculateRadiation(const double& ta, const double& rh, const double& mean_albedo);
void getBeamRadiation(double& R_toa, double& R_direct, double& R_diffuse) const;
void getHorizontalRadiation(double& R_toa, double& R_direct, double& R_diffuse) const;
......
......@@ -827,7 +827,7 @@ void A3DIO::open2DFile(const std::vector< std::vector<MeteoData> >& data,
int A3DIO::write2DmeteoFile(const std::vector< std::vector<MeteoData> >& data,
const unsigned int& parindex, const std::string& fileprefix,
const std::string& label)
{//HACK: we assume that all stations have data that is time synchronized...
{
const size_t sta_nr = data.size();
if (sta_nr==0) return EXIT_FAILURE;
const size_t nb_timesteps = data[0].size();
......
......@@ -233,7 +233,7 @@ void ARPSIO::read2DGrid_internal(FILE* &fin, const std::string& filename, Grid2D
//const double epsilon = Cst::gaz_constant_dry_air / Cst::gaz_constant_water_vapor;
readGridLayer(filename, "qv", 2, grid_out); //water vapor mixing ratio
//Atmosphere::waterSaturationPressure(T);
//HACK: compute relative humidity out of it!
//TODO: compute relative humidity out of it!
//through potential temperature "pt" -> local temperature?
}*/
......
......@@ -99,7 +99,6 @@ void BormaIO::writeMeteoData(const std::vector< std::vector<MeteoData> >&,
void BormaIO::readStationData(const Date&, std::vector<StationData>&)
{
//HACK: this method MUST be implemented for BufferedIOHandler to properly work
//Nothing so far
throw IOException("Nothing implemented here", AT);
}
......
......@@ -1008,8 +1008,8 @@ std::string CNRMIO::get_varname(const MeteoGrids::Parameters& parameter)
else if (parameter == MeteoGrids::PSUM) varname = cnrm_psum; //HACK this should add snowf!
else if (parameter == MeteoGrids::SLOPE) varname = cnrm_slope;
else if (parameter == MeteoGrids::AZI) varname = cnrm_aspect;
//HACK: iswr=dir+diff
//HACK: U, V from vw, dw
//TODO: iswr=dir+diff
//TODO: U, V from vw, dw
return varname;
}
......
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