Confusion about global versus local arrays #525
-
If I run in parallel mode (eg |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Can I just use |
Beta Was this translation helpful? Give feedback.
-
The easiest way to achieve this within setup files is to pass Otherwise, you can use |
Beta Was this translation helpful? Give feedback.
The easiest way to achieve this within setup files is to pass
dist_safe=False
to@veros_routine
and to work on global arrays instead. Routines marked as non-dist safe will automatically perform gather and scatter operations at their boundaries. The code is executed on the main process which shouldn't be an issue for routines that are only called once (i.e., all exceptset_forcing
andafter_timestep
).Otherwise, you can use
veros.runtime_state.proc_idx
to get the(i, j)
index of the current process.