Optimizing a hacky coupler between Oceananigans and WRF #3675
Replies: 2 comments 8 replies
-
Hi @jakob-braga. Interesting work, do you have a link to the code you have written to share? As for coupling with an atmosphere, we have integrated Oceanigans with a prescribed atmosphere (not an atmospheric model) in ClimaOcean. You can check out how this coupling is implemented here. Essentially, we load the prescribed atmosphere using the We’re currently working on developing documentation and including examples to help users understand how to use ClimaOcean effectively. That said, coupling a GPU model with a CPU model can be inefficient due to the overhead of memory transfers between the two architectures. It might be more effective to run everything on the CPU if memory transfer is the bottleneck. Additionally, it is possible to call Fortran code from Julia (see here), which could allow coupling without the need for disk read/write operations. |
Beta Was this translation helpful? Give feedback.
-
Is your WRF implementation on the GPU? If not then you will always be limited by CPU-GPU data transfer. If you can run WRF on the GPU then getting this to work probably requires figuring out how to control your WRF simulation from julia (actually more specifically I think you need to be able to take a single WRF time-step from julia). If you are able to do that, then you might be able to setup a time-stepping algorithm that copies the Oceananigans-derived SST into the appropriate WRF variable in between time-steps. |
Beta Was this translation helpful? Give feedback.
-
Hello I've recently wrote a bit of hacky code that couples Oceananigans to WRF. In essence this is what the code looks like within a single time step of Oceananignas:
It seems to work pretty well, however clearly the writing and reading to files on every time step of the ocean model it a huge bottleneck and is going to seemingly cause problems running on GPU.
Has anyone done something like this before? If so were you able to overcome this bottleneck somehow?
Beta Was this translation helpful? Give feedback.
All reactions