jsosa / lfptools Goto Github PK
View Code? Open in Web Editor NEWA 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
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
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:
nproc
manually in my config file.prepdata
and split
? Just like your colab guide. Thanks a million!Regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.