Coder Social home page Coder Social logo

Comments (3)

dtarb avatar dtarb commented on July 1, 2024

You are on the right track. Inunmap is the only function that uses netcdf. It is not on the make targets because we have not had time to sort this problem out.

Netcdf is available from Unidata. See https://www.unidata.ucar.edu/software/netcdf/. Hopefully some information there can help you out.

I also noticed that in the Windows compilation the netcdf.h file is in a GDAL folder, which suggests that GDAL may provide the functions needed. Setting up paths to find this thus also has a possibility of working.

I hope that either of these suggestions can move you along. I would actually prefer to remove the netcdf dependency and use text files instead, but have not had time to do this. It requires C code changing.

Also, given that you are working in Google Colab, you might try swing for the fence and !pip install netcdf4 at the beginning and see if you get an installation that you can link TauDEM to.

Good luck!

from taudem.

amoodie avatar amoodie commented on July 1, 2024

Thanks, I've installed the netcdf library with sudo apt install netcdf-dev which places the netCDF C header file (netcdf.h) in /usr/include (I verified, it is there). Compilation still fails with the same error (undefined reference to symbol 'nc_open')

I checked the makefile C compiler options and checked the output of nc-config --cflags is indeed as expected:

$ nc-config --cflags
-I/usr/include -I/usr/include/hdf5/serial

Is there some cache that needs to be cleared with the makefile or something? Sorry, I'm again pushing my understanding of C here... Any suggestions appreciated, but I acknowledge we're in some "unsupported feature" territory now.

Note: pip installing did not work (C header still not found). I have not tried linking GDAL libraries, and to be honest, I wouldn't really know where to start on that.

from taudem.

amoodie avatar amoodie commented on July 1, 2024

Alright I've worked out a way to make this work.

Installing netcdf libraries with

sudo apt install libhdf5-serial-dev netcdf-bin libnetcdf-dev libnetcdff-dev --yes

Then using the changes on the branch here allowed me to compile inunmap successfully. Most significant changes were to the CMakeLists.txt file, and a FindXXXX.cmake file for the netcdf library (stolen from Jed Brown's repo here). I guess these paths can probably be specified directly too somehow, but I didn't know how.

Sharing this in case it's helpful for any of your future development, and it will at least allow Paola to move forward with her lab exercise. Looks like Yan also sent Paola a cleaner way to compile and install on Colab, which will be helpful in the future.

For what it's worth to one of the above suggestions, I did look in /usr/include/gdal (was installed with sudo apt install gdal-bin libgdal-dev) and there is not a copy of netcdf.h in that folder.

from taudem.

Related Issues (20)

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.