passaH2O / dorado

For shallow-water Lagrangian particle routing.
https://passah2o.github.io/dorado
MIT License
54 stars 9 forks source link

JOSS Review - Warnings with parallel example #11

Closed gassmoeller closed 4 years ago

gassmoeller commented 4 years ago

Related to openjournals/joss-reviews#2585

I get the attached warnings when running examples/parallel_routing.py. May just be a minor version issue on my machine, but I just wanted to know what you think about them.

My package versions: python 3.8.2 (default install on ubuntu 20.04) numpy 1.17.4 matplotlib 3.1.2 scipy 1.3.3 future 0.18.2 tqdm 4.49.0

log.txt

elbeejay commented 4 years ago

Hi @gassmoeller, thanks for bringing this to our attention.

This ended up being due to the simplistic nature of our example cases in which we made the mistake of pointing our variables stage and depth to the same array in memory. This resulted in nan values entering the depth array, which later raised the warnings you pointed out.

In #15, we resolve this by updating the examples to use a copy of the array for setting one of the stage/depth variables and this warnings go away as the depth and stage variables no longer point to the same object in memory.

gassmoeller commented 4 years ago

Great, thanks! The warning is fixed.