stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
102 stars 27 forks source link

[LFRic] Variable stencil depth in different regions/directions #486

Open TeranIvy opened 4 years ago

TeranIvy commented 4 years ago

Due to application of stencils near a lateral boundary sizes in a specified region LFRic need the stencil sizes to be different in different directions, i.e. long stencils parallel to the boundary and short stencils normal to the boundary. This may be achieved using 1d stencils with direction-dependent stencil extent, or by using the 2d stencil region which has variable size according to the cell connectivity.

Relevant LFRic ticket is 1914 and this functionality will also require some LFRic infrastructure work. The related issue for region stencils in PSyclone is #194.

arporter commented 3 years ago

@andrewcoughtrie does what you're doing in #912 address this issue?

andrewcoughtrie commented 3 years ago

@arporter I think it does yes, LFRic 1914 has been superseded by 1972 (1914 is now closed) which is the overarching ticket covering a number of LAM infrastructure change tickets, including 2170, for which the stencil work in #912 was done. So although this sounds like a slightly different use case (which I'm unclear as to whether they want to use now), it's implementation would be covered mostly by the changes in #912, some additions would be needed to the LFRic infrastructure to allow people to make a choice about the length of branches in different directions but this would use the same PSyclone code as CROSS2D (So i suppose it would only need additional names adding for the logic).