I need the SEBS model for my graduate article and find it in http://pcraster.geo.uu.nl/projects/applications/sebs/. install all software it need and verify all successful,but when I run the model in Canopy suggestted in PCraster web, a problem called "NameError: name 'readmap' is not defined " occurred. just like below:
**from pcraster import* import numpy
NameError Traceback (most recent call last) D:\Program Files\SEBS5\pcrsebs50.py in () 537 # Define inputs 538 # maps --> 539 DEM = readmap(guiInputMap('DEM','./example/dem90.map')) # Digital Elevation Model [m] 540 nd = readmap(guiInputMap('NDVI','./example/ndvi90.map')) # NDVI map [-] 541 T = readmap(guiInputMap('Surface Temperature [K]','./example/tkin90.map')) # Surface temperature [Kelvin] NameError: name 'readmap' is not defined**
What is wrong with it , can you show me a detail operation about dealing with the model. Thanks very much.
The operation 'readmap' is not defined. This means that you need to tell your system where to find both the pcraster bin and the pcraster python directories. The bin directory has the pcraster program and the python has the python library that comes with pcraster.
Under windows you would do this under advanced settings in control panel for environment variables. Essentially you are going to add the pcraster_4.0.2 /bin directory to the end of your PATH variable. If you don't have PYTHONPATH in your environmental variables, you'll add that as a new environment variable with the full directory to your pcraster-4.0.2 python directory.
Final notes: new entries on a string of directories are separated by ; (semi-colon). The directory you are pointing to does not have a trailing /. so if your pcraster is in program files as your above suggests, then it would look something like:
;d:\program files\pcraster-4.0.2\bin -> this for PATH ;d:\program files\pcraster-4.0.2\python -> this for PYTHONPATH (without the leading the leading ; if you don't already have a PYTHONPATH (perhaps pointing to another version of python))
Now, the above should work for your windows environment.