Index: wflow-py/wflow/wflow_lib.py =================================================================== diff -u -r12ea40dc08628f654753679e0972e87b7bb12f7a -r74c9106bc711c80b9496353805ce09ae7e90f317 --- wflow-py/wflow/wflow_lib.py (.../wflow_lib.py) (revision 12ea40dc08628f654753679e0972e87b7bb12f7a) +++ wflow-py/wflow/wflow_lib.py (.../wflow_lib.py) (revision 74c9106bc711c80b9496353805ce09ae7e90f317) @@ -280,11 +280,15 @@ np_outflow = pcr2numpy(outflow, np.nan) np_outflow_linked = np_reslocs * 0.0 - np_outflow_linked[ - np.in1d(np_reslocs, np_linkedreslocs[np_outflow < 0]).reshape( - np_linkedreslocs.shape - ) - ] = np_outflow[np_outflow < 0] + with np.errstate(invalid='ignore'): + if np_outflow[np_outflow < 0] is not None: + np_outflow_linked[ + np.in1d(np_reslocs, np_linkedreslocs[np_outflow < 0]).reshape( + np_linkedreslocs.shape + ) + ] = np_outflow[np_outflow < 0] + + outflow_linked = numpy2pcr(Scalar, np_outflow_linked, 0.0) storage = ( @@ -303,7 +307,8 @@ ) np_outflow_nz = np_outflow * 0.0 - np_outflow_nz[np_outflow > 0] = np_outflow[np_outflow > 0] + with np.errstate(invalid='ignore'): + np_outflow_nz[np_outflow > 0] = np_outflow[np_outflow > 0] _outflow.append(np_outflow_nz) outflow_av_temp = np.average(_outflow, 0)