Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMI interface returns wrong data types #19

Open
sverhoeven opened this issue Nov 7, 2019 · 4 comments
Open

BMI interface returns wrong data types #19

sverhoeven opened this issue Nov 7, 2019 · 4 comments
Assignees

Comments

@sverhoeven
Copy link
Collaborator

Calling bmi methods via grcp4bmi and Docker is giving errors.

model.get_output_var_names() returns error with

Cell(['Fluxes leaving the model > flux_out', 'Internal fluxes > flux_in',
       'Storages (time = t) > S(t)', 'Water balance check > wb'],
      dtype=object) has type <class 'oct2py.io.Cell'>, but expected one of: (<class 'bytes'>, <class 'str'>)

model.get_value('flux_out') returns error with

Arrays with type {} cannot be transmitted through this GRPC channel
@sverhoeven sverhoeven self-assigned this Nov 7, 2019
@sverhoeven
Copy link
Collaborator Author

sverhoeven commented Nov 7, 2019

Following get_value fails:

  • S(t), must be array of float instead of float
  • mod, is a string while grpc4bmi only supports array of float/int/double, drop from get_value use get_component_name to get model name
  • par, must be array of float instead of float
  • sol, returns struct, move sol.name to get_component_name and make tol and iter avaliable as vars
  • wb, must be array of float instead of float

@sverhoeven
Copy link
Collaborator Author

  • get_input_var_names, list
  • get_output_var_names, list
  • get_time_units, str
  • get_time_step, float
  • get_current_time, float
  • get_start_time, float
  • get_end_time, float
  • get_var_grid, int = 1
  • get_var_type, str, each var is 'double'
  • get_var_itemsize, int, each var is 8
  • get_var_nbytes, int, each var is 8
  • get_grid_rank, int
  • get_grid_size, int
  • get_grid_type, str
  • get_grid_shape, list
  • get_grid_origin, list
  • get_grid_spacing, list
  • get_grid_x, list
  • get_grid_y, list
  • get_grid_z, list

@sverhoeven
Copy link
Collaborator Author

sverhoeven added a commit that referenced this issue Nov 13, 2019
sverhoeven added a commit that referenced this issue Nov 13, 2019
@sverhoeven
Copy link
Collaborator Author

@JaroCamphuijsen could you check if all functions accept and return the correct data types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants