WSL/SLF GitLab Repository

Commit 54589321 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Removed some commented out code, improved some documentation and recomputed a...

Removed some commented out code, improved some documentation and recomputed a test that had been invalidated by changing the implementation of the HNW_Snow spatial interpolation method.
parent b6062187
......@@ -250,8 +250,9 @@ class StandardPressureAlgorithm : public InterpolationAlgorithm {
/**
* @class ConstLapseRateAlgorithm
* @brief Constant filling with elevation lapse rate interpolation algorithm.
* Assuming that average values occured at the average of the elevations, the grid is filled with average values
* reprojected to real grid elevation according to a lapse rate. The lapse rate is either calculated from the data
* 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 <i>"cst_lapse"</i>.
* If followed by <i>"soft"</i>, 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
......
......@@ -269,11 +269,6 @@ void NetCDFIO::readDEM(DEMObject& dem_out)
read2DGrid_internal(p, filename, MeteoGrids::P, Date(2015,1,1,12,0,0)) &&
read2DGrid_internal(ta, filename, MeteoGrids::TA, Date(2015,1,1,12,0,0))) {
dem_out.set(p, IOUtils::nodata);
/*const double k = Cst::gravity*Cst::dry_air_mol_mass / (Cst::gaz_constant*Cst::dry_adiabatique_lapse_rate);
const double k_inv = 1./k;
for(size_t ii=0; ii<(dem_out.getNx()*dem_out.getNy()); ii++)
dem_out(ii) = ta(ii)/Cst::dry_adiabatique_lapse_rate * (pow(p(ii)/p_sea(ii), -k_inv) - 1.);
return;*/
const double k = Cst::gravity / (Cst::dry_adiabatique_lapse_rate * Cst::gaz_constant_dry_air);
const double k_inv = 1./k;
for(size_t ii=0; ii<(dem_out.getNx()*dem_out.getNy()); ii++) {
......
Markdown is supported
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