osmose-model / osmose

OSMOSE: Modelling Marine Exploited Ecosystems
http://www.osmose-model.org/
GNU General Public License v3.0
20 stars 7 forks source link

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 #9

Closed Boylad closed 1 year ago

Boylad commented 1 year ago

Hi Nicolas, Greetings! In OSMOSE 4.3.3, an error occurs below. I have carefully checked the dimensions and values of all my NetCDF files and CSV map files. I can't fix it. I know little about Java. What do you think is the most probable reason causing this issue?

image

barriern commented 1 year ago

Hi @Boylad

This error is due to the fact that for some reasons, the school cannot move because it on land and is surrounded by land. Therefore, there is no accessible surrounding cells and therefore the neighbour cell array has a length of 0, hence the error.

In order to be able to understand what the error might be, could you please send me your entire Osmose configuration (via FileSender or anything similar)?

Thanks

@barriern

Boylad commented 1 year ago

Hi @Boylad

This error is due to the fact that for some reasons, the school cannot move because it on land and is surrounded by land. Therefore, there is no accessible surrounding cells and therefore the neighbour cell array has a length of 0, hence the error.

In order to be able to understand what the error might be, could you please send me your entire Osmose configuration (via FileSender or anything similar)?

Thanks

@barriern

Yes! After increased the value of the movement.randomwalk.range , the code worked. I will continue to explore this model and will consult you again if I encounter any issues later on.