Oceananigans.jl
                                
                                 Oceananigans.jl copied to clipboard
                                
                                    Oceananigans.jl copied to clipboard
                            
                            
                            
                        Add examples for setting initial conditions with Arrays on the docs (CPU and GPU)
Discussed in https://github.com/CliMA/Oceananigans.jl/discussions/2455
Originally posted by iuryt April 21, 2022 Hi,
I couldn't find an example from the docs that uses a regular array, converts to CudaArray and them use it as an initial condition for a GPU run. Do you guys have any example of that that could share? Maybe would be good to consider putting an example like this on the docs.
I think we should add examples on the docs for setting initial conditions with Arrays using CPU and GPU. https://clima.github.io/OceananigansDocumentation/stable/model_setup/setting_initial_conditions/#Setting-initial-conditions
I know that for CPU it should be straight forward, but I think it is important to make it clear. Also, it might not be like this for GPU.
There shouldn't be a difference between CPU vs GPU when using array initial conditions so if there it's a bug and let's fix it.
@iuryt we do have an example here:
https://github.com/CliMA/Oceananigans.jl/blob/3322f1879cf8c84c88e9c7cf4e33bdcf70520c36/examples/two_dimensional_turbulence.jl#L45-L53
which should work on the GPU. Do you think we need more?
We have an example!
Sorry for not replying this, it probably happened something that I forgot to answer, but this is all fine. Thanks.