Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

finding neighboring grid

yfang

Yilin Fang
Member
Hi, I'm trying to find out the neighbors of a structured grid in the land component. Where can I start in the code? Thanks!
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
This is actually a big ask, since we've intentionally made the grid cell neighbors irrelevant. That way it doesn't matter what order you process the grid cells in, and doesn't require communicating halo information between neighboring grid cells. So it makes CTSM "embarrassingly parallel" and very fast. But, it also means that neighbor grid cells are scattered around and getting information on the neighboring gridcells is problematic.

What is the science question that you need to know the neighboring grid cells?

We did have some discussion of this issue in FATES on github in the context of seed dispersal here:

 

yfang

Yilin Fang
Member
@erik Thanks for pointing me to the discussion. I'm interested in flux exchange between grid cells. I noticed you touched on it in the discussion.
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
So exchange of soil moisture and heat between grid cells? Unfortunately CTSM would be horrible for that, you'd likely be better off looking at a different model. Something like exchange of seeds on a yearly basis would be inefficient, but if it's done seldom enough it would be OK. But, if you are exchanging fluxes on each time-step that would make it perform really horribly. I suppose if you have a small grid and aren't too concerned with performance you could get something to work, but it won't be optimal. So as long as you know that from the start.
 
Top