WSL/SLF GitLab Repository

Commit 2734a44e authored by Adrien Michel's avatar Adrien Michel
Browse files
parents b35fff21 89a9beb1
......@@ -134,20 +134,20 @@ SnowpackInterface::SnowpackInterface(const mio::Config& io_cfg, const size_t& nb
if (mpicontrol.master()) {
bool write_dem_details=false;
io_cfg.getValue("WRITE_DEM_DETAILS", "output", write_dem_details,IOUtils::nothrow);
if(write_dem_details){
std::cout << "[i] Writing DEM details grids" << std::endl;
io.write2DGrid(mio::Grid2DObject(dem.cellsize,dem.llcorner,dem.slope), "DEM_SLOPE");
io.write2DGrid(mio::Grid2DObject(dem.cellsize,dem.llcorner,dem.azi), "DEM_AZI");
io.write2DGrid(mio::Grid2DObject(dem.cellsize,dem.llcorner,dem.curvature), "DEM_CURVATURE");
}
bool write_dem_details=false;
io_cfg.getValue("WRITE_DEM_DETAILS", "output", write_dem_details,IOUtils::nothrow);
if(write_dem_details){
std::cout << "[i] Writing DEM details grids" << std::endl;
io.write2DGrid(mio::Grid2DObject(dem.cellsize,dem.llcorner,dem.slope), "DEM_SLOPE");
io.write2DGrid(mio::Grid2DObject(dem.cellsize,dem.llcorner,dem.azi), "DEM_AZI");
io.write2DGrid(mio::Grid2DObject(dem.cellsize,dem.llcorner,dem.curvature), "DEM_CURVATURE");
}
std::cout << "[i] SnowpackInterface initializing a total of " << mpicontrol.size();
if (mpicontrol.size()>1) std::cout << " processes with " << nbworkers;
else std::cout << " process with " << nbworkers;
if (nbworkers>1) std::cout << " workers";
else std::cout << " worker";
else std::cout << " worker";
std::cout << " each using Snowpack " << snowpack::getLibVersion() << "\n";
}
......@@ -760,12 +760,12 @@ mio::Grid2DObject SnowpackInterface::getGrid(const SnGrids::Parameters& param) c
return shortwave;
case SnGrids::ILWR:
return longwave;
case SnGrids::ISWR_TERRAIN:
return terrain_shortwave;
case SnGrids::ILWR_TERRAIN:
return terrain_longwave;
case SnGrids::ISWR_DIFF:
return diffuse;
case SnGrids::ISWR_TERRAIN:
return terrain_shortwave;
case SnGrids::ILWR_TERRAIN:
return terrain_longwave;
case SnGrids::ISWR_DIFF:
return diffuse;
case SnGrids::ISWR_DIR:
return shortwave-diffuse-terrain_shortwave;
default: ; //so compilers do not complain about missing conditions
......
......@@ -220,12 +220,12 @@ void SnowpackInterfaceWorker::initGrids(std::vector<std::string>& params,
IOUtils::toUpper(params[ii]); //make sure all parameters are upper case
const size_t param_idx = SnGrids::getParameterIndex( params[ii] );
const auto position = std::find(grids_not_computed_in_worker.begin(),
grids_not_computed_in_worker.end(),
params[ii]);
if(position<grids_not_computed_in_worker.end()) {
continue;
}
const auto position = std::find(grids_not_computed_in_worker.begin(),
grids_not_computed_in_worker.end(),
params[ii]);
if(position<grids_not_computed_in_worker.end()) {
continue;
}
if (param_idx==IOUtils::npos)
throw UnknownValueException("Unknow meteo grid '"+params[ii]+"' selected for gridded output", AT);
......@@ -392,7 +392,7 @@ void SnowpackInterfaceWorker::fillGrids(const size_t& ii, const size_t& jj, cons
}
else
{
std::cout << it->first << std::endl;
std::cout << it->first << std::endl;
throw InvalidArgumentException("Invalid parameter requested", AT);
}
}
......
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