A problem arises when the model variable referenced by get_value_ptr is dimensional--the input src argument is flattened, by definition, while the val variable is dimensional. This raises an exception with a message like
ValueError: could not broadcast input array from shape (48,) into shape (8,6)
In this example, the current set_value implementation is:
https://github.com/csdms/bmi-example-python/blob/e6b1e9105daef44fe1f0adba5b857cde1bbd032a/heat/bmi_heat.py#L239-L250
A problem arises when the model variable referenced by get_value_ptr is dimensional--the input
src
argument is flattened, by definition, while theval
variable is dimensional. This raises an exception with a message like