Giter Site home page Giter Site logo

jsosa / lfptools Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 11.0 20.56 MB

A set of python programs that can be run on the command line to prepare any LISFLOOD-FP simulation

License: BSD 3-Clause "New" or "Revised" License

Python 99.74% Shell 0.02% Dockerfile 0.24%

lfptools's People

Contributors

jsosa avatar pfuhe1 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

lfptools's Issues

Failed running `prepdata`

Hi, thank you for your marvellous tools, I met some question when using them, I really hope to solve these problems.
I am running Python 3.9.2 in a virtual env in WINDOWS. Here is my input:

python prepdata.py -i config.txt

My config file is fine, the content of which is:

[prepdata]
te = 115.533,35.205,118.99,37.5
out = C:/Users/mayib/Desktop/files
dem = C:/Users/mayib/Desktop/files/Shandong_Clip.tif
acc = C:/Users/mayib/Desktop/files/FlowAcc.tif
dir = C:/Users/mayib/Desktop/files/FlowDir.tif
nproc = 2
thresh = 1000
streamnet = 'yes'

Here is the error I met:

(mynetwork) C:\Users\mayib\Desktop\files\lfptools>python prepdata.py -i config.txt
C:\Users\mayib\Desktop\files\lfptools\prepdata.py:95: DeprecationWarning: The SafeConfigParser class has been renamed 
to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead. 
  config = configparser.SafeConfigParser({'overwrite':False,'acc_area':False})
Traceback (most recent call last):
    File "C:\Users\mayib\Desktop\files\lfptools\prepdata.py", line 638, in <module>
        prepdata(sys.argv[1:])
    File "C:\Users\mayib\Desktop\files\lfptools\prepdata.py", line 212, in prepdata
        if res == 3:
UnboundLocalError: local variable 'res' referenced before assignment

I have already tried to add the global res before line 212 as pointed out, but nothing happeded.


My question is:

  1. Must I run the code in a Linux environment? Because I add the nproc manually in my config file.
  2. What can I do to solve the problem?
  3. Can you give a more detailed user guide about prepdata and split? Just like your colab guide. Thanks a million!

Regards.

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.