Giter Site home page Giter Site logo

barnes2020-fillspillmerge's People

Contributors

awickert avatar jkingslake avatar kcallaghan avatar r-barnes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

barnes2020-fillspillmerge's Issues

running the code on mac

Hi,
Apologies for the simplistic question, but after successfully compiling on mac (14.2.1 (23C71)) with

brew install gdal libomp cmake llvm
git clone --recurse-submodules -j8 https://github.com/r-barnes/Barnes2020-FillSpillMerge
cd Barnes2020-FillSpillMerge
mkdir build
cd build
cmake -D CMAKE_C_COMPILER="/opt/homebrew/Cellar/llvm/17.0.6/bin/clang" -D CMAKE_CXX_COMPILER="/opt/homebrew/Cellar/llvm/17.0.6/bin/clang++" -DUSE_GDAL=ON  -DCMAKE_BUILD_TYPE=Release ..
make

How do I run the code? All I see are .exe, which I cant run on mac.

Furthermore, how do I define inputs, etc.

Thanks for any help! I am really excited about applying this tool to Antarctic surface topography!

GDAL detection broken

I have GDAL both on the PKG_CONFIG_PATH and on the CMAKE_PREFIX_PATH, but do not give explicit cmake options. This leads to GDAL both being discovered and not:

-- Found GDAL: /work2/00434/eijkhout/gdal/installation-gdal-3.7.0-clx-gcc12/lib64/libgdal.so (found version "3.7.0")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
CMake Warning at submodules/dephier/submodules/richdem/CMakeLists.txt:75 (message):
  Compiling RichDEM without GDAL!


CMake Warning at submodules/dephier/CMakeLists.txt:28 (message):
  GDAL is required to build the DepHier example programs; it is not needed to
  use the DepHier library in another project.


CMake Warning at CMakeLists.txt:37 (message):
  GDAL is needed to build some of the FSM performance tests and example
  programs; it is not needed to use the FSM library in another project.

Simulate pluvial inundation

Hello, I am currently trying to model a pluvial inundation scenario for a city in the Andean region. Can the repository simulate the inundated areas for a certain amount of precipitation (mm)? I try to set de "swl" at 50 mm but am unsure if this approach is correct.

Thanks for your help.

Cannot compile code

I am not able to compile this code using cmake. The cmake output is:

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found NetCDF: /usr/lib/x86_64-linux-gnu/libnetcdf.so
-- Found GDAL: /usr/lib/libgdal.so
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
CMake Error at CMakeLists.txt:25 (install):
install TARGETS given target "dephier.exe" which does not exist in this
directory.

CMake Error at CMakeLists.txt:26 (install):
install TARGETS given target "dephier_paper_tests.exe" which does not exist
in this directory.

-- Configuring incomplete, errors occurred!

reuse previously computed dephier in subsequent calls to fill-spil-merge

Hi,
Thanks for developing a fantastic tool! I am making some progress on applying it to flow across Antarctic ice shelves (e.g., here) and was wondering about a feature that could help speed things up.

My workflow (described here) involves running fill-spill-merge over the same DEM many times. In each iteration I use a different input of water (different magnitude and different locations within the DEM). This means I am computing the depression hierarchy (on this line) every time.

Would it be possible to instead compute it once, then save it to disk, perhaps with this code, and reload it each time instead of recomputing it?

Thanks for you help!

Compile error on Windows 10.

Hello I am trying to compile fsm on Windows.
Everything is fine with cmake
but I have errors with msbuild such as :
"error C2039: 'iota' n'est pas membre de 'std' [C:\Users\march\Barnes2020-FillSpillMerge\build\submodules\dephier
submodules\richdem\richdem.vcxproj]"

This is not documented so I am not sure it can be compiled on Windows.
Thanks for your help.

Install issues

Hi all,

I'm reviewing this, and it looks super great! But... I am really struggling with install. I'm on Mac Catalina, Xcode 11.4 and am having major errors with both the cmake call. Part of this is a OS versioning problem (compiler vs Xcode vs anaconda) that I think I've fixed, but even with cmake running, I am now getting:

-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /Users/danhobley/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang
-- Check for working C compiler: /Users/danhobley/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Users/danhobley/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang++
-- Check for working CXX compiler: /Users/danhobley/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-clang++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find NetCDF (missing: NETCDF_LIBRARIES NETCDF_INCLUDES) 
-- Could NOT find NetCDF (missing: NETCDF_LIBRARIES NETCDF_INCLUDES) 
-- Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) (found version "GDAL_VERSION-NOTFOUND")
-- Found OpenMP_C: -fopenmp=libomp (found version "3.1") 
-- Found OpenMP_CXX: -fopenmp=libomp (found version "3.1") 
-- Found OpenMP: TRUE (found version "3.1")  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/danhobley/development/Barnes2020-FillSpillMerge/build

This is a NetCDF issue, clearly, and it prevents the make call from successfully building the software. What do I need to do here? (Are there additional dependencies on NetCDF involved that you are assuming?)

compile error code

I am trying to compile the program per the readme instructions and am coming across an error I can't seem to figure out. I am able to install the prerequisites, and create the build files fine. When I try to compile using 'make -j 4' I get the below error:

Undefined symbols for architecture x86_64:
"std::__1::__has_iterator_category<std::__1::iterator_traits >::value", referenced from:
void richdem::dephier::CalculateMarginalVolumes(std::__1::vector<richdem::dephier::Depression, std::__1::allocator<richdem::dephier::Depression > >&, richdem::Array2D const&, richdem::Array2D const&) in fsm_paper_speed_comparison.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/fsm_paper_speed_comparison.exe.dir/build.make:107: fsm_paper_speed_comparison.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/fsm_paper_speed_comparison.exe.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

I am currently running on a Mac Catalina 10.15, and I just pulled the code today.

thanks!

License related questions

Hello,
We would like to use your FillSpillMerge library internally within our company, we notice that this should be fine since it has an MIT license. But since FillSpillMerge uses RichDEM which has a GPL-3.0 license we were wondering:

  • whether FillSpillMerge should also have GPL-3.0 license and whether we are still fine using FillSpillMerge internally?
  • or whether it would be possible to change the license of RichDEM to MIT

We would like to know your recommendations related to this.
Thank you very much.
Sunayana

Depression label issue

Hi,
I'm not very familiar with C++ and have been running into difficulties with a file with a lot of depressions, expected due to karst topography. Several other files are running and producing results that correlate very well with historical flood data.

The Maximum depression number in the graph is 2620939 but the maximum label file is only 1716845. (Both were exported after this line in main.cpp:
auto deps = dh::GetDepressionHierarchy<double,rd::Topology::D8>(topo, label, flowdirs);
)

The program fails with a Core dump due to overflow at depression number 2507207. There are many more depressions after this in the depression hierarchy.
parent,child,oceanlink
2507207,1409562,0
2507207,2507204,0
2507208,2507207,0

I added some additional output to try to trace the source of the error.
Oveflow Into. Depression no:2507203
Oveflow Into - current depression.
Oveflow Into - overflow into another depression.
Oveflow Into - move to parent.
Oveflow Into. Depression no:2507204
Oveflow Into - current depression.
Oveflow Into - overflow into another depression.
Oveflow Into - move to parent.
Oveflow Into. Depression no:2507207
Oveflow Into - current depression.
Oveflow Into - overflow into another depression.
Oveflow Into - move to parent.
Segmentation fault (core dumped)

This is in OverflowInto() just before:
if(pdep.water_vol==0 && !this_dep.ocean_parent){
pdep.water_vol += this_dep.water_vol;
if(this_dep.odep!=NO_VALUE){
pdep.water_vol += deps.at(this_dep.odep).water_vol;
}
}

return jump_table[root] = OverflowInto(this_dep.parent, stop_node, deps, jump_table, extra_water);

Is there an issue with typing / integer size?

compiling problem

Hi, this looks like a fantastic tool and I am looking forward to trying it out!

I am trying to compile followinghte instructions in README.md and getting the following errors:

cmake -D CMAKE_C_COMPILER="/usr/bin/clang" -D CMAKE_CXX_COMPILER="/usr/bin/clang++" -DUSE_GDAL=ON -DCMAKE_BUILD_TYPE=Release ..

make

gives

[  5%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/src/richdem.cpp.o
[ 11%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/src/random.cpp.o
[ 17%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/src/gdal.cpp.o
[ 23%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/src/terrain_generation/terrain_generation.cpp.o
[ 29%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/src/terrain_generation/PerlinNoise.cpp.o
[ 35%] Linking CXX static library librichdem.a
[ 35%] Built target richdem
[ 41%] Building CXX object CMakeFiles/fsm_paper_tests.exe.dir/paper/fsm_paper_tests.cpp.o

In file included from /Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/paper/fsm_paper_tests.cpp:3:
/Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/include/fsm/fill_spill_merge.hpp:1029:17: error: cannot assign to variable 'water_vol' with const-qualified type 'const double'
      water_vol = current_dep_volume;
      ~~~~~~~~~ ^
/Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/include/fsm/fill_spill_merge.hpp:871:26: note: in instantiation of function template specialization 'richdem::dephier::DetermineWaterLevel<float>' requested here
      auto water_level = DetermineWaterLevel(wtd(c.x,c.y), water_vol, topo(c.x,c.y), cells_affected.size(), total_elevation);
                         ^
/Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/include/fsm/fill_spill_merge.hpp:721:5: note: in instantiation of function template specialization 'richdem::dephier::FillDepressions<float, float>' requested here
    FillDepressions(
    ^
/Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/include/fsm/fill_spill_merge.hpp:196:3: note: in instantiation of function template specialization 'richdem::dephier::FindDepressionsToFill<float, float>' requested here
  FindDepressionsToFill(OCEAN, deps, topo, label, wtd);
  ^
/Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/paper/fsm_paper_tests.cpp:63:7: note: in instantiation of function template specialization 'richdem::dephier::FillSpillMerge<float, float>' requested here
  dh::FillSpillMerge(topo, label, flowdirs, deps, wtd);
      ^
/Users/jkingslake/Documents/science/BFRN_meltwater/Barnes2020-FillSpillMerge/include/fsm/fill_spill_merge.hpp:108:16: note: variable 'water_vol' declared const here
  const double water_vol,
  ~~~~~~~~~~~~~^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/fsm_paper_tests.exe.dir/paper/fsm_paper_tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/fsm_paper_tests.exe.dir/all] Error 2
make: *** [all] Error 2

Any help would be much appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.