WSL/SLF GitLab Repository

Commit 85cfa88b authored by Robert Spence's avatar Robert Spence
Browse files

Units were inconsistent when adding precip height (in mm) to DEM (in m). This...

Units were inconsistent when adding precip height (in mm) to DEM (in m). This has been fixed with a scaling factor.
DEM update command now added. 
parent 6cb72b03
CC = g++ -DGNU
CFLAGS = -Wall -Wextra
DEBUG = -g #-O3 # -DDEBUG -ggdb
METEOIODIR = ../../
LIBS = -rdynamic -lstdc++ -ldl -L../../lib -lmeteoio -ldl
INCLUDE=-I. -I$(METEOIODIR) -I$(METEOIODIR)/include
INCLUDE_POPC=-I. -I$(METEOIODIR) -I$(METEOIODIR)/include
#####################
# RULES
#####################
.cc.o: $*.cc $*.h
$(CC) $(DEBUG) $(CFLAGS) -c $< $(INCLUDE)
%.o: %.cc
$(CC) $(DEBUG) $(CFLAGS) -c $< $(INCLUDE)
#####################
# TARGETS
#####################
all: meteo_reading dem_reading grid2d_reading coordinates 2D_interpolations time data_converter matrix sun
meteo_reading: meteo_reading.o
$(CC) $(DEBUG) -o $@ meteo_reading.o ${LIBS}
dem_reading: dem_reading.o
$(CC) $(DEBUG) -o $@ dem_reading.o ${LIBS}
grid2d_reading: grid2d_reading.o
$(CC) $(DEBUG) -o $@ grid2d_reading.o ${LIBS}
coordinates: coordinates.o
$(CC) $(DEBUG) -o $@ coordinates.o ${LIBS}
2D_interpolations: 2D_interpolations.o
$(CC) $(DEBUG) -o $@ 2D_interpolations.o ${LIBS}
time: time.o
$(CC) $(DEBUG) -o $@ time.o ${LIBS}
data_converter: data_converter.o
$(CC) $(DEBUG) -o $@ data_converter.o ${LIBS}
matrix: matrix.o
$(CC) $(DEBUG) -o $@ matrix.o ${LIBS}
sun: sun.o
$(CC) $(DEBUG) -o $@ sun.o ${LIBS}
clean:
rm -rf *~ *.o *.out meteo_reading dem_reading grid2d_reading coordinates 2D_interpolations time data_converter matrix sun
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files\CMake 2.8\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files\CMake 2.8\bin\cmake.exe" -E remove -f
# Escaping for special characters.
EQUALS = =
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = "C:\Program Files\CMake 2.8\bin\cmake-gui.exe"
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = H:\meteoio\doc\examples
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = H:\meteoio\doc\examples
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
"C:\Program Files\CMake 2.8\bin\cmake-gui.exe" -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
"C:\Program Files\CMake 2.8\bin\cmake.exe" -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start H:\meteoio\doc\examples\CMakeFiles H:\meteoio\doc\examples\CMakeFiles\progress.marks
$(MAKE) -f CMakeFiles\Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start H:\meteoio\doc\examples\CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles\Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named 2D_interpolations
# Build rule for target.
2D_interpolations: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 2D_interpolations
.PHONY : 2D_interpolations
# fast build rule for target.
2D_interpolations/fast:
$(MAKE) -f CMakeFiles\2D_interpolations.dir\build.make CMakeFiles/2D_interpolations.dir/build
.PHONY : 2D_interpolations/fast
#=============================================================================
# Target rules for targets named coordinates
# Build rule for target.
coordinates: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 coordinates
.PHONY : coordinates
# fast build rule for target.
coordinates/fast:
$(MAKE) -f CMakeFiles\coordinates.dir\build.make CMakeFiles/coordinates.dir/build
.PHONY : coordinates/fast
#=============================================================================
# Target rules for targets named data_converter
# Build rule for target.
data_converter: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 data_converter
.PHONY : data_converter
# fast build rule for target.
data_converter/fast:
$(MAKE) -f CMakeFiles\data_converter.dir\build.make CMakeFiles/data_converter.dir/build
.PHONY : data_converter/fast
#=============================================================================
# Target rules for targets named dem_reading
# Build rule for target.
dem_reading: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 dem_reading
.PHONY : dem_reading
# fast build rule for target.
dem_reading/fast:
$(MAKE) -f CMakeFiles\dem_reading.dir\build.make CMakeFiles/dem_reading.dir/build
.PHONY : dem_reading/fast
#=============================================================================
# Target rules for targets named distclean
# Build rule for target.
distclean: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 distclean
.PHONY : distclean
# fast build rule for target.
distclean/fast:
$(MAKE) -f CMakeFiles\distclean.dir\build.make CMakeFiles/distclean.dir/build
.PHONY : distclean/fast
#=============================================================================
# Target rules for targets named grid2d_reading
# Build rule for target.
grid2d_reading: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 grid2d_reading
.PHONY : grid2d_reading
# fast build rule for target.
grid2d_reading/fast:
$(MAKE) -f CMakeFiles\grid2d_reading.dir\build.make CMakeFiles/grid2d_reading.dir/build
.PHONY : grid2d_reading/fast
#=============================================================================
# Target rules for targets named matrix
# Build rule for target.
matrix: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 matrix
.PHONY : matrix
# fast build rule for target.
matrix/fast:
$(MAKE) -f CMakeFiles\matrix.dir\build.make CMakeFiles/matrix.dir/build
.PHONY : matrix/fast
#=============================================================================
# Target rules for targets named meteo_reading
# Build rule for target.
meteo_reading: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 meteo_reading
.PHONY : meteo_reading
# fast build rule for target.
meteo_reading/fast:
$(MAKE) -f CMakeFiles\meteo_reading.dir\build.make CMakeFiles/meteo_reading.dir/build
.PHONY : meteo_reading/fast
#=============================================================================
# Target rules for targets named sun
# Build rule for target.
sun: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 sun
.PHONY : sun
# fast build rule for target.
sun/fast:
$(MAKE) -f CMakeFiles\sun.dir\build.make CMakeFiles/sun.dir/build
.PHONY : sun/fast
#=============================================================================
# Target rules for targets named time
# Build rule for target.
time: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 time
.PHONY : time
# fast build rule for target.
time/fast:
$(MAKE) -f CMakeFiles\time.dir\build.make CMakeFiles/time.dir/build
.PHONY : time/fast
# target to build an object file
2D_interpolations.obj:
$(MAKE) -f CMakeFiles\2D_interpolations.dir\build.make CMakeFiles/2D_interpolations.dir/2D_interpolations.obj
.PHONY : 2D_interpolations.obj
# target to preprocess a source file
2D_interpolations.i:
$(MAKE) -f CMakeFiles\2D_interpolations.dir\build.make CMakeFiles/2D_interpolations.dir/2D_interpolations.i
.PHONY : 2D_interpolations.i
# target to generate assembly for a file
2D_interpolations.s:
$(MAKE) -f CMakeFiles\2D_interpolations.dir\build.make CMakeFiles/2D_interpolations.dir/2D_interpolations.s
.PHONY : 2D_interpolations.s
# target to build an object file
coordinates.obj:
$(MAKE) -f CMakeFiles\coordinates.dir\build.make CMakeFiles/coordinates.dir/coordinates.obj
.PHONY : coordinates.obj
# target to preprocess a source file
coordinates.i:
$(MAKE) -f CMakeFiles\coordinates.dir\build.make CMakeFiles/coordinates.dir/coordinates.i
.PHONY : coordinates.i
# target to generate assembly for a file
coordinates.s:
$(MAKE) -f CMakeFiles\coordinates.dir\build.make CMakeFiles/coordinates.dir/coordinates.s
.PHONY : coordinates.s
# target to build an object file
data_converter.obj:
$(MAKE) -f CMakeFiles\data_converter.dir\build.make CMakeFiles/data_converter.dir/data_converter.obj
.PHONY : data_converter.obj
# target to preprocess a source file
data_converter.i:
$(MAKE) -f CMakeFiles\data_converter.dir\build.make CMakeFiles/data_converter.dir/data_converter.i
.PHONY : data_converter.i
# target to generate assembly for a file
data_converter.s:
$(MAKE) -f CMakeFiles\data_converter.dir\build.make CMakeFiles/data_converter.dir/data_converter.s
.PHONY : data_converter.s
# target to build an object file
dem_reading.obj:
$(MAKE) -f CMakeFiles\dem_reading.dir\build.make CMakeFiles/dem_reading.dir/dem_reading.obj
.PHONY : dem_reading.obj
# target to preprocess a source file
dem_reading.i:
$(MAKE) -f CMakeFiles\dem_reading.dir\build.make CMakeFiles/dem_reading.dir/dem_reading.i
.PHONY : dem_reading.i
# target to generate assembly for a file
dem_reading.s:
$(MAKE) -f CMakeFiles\dem_reading.dir\build.make CMakeFiles/dem_reading.dir/dem_reading.s
.PHONY : dem_reading.s
# target to build an object file
grid2d_reading.obj:
$(MAKE) -f CMakeFiles\grid2d_reading.dir\build.make CMakeFiles/grid2d_reading.dir/grid2d_reading.obj
.PHONY : grid2d_reading.obj
# target to preprocess a source file
grid2d_reading.i:
$(MAKE) -f CMakeFiles\grid2d_reading.dir\build.make CMakeFiles/grid2d_reading.dir/grid2d_reading.i
.PHONY : grid2d_reading.i
# target to generate assembly for a file
grid2d_reading.s:
$(MAKE) -f CMakeFiles\grid2d_reading.dir\build.make CMakeFiles/grid2d_reading.dir/grid2d_reading.s
.PHONY : grid2d_reading.s
# target to build an object file
matrix.obj:
$(MAKE) -f CMakeFiles\matrix.dir\build.make CMakeFiles/matrix.dir/matrix.obj
.PHONY : matrix.obj
# target to preprocess a source file
matrix.i:
$(MAKE) -f CMakeFiles\matrix.dir\build.make CMakeFiles/matrix.dir/matrix.i
.PHONY : matrix.i
# target to generate assembly for a file
matrix.s:
$(MAKE) -f CMakeFiles\matrix.dir\build.make CMakeFiles/matrix.dir/matrix.s
.PHONY : matrix.s
# target to build an object file
meteo_reading.obj:
$(MAKE) -f CMakeFiles\meteo_reading.dir\build.make CMakeFiles/meteo_reading.dir/meteo_reading.obj
.PHONY : meteo_reading.obj
# target to preprocess a source file
meteo_reading.i:
$(MAKE) -f CMakeFiles\meteo_reading.dir\build.make CMakeFiles/meteo_reading.dir/meteo_reading.i
.PHONY : meteo_reading.i
# target to generate assembly for a file
meteo_reading.s:
$(MAKE) -f CMakeFiles\meteo_reading.dir\build.make CMakeFiles/meteo_reading.dir/meteo_reading.s
.PHONY : meteo_reading.s
# target to build an object file
sun.obj:
$(MAKE) -f CMakeFiles\sun.dir\build.make CMakeFiles/sun.dir/sun.obj
.PHONY : sun.obj
# target to preprocess a source file
sun.i:
$(MAKE) -f CMakeFiles\sun.dir\build.make CMakeFiles/sun.dir/sun.i
.PHONY : sun.i
# target to generate assembly for a file
sun.s:
$(MAKE) -f CMakeFiles\sun.dir\build.make CMakeFiles/sun.dir/sun.s
.PHONY : sun.s
# target to build an object file
time.obj:
$(MAKE) -f CMakeFiles\time.dir\build.make CMakeFiles/time.dir/time.obj
.PHONY : time.obj
# target to preprocess a source file
time.i:
$(MAKE) -f CMakeFiles\time.dir\build.make CMakeFiles/time.dir/time.i
.PHONY : time.i
# target to generate assembly for a file
time.s:
$(MAKE) -f CMakeFiles\time.dir\build.make CMakeFiles/time.dir/time.s
.PHONY : time.s
# Help Target
help:
@echo The following are some of the valid targets for this Makefile:
@echo ... all (the default if no target is provided)
@echo ... clean
@echo ... depend
@echo ... 2D_interpolations
@echo ... coordinates
@echo ... data_converter
@echo ... dem_reading
@echo ... distclean
@echo ... edit_cache
@echo ... grid2d_reading
@echo ... matrix
@echo ... meteo_reading
@echo ... rebuild_cache
@echo ... sun
@echo ... time
@echo ... 2D_interpolations.obj
@echo ... 2D_interpolations.i
@echo ... 2D_interpolations.s
@echo ... coordinates.obj
@echo ... coordinates.i
@echo ... coordinates.s
@echo ... data_converter.obj
@echo ... data_converter.i
@echo ... data_converter.s
@echo ... dem_reading.obj
@echo ... dem_reading.i
@echo ... dem_reading.s
@echo ... grid2d_reading.obj
@echo ... grid2d_reading.i
@echo ... grid2d_reading.s
@echo ... matrix.obj
@echo ... matrix.i
@echo ... matrix.s
@echo ... meteo_reading.obj
@echo ... meteo_reading.i
@echo ... meteo_reading.s
@echo ... sun.obj
@echo ... sun.i
@echo ... sun.s
@echo ... time.obj
@echo ... time.i
@echo ... time.s
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system
......@@ -29,8 +29,7 @@ InterpolationAlgorithm* AlgorithmFactory::getAlgorithm(const std::string& i_algo
Meteo2DInterpolator& i_mi,
const std::vector<std::string>& i_vecArgs, IOManager& iom)
{
const std::string algoname( IOUtils::strToUpper(i_algoname) );
const std::string algoname( IOUtils::strToUpper(i_algoname) );
if (algoname == "CST"){// constant fill
return new ConstAlgorithm(i_mi, i_vecArgs, i_algoname, iom);
} else if (algoname == "STD_PRESS"){// standard air pressure interpolation
......@@ -627,7 +626,7 @@ void SnowHNWInterpolation::calculate(const DEMObject& dem, Grid2DObject& grid)
algorithm->calculate(internal_dem, grid);
info << algorithm->getInfo();
//get TA interpolation from call back to Meteo2DInterpolator
//get TA interpolation from call back to Meteo2DInterpolator
Grid2DObject ta;
mi.interpolate(date, internal_dem, MeteoData::TA, ta);
......@@ -636,10 +635,9 @@ void SnowHNWInterpolation::calculate(const DEMObject& dem, Grid2DObject& grid)
//Interpol2D::CurvatureCorrection(internal_dem, ta, grid);
//add "virtual snow height" to the internal dem
for(size_t ii=0; ii<dem.ncols*dem.nrows; ++ii)
internal_dem.grid2D(ii) += 3.*grid.grid2D(ii);
internal_dem.update();
for(size_t ii=0; ii<(dem.ncols*dem.nrows); ++ii)
internal_dem.grid2D(ii) += ((grid.grid2D(ii))*(1e-02));
internal_dem.update();
}
void OrdinaryKrigingAlgorithm::getDataForVariogram(std::vector<double> &distData, std::vector<double> &variData)
......
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