Repository navigation
Replies: 2 comments 5 replies
|
From an LFRic developer point of view I can't think of reasons why this could not work as you have observed. However, I note some issues and questions below. The PSyclone developers would need to be consulted. Can you summarise your requirement. Are you using both horizontal and vertical components of the W2 field? Could you write this kernel as a non DOMAIN kernel - looping over cells? The DOMAIN kernels were originally provided with physics requirements in mind. A key aim was to allow the data order to be reordered from column-first to layer-first in line with the API of the physics schemes being transferred as is from the UM. If you need to reorder the genuine discontinuous fields in this kernel, can you split out the part of the operation that uses W2 into a separate kernel? Does a DOMAIN kernel make sense with a W2 field - which traditionally holds an FEM field? Note, pretending it is a discontinuous field may produce wrong answers if we ran without redundant computation (currently, we run with redundant computation as the reduction in halo swaps outweighs the cost of extra computation). In such a configuration, the W2 field on most ranks will contain annexed dofs that require a halo swap prior to the kernel call. Their marking as a discontinuous field may mean they don't get one. PSyclone would have to properly take this into account. Also, I note that a domain kernel declarations can reference the |
|
I feel it would be preferable to move the components of the wind that you need onto a W2h broken space to preserve the behaviour when running without redundant computation and to avoid the need to stretch the requirement for domain kernels too far. For interest, are you transposing both W2 and cell-centre fields to layer-first ordering before passing to the physics? Your comment does highlight a need to support build-time configuration of PSyclone so that we can test with and without redundant computation. It sounds like we are building technical debt into the model that would hurt us if for any reason we did not want to do redundant computation (though maybe that is unlikely...?). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to pass the W2 wind into a
DOMAINkernel. PSyclone immediately tells me that this is not allowed, only discontinuous fields can be used inDOMAINkernels.I can see why this would cause issues if trying to write to a continuous field, however I'm passing it in as
GH_READ, I only want to read from the field.If I change the Psyclone metadata to define the function space as
ANY_DISCONTINUOUS_SPACEinstead of W2, it works and produces the results I would expect, i.e. theDOMAINkernel can successfully read from the W2 function space.Is PSyclone just being over-defensive in preventing a W2/
GH_READfield being passed to aDOMAINkernel, or is there good reason not to do this?All reactions