Code Monkey home page Code Monkey logo

wflow's Introduction

openstreams-bmi

openstreams-bmi is a Python package to couple water related models on top of the basic model interface (BMI).

wflow's People

Contributors

arthur-lutz avatar aweerts avatar ctenvelden avatar cthiange avatar danieltollenaar avatar dirkeilander avatar evetion avatar hboisgon avatar hcwinsemius avatar imme1992 avatar jaapschellekens avatar laurenebouaziz avatar mischaj avatar pieter9011 avatar sandercdevries avatar siggyf avatar tanjaeuser avatar verseve avatar visr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wflow's Issues

Problem with -I command-line option

I want to use -I command-line option to start model with default initial conditions but in that case I get message:
"wflow_sbm - ERROR - problem while reading state variable from disk: .../examples/wflow_rhine_sbm/instate/SurfaceRunoff.map Suggest to use the -I option to restart"

but I already used -I option, I start script like this:

python c:\Anaconda\Scripts\wflow_sbm.py -C wflow_rhine_sbm -R testing -I

Do you know what is the problem?

Installing wflow on Ubuntu 18.04 LTS

Hello,

I am not sure if this is the right place to post this (in the Issues section). However, since it took me some time to install wflow on Ubuntu 18.04 LTS, I figured I'll share this, maybe it helps somebody. For my specific application, I want the Python distribution to be as lean as possible. Therefore, I was not going for the Anaconda environment solution.

Compile PCRaster from source:

sudo apt install cmake gcc g++ git qtbase5-dev libncurses5-dev libqwt-qt5-dev libxerces-c-dev libboost-all-dev libgdal-dev python3-numpy python3-docopt
wget http://pcraster.geo.uu.nl/pcraster/4.2.1/pcraster-4.2.1.tar.bz2
tar xf pcraster-4.2.1.tar.bz2 && cd pcraster-4.2.1
mkdir build && cd build
cmake -DFERN_BUILD_ALGORITHM:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=$HOME/pcraster -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 ..
cmake --build .
make install
export PATH=$PATH:$HOME/pcraster/bin
export PYTHONPATH=$PYTHONPATH:$HOME/pcraster/python

Since the automatic installation of the required Python packages did not work for me, I installed them manually using pip

sudo apt install python3-pip
pip3 install numpy
pip3 install scipy
pip3 install GDAL==$(gdal-config --version | awk -F'[.]' '{print $1"."$2}') --global-option=build_ext --global-option="-I/usr/include/gdal"
pip3 install netcdf4
pip3 install pyproj
sudo apt-get install libllvm-9-ocaml-dev libllvm9 llvm-9 llvm-9-dev llvm-9-doc llvm-9-examples llvm-9-runtime
export LLVM_CONFIG='/usr/bin/llvm-config-9'
pip3 install numba
pip3 install python-dateutil

Afterwards I was cloning the git repository to my $Home directory

cd $HOME
git clone https://github.com/openstreams/wflow.git

I had to excluded the required packages in the setup.py file, which is located in $HOME/wflow/setup.py

install_requires=[
    #   "numpy",
    #    "scipy",
   #     "gdal",
   #     "netCDF4",
   #     "xarray",
    #    "cftime",
   #     "numba",
   #     "pyproj",
    #    "python-dateutil",
    ], 

At last wflow can be installed by using pip

cd wflow
pip3 install -e .

Cheers, Sebastian

improvement SWE

In wflow_sbm and wflow_hbv, SWE is calculated for whole grid. SWE should only be calculated for active cells only

wflow_sbm topog transfer method

wflow/wflow/wflow_sbm.py

Lines 260 to 272 in 60e9def

def unsatzone_flow(UStoreLayerDepth, InfiltSoilPath, L, z, KsatVerFrac, c, KsatVer, f, thetaS, thetaR, SoilWaterCapacity, SWDold, shape_layer, TransferMethod):
m = 0
UStoreLayerDepth[m] = UStoreLayerDepth[m] + InfiltSoilPath
if L[m] > 0.0:
#sbm option for vertical transfer (only for 1 layer)
if (TransferMethod == 1 and shape_layer == 1):
Sd = SoilWaterCapacity - SWDold
if Sd <= 0.00001:
st = 0.0
else:
st = KsatVerFrac[m] * KsatVer * (min(UStoreLayerDepth[m],L[m]*(thetaS-thetaR))/Sd)

In the original topog soil transfer routine, shouldn't the last line here be:

st = KsatVerFrac[m] * KsatVer * np.exp(-f*z[m]) * (min(UStoreLayerDepth[m],L[m]*(thetaS-thetaR))/Sd)

Otherwise KSat doesn't decay with depth and rather surface KSat (K0) values are always applied.

The decay is implemented in the wflow soil transfer implementation:

wflow/wflow/wflow_sbm.py

Lines 238 to 242 in 60e9def

def unsatzone_flow_layer(USd,KsatVerFrac,KsatVer,f,z,L_sat,c):
sum_ast = 0
#first transfer soil water > maximum soil water capacity layer (iteration is not required because of steady theta (USd))
st = KsatVerFrac * KsatVer * np.exp(-f * z) * min((USd/L_sat)**c,1.0)

modelbuilder fails in api_get_rivers

Trying to run modelbuilder.py over a rectangular region covering the niger delta yields the error

python modelbuilder.py --geojson-path ~/Downloads/map.geojson --cellsize 0.05 --name nigeria
rows: 395 cols: 550
INFO:WTOOLS:Writing Geotiff clone to /home/gvdoord/Software/wflow/wflow-py/Scripts/wtools_py/nigeria/mask/mask.tif
INFO:WTOOLS:Writing Delft-FEWS grid definition to /home/gvdoord/Software/wflow/wflow-py/Scripts/wtools_py/nigeria/mask/grid.xml
INFO:WTOOLS:Writing shape of clone to /home/gvdoord/Software/wflow/wflow-py/Scripts/wtools_py/nigeria/mask/mask.shp
INFO:WTOOLS:Model contains 217250 cells
500 Server Error: INTERNAL SERVER ERROR for url: http://hydro-engine.appspot.com/get_rivers
{
  "error": {
    "message": "Collection query aborted after accumulating over 5000 elements.", 
    "stack": "Traceback (most recent call last):\n  File \"/env/lib/python3.6/site-packages/flask/app.py\", line 1612, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/env/lib/python3.6/site-packages/flask/app.py\", line 1598, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"/home/vmagent/app/hydroengine_service/main.py\", line 965, in api_get_rivers\n    data = selected_rivers.getInfo()\n  File \"/env/lib/python3.6/site-packages/ee/collection.py\", line 127, in getInfo\n    return super(Collection, self).getInfo()\n  File \"/env/lib/python3.6/site-packages/ee/computedobject.py\", line 95, in getInfo\n    return data.computeValue(self)\n  File \"/env/lib/python3.6/site-packages/ee/data.py\", line 349, in computeValue\n    return send_('/value', ({'json': obj.serialize(), 'json_format': 'v2'}))\n  File \"/env/lib/python3.6/site-packages/ee/data.py\", line 914, in send_\n    raise ee_exception.EEException(json_content['error']['message'])\nee.ee_exception.EEException: Collection query aborted after accumulating over 5000 elements.\n", 
    "type": "UnexpectedException"
  }, 
  "success": false
}

some content missed in one script

Hi,
i am trying to run the wflow_prepare.ipynb in path ./wflow/notebooks,
however, i found something missed in [12]:

tr.lddcreate("ldd.map",dem,True,
tr.report('ldd.map',ldd)

this makes confuse to me. Can you help me complete this code?
Thanks for your kind support.

Best regards,
Percy

Why I cannot load UStoredepth corretly

Hi, i have confronted an issue when run the script (https://github.com/openstreams/wflow/tree/master/notebooks/wflow-test-sbm.ipynb).
in [7], i have gotten the map dislike the map in the demo, as follows,

image

which is different from the figure as in the notebook like
image

and i have tried to directly import this data using

import pcraster as pcr

demfilename = "instate/UStoreDepth.map"
dem = pcr.readmap(demfilename)

and got the map as follows,
image

i am confused about the difference and have not find the dir in the original code source.

Could you please help me figure it out? Thank you very much!

wflow_emwaq fails writing fews output if runId contains directory

@hboisgon
If the runID contains a directory line 2305 comroot = os.sep.join([dwdir, "com", runId]) fails because it cannot create the directory and thus cannot create the file.

I suggest to remove the runID since you generally only couple one run (unless it is necessary for another reason). The resulting line would then read:
comroot = os.sep.join([dwdir, "com"])

The com files are then written to dwdir.

UStoreLayerDepth.map missing and NetCDF stuff

Hi,

I'm unable to run example as written in readme:

Python c:\Anaconda\scripts\wflow_sbm.py -C wflow_rhine_sbm -T 100 -R testing

There are some errors and script quit complains that was unable to found "UStoreLayerDepth.map" inside "instate" folder.

I've tried to rename "UStoreDepth.map" in "UStoreLayerDepth.map" but it crash.
How to fix this ?
(Below you can find pasted log from "testing" folder)

I would to use NetCDF format.
There is a "wflow_sbm_NC.ini" file inside examples\wflow_rhine_sbm\ folder
and a "wflow_sbm_NC.ini" file inside examples\wflow_rhine_sbm_nc\ folder
Which one will work ?

Thank you.

2017-03-10 10:46:43,927 - wflow_sbm - DEBUG - File logging to c:\REPO\wflow-master\examples\wflow_rhine_sbm\testing\wflow.log
2017-03-10 10:46:43,928 - wflow_sbm - INFO - wflow_sbm 1.0.master.1 Case: c:\REPO\wflow-master\examples\wflow_rhine_sbm Runid: testing
2017-03-10 10:46:43,930 - wflow_sbm - INFO - Initialise framework version: 1.0.master(1.0.master.1)
2017-03-10 10:46:43,934 - wflow_sbm - ERROR - Ini file made for sbm but found main in code.
2017-03-10 10:46:43,951 - wflow_sbm - INFO - Adding csv output at c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps/wflow_landuse.map function: average
2017-03-10 10:46:43,954 - wflow_sbm - INFO - Adding csv output at c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps/wflow_subcatch.map function: average
2017-03-10 10:46:43,957 - wflow_sbm - INFO - Adding tss output at c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps/wflow_gauges.map function: average
2017-03-10 10:46:43,957 - wflow_sbm - INFO - running for 29 timesteps
2017-03-10 10:46:43,959 - wflow_sbm - INFO - Applying the original topog_sbm lateral transfer formulation
2017-03-10 10:46:43,960 - wflow_sbm - INFO - Applying the original topog_sbm vertical transfer formulation
2017-03-10 10:46:43,967 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_riverlength.map) not present, returning 0.0
2017-03-10 10:46:43,973 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_inflow.map) not present, returning 0.0
2017-03-10 10:46:43,974 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_riverwidth.map) not present, returning 0.0
2017-03-10 10:46:43,977 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbmstaticmaps\wflow_tempcor.map) not present, returning 0.0
2017-03-10 10:46:43,980 - wflow_sbm - INFO - Linking parameters to landuse, catchment and soil...
2017-03-10 10:46:43,982 - wflow_sbm - INFO - Adding Precipitation to model.
2017-03-10 10:46:43,983 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\inmaps\P.map) not present, returning 0.0
2017-03-10 10:46:43,983 - wflow_sbm - INFO - Adding PotenEvap to model.
2017-03-10 10:46:43,984 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\inmaps\PET.map) not present, returning 0.0
2017-03-10 10:46:43,986 - wflow_sbm - INFO - Adding Temperature to model.
2017-03-10 10:46:43,986 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\inmaps\TEMP.map) not present, returning 10.0
2017-03-10 10:46:43,987 - wflow_sbm - INFO - Adding Inflow to model.
2017-03-10 10:46:43,989 - wflow_sbm - INFO - Adding IrrigationAreas to model.
2017-03-10 10:46:43,990 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_irrigationareas.map) not present, returning 0.0
2017-03-10 10:46:43,990 - wflow_sbm - INFO - Adding IrrigationSurfaceIntakes to model.
2017-03-10 10:46:43,993 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_irrisurfaceintake.map) not present, returning 0.0
2017-03-10 10:46:43,994 - wflow_sbm - INFO - Adding IrrigationPaddyAreas to model.
2017-03-10 10:46:43,996 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_irrigationpaddyareas.map) not present, returning 0.0
2017-03-10 10:46:43,999 - wflow_sbm - INFO - Adding IrrigationSurfaceReturn to model.
2017-03-10 10:46:44,000 - wflow_sbm - INFO - Adding h_max to model.
2017-03-10 10:46:44,000 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_hmax.map) not present, returning 0.0
2017-03-10 10:46:44,002 - wflow_sbm - INFO - Adding h_min to model.
2017-03-10 10:46:44,003 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_hmin.map) not present, returning 0.0
2017-03-10 10:46:44,006 - wflow_sbm - INFO - Adding h_p to model.
2017-03-10 10:46:44,006 - wflow_sbm - DEBUG - Static input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\staticmaps\wflow_hp.map) not present, returning 0.0
2017-03-10 10:46:44,007 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/RunoffGeneratingGWPerc.tbl) returning default value: 0.1
2017-03-10 10:46:44,013 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/MaxCanopyStorage.tbl
2017-03-10 10:46:44,017 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/CanopyGapFraction.tbl
2017-03-10 10:46:44,023 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/EoverR.tbl
2017-03-10 10:46:44,032 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/RootingDepth.tbl
2017-03-10 10:46:44,036 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/rootdistpar.tbl) returning default value: -8000
2017-03-10 10:46:44,042 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/InfiltCapSoil.tbl
2017-03-10 10:46:44,043 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/CapScale.tbl) returning default value: 100.0
2017-03-10 10:46:44,049 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/InfiltCapPath.tbl
2017-03-10 10:46:44,053 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/MaxLeakage.tbl
2017-03-10 10:46:44,056 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/MaxPercolation.tbl) returning default value: 0.0
2017-03-10 10:46:44,062 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/PathFrac.tbl
2017-03-10 10:46:44,072 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/SoilThickness.tbl
2017-03-10 10:46:44,078 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/thetaR.tbl
2017-03-10 10:46:44,082 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/thetaS.tbl
2017-03-10 10:46:44,094 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/SoilMinThickness.tbl
2017-03-10 10:46:44,099 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/KsatVer.tbl
2017-03-10 10:46:44,104 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/MporeFrac.tbl) returning default value: 0.0
2017-03-10 10:46:44,107 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/KsatHorFrac.tbl) returning default value: 1.0
2017-03-10 10:46:44,114 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/M.tbl
2017-03-10 10:46:44,119 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/N.tbl
2017-03-10 10:46:44,125 - wflow_sbm - INFO - Creating map from table: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/N_River.tbl
2017-03-10 10:46:44,128 - wflow_sbm - INFO - reading map parameter file: c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl../staticmaps\WaterFrac.map
2017-03-10 10:46:44,130 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/et_reftopot.tbl) returning default value: 1.0
2017-03-10 10:46:44,134 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/c.tbl) returning default value: 10.0
2017-03-10 10:46:44,204 - wflow_sbm - WARNING - tbl file not found (c:\REPO\wflow-master\examples\wflow_rhine_sbm/intbl/KsatVerFrac.tbl) returning default value: 1.0
2017-03-10 10:46:44,213 - wflow_sbm - INFO - Initializing of model variables..
2017-03-10 10:46:44,260 - wflow_sbm - INFO - Saving summary maps...
2017-03-10 10:46:44,260 - wflow_sbm - INFO - End of initial section
2017-03-10 10:46:44,262 - wflow_sbm - INFO - Setting initial conditions from state files
2017-03-10 10:46:44,272 - wflow_sbm - DEBUG - State input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\instate\UStoreLayerDepth.map) not present, returning 0.0
2017-03-10 10:46:44,273 - wflow_sbm - DEBUG - State input data (c:\REPO\wflow-master\examples\wflow_rhine_sbm\instate\UStoreLayerDepth.map) not present, returning 0.0
2017-03-10 10:46:44,276 - wflow_sbm - ERROR - Required map: c:\REPO\wflow-master\examples\wflow_rhine_sbm\instate\UStoreLayerDepth.map not found, exiting..
2017-03-10 10:46:44,276 - wflow_sbm - ERROR - problem while reading state variable from disk: c:/REPO/wflow-master/examples/wflow_rhine_sbm/instate/UStoreLayerDepth.map Suggest to use the -I option to restart

Roughness not updated correctly

Dear all,

Correct me if I am wrong, but think there is a bug when updating the Manning roughness within the configuration file. For example:
[variable_change_once]
self.N = self.N * 10
is not recognized.

I think the problem is that the wf_multparameters() function within the initialization step (see function def initial(self) in the WflowModel class) is called at the wrong place. Currently, wf_multparameters() is called after estimating the alpha term for the kinematic wave (see self.AlpTermL = pow((self.N / (pcr.sqrt(self.landSlope))), self.Beta)). This leads to updating the N parameter for the output, but for the calculations the original parameter is used.

Best regards,
Sebastian

water balance calculation not correct

When iteration is applied to the kinematic wave, computed water balance errors of the kinematic wave increase substantially compared to the same run without iterations.

Linux installation problem Numba Wflow==2019.1

Hi, I have encountered a problem whilst installing wflow 2019.1 on Linux:

(wflow) [jaerts@int1 wflow]$ python -m wflow.wflow_sbm -C wflow_rhine_sbm -R testing
ERROR:root:  File "/home/jaerts/.conda/envs/wflow/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/jaerts/.conda/envs/wflow/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/nfs/home6/jaerts/wflow/wflow/wflow/wflow_sbm.py", line 75, in <module>
    from wflow.wflow_funcs import *
  File "/nfs/home6/jaerts/wflow/wflow/wflow/wflow_funcs.py", line 32, in <module>
    from numba.errors import NumbaPendingDeprecationWarning

Upgrading to numba==0.46.0 (in the environment.yml 0.42.0 installed) solves this problem because the warning is in numba>=0.44.0.

can't set up

use anaconda2.5 and follow your requests ,i can't set up wflow.The questions is :
UserWarning: The version specified ('1.0.master') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.

Problems running wflow example

Hello,
I have created a conda environment and I have installed wflow according to the documentation. However, when I wanted to check if the installation was correct, using the
python -m wflow.wflow_sbm -C wflow_rhine_sbm -R testing

I got the following error:

`ERROR:root: File "C:\Anaconda3\envs\wflow\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Anaconda3\envs\wflow\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Anaconda3\envs\wflow\lib\site-packages\wflow\wflow_sbm.py", line 75, in
from wflow.wflow_funcs import *
File "C:\Anaconda3\envs\wflow\lib\site-packages\wflow\wflow_funcs.py", line 32, in
from numba.errors import NumbaPendingDeprecationWarning

ERROR:root:<class 'ModuleNotFoundError'>: No module named 'numba.errors' `

How can I fix this issue?

Thanks for your reply

Kinematic wave iterations estimator results in pcrpow ** error

In case the input variable Q in this function contains of a pcr grid with only zeros, this function will produce a pcrpow error. This only occurs in case wflow is called through bmi. Stand-alone the issue seems to be circumvented as the function apparently is only called after the first time step when Q already contains non-zero values. I propose to test the Q grid for unique zero values or test if its maximum lies above zero. That should solve the issue for this specific condition.

Compatibility with Numba > 0.48

Using Numba greater than 0.48 will produce

  File "/opt/conda/envs/wflow/lib/python3.7/site-packages/wflow-2020.1.2.dev8+gfa963f4d.d20200901-py3.7.egg/wflow/wflow_sbm.py", line 75, in <module>
    from wflow.wflow_funcs import *
  File "/opt/conda/envs/wflow/lib/python3.7/site-packages/wflow-2020.1.2.dev8+gfa963f4d.d20200901-py3.7.egg/wflow/wflow_funcs.py", line 32, in <module>
    from numba.errors import NumbaPendingDeprecationWarning

ERROR:root:<class 'ModuleNotFoundError'>: No module named 'numba.errors'

Can be at least guarded against by #34. Possibly related to #29.

Does it work in linux like ubuntu?

As the title, I just want to make it work in ubuntu, but there is a crack as below:
model - ERROR - <type 'exceptions.AttributeError'>: 'WflowModel' object has no attribute 'sCatch'

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.