WSL/SLF GitLab Repository

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

the ListonRH algorithm has been tweaked: when only 1 station is available, no...

the ListonRH algorithm has been tweaked: when only 1 station is available, no detrending is applied (instead of having the detrending returning an error if no default lapse rate has been provided).
parent 9854aed8
......@@ -78,12 +78,16 @@ void RHListonAlgorithm::calculate(const DEMObject& dem, Grid2DObject& grid)
vecTd[ii] = Atmosphere::RhtoDewPoint(rh, vecDataTA[ii], 1);
}
Fit1D trend;
getTrend(vecAltitudes, vecTd, trend);
info << trend.getInfo();
detrend(trend, vecAltitudes, vecTd);
Interpol2D::IDW(vecTd, vecMeta, dem, grid); //the meta should NOT be used for elevations!
retrend(dem, trend, grid);
if (nrOfMeasurments>=2) {
Fit1D trend;
getTrend(vecAltitudes, vecTd, trend);
info << trend.getInfo();
detrend(trend, vecAltitudes, vecTd);
Interpol2D::IDW(vecTd, vecMeta, dem, grid); //the meta should NOT be used for elevations!
retrend(dem, trend, grid);
} else {
Interpol2D::IDW(vecTd, vecMeta, dem, grid); //the meta should NOT be used for elevations!
}
//Recompute Rh from the interpolated td
for (size_t jj=0; jj<grid.getNy(); jj++) {
......
......@@ -26,7 +26,8 @@ namespace mio {
* @class RHListonAlgorithm
* @brief 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.
* 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.
*
* As a side effect, the user must have defined algorithms to be used for air temperature (since this is needed for dew
......
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