Index: wflow-py/wflow/wflow_bmi.py =================================================================== diff -u -r8fc4e26c9cf424be10a5204df5d8f4b86a21c5bb -r81fa8786648bec668ca187e7e78214f57e79ad0a --- wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 8fc4e26c9cf424be10a5204df5d8f4b86a21c5bb) +++ wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 81fa8786648bec668ca187e7e78214f57e79ad0a) @@ -485,6 +485,17 @@ return dim[4,5] + def get_grid_spacing(self, long_var_name): + """ + Only return something for variables with a uniform grid. Otherwise raise ValueError. + + :var long_var_name: identifier of a variable in the model. + + :return the size of a grid cell for each of the dimensions of the given variable, e.g. [width, height]: for a 2D grid cell. + """ + raise NotImplementedError + + def get_grid_origin(self, long_var_name): """ Only return something for variables with a uniform grid. Otherwise raise ValueError. @@ -508,10 +519,22 @@ Numpy array of doubles: x coordinate of grid cell center for each grid cell, in the same order as the values returned by function get_value. For a rectilinear grid: x coordinate of column center for each column. """ - return self.myModel.xcoordinate(1) + return self.myModel.pcr2numpy(self.myModel.xcoordinate(1),0.0) + def get_grid_y(self, long_var_name): + """ + Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise ValueError. -XXXXXXXXXXXXX HIer gebleven + Input parameters: + String long_var_name: identifier of a variable in the model. + + Return value: + Numpy array of doubles: x coordinate of grid cell center for each grid cell, in the same order as the values returned by function get_value. + For a rectilinear grid: x coordinate of column center for each column. + """ + return self.myModel.pcr2numpy(self.myModel.ycoordinate(1),0.0) + + def get_var_count(self): """ Return number of variables