ESMCI / cmeps-cime

This is a "fork" of the cime repository that has the development version of the nuopc CMEPS driver and mediator
Other
0 stars 0 forks source link

Properly handle re-distribution of meshes transferred to the mediator #2

Open rsdunlapiv opened 6 years ago

rsdunlapiv commented 6 years ago

When a component transfers a mesh to the mediator via NUOPC, the number of Decomposition Elements (DEs) on the receiver side may not match the number of PETs. It is possible that the mediator will have some PETs where localDeCount == 0 and some PETs where localDeCount > 1. In most cases we prefer localDeCount == 1 for all PETs, but that need not be strictly enforced if there is appropriate logic in the mediator to handle these cases. This is especially important to check before pulling out a pointer from the field as it may not point to a valid location if localDeCount == 0. Currently, this is causing an issue with accessing an invalid pointer when the mediator PET count is greater than a component PET count.

From Gerhard: In principle, even now, you can set up any Mesh distribution you want on the acceptor side. The Connector will then compute a correct RH for it (independent on whether the provider side is on a Mesh or a Grid). The problem lies in setting up the desired acceptor side Mesh, starting with the information the Mediator received from the provider side. Tony nicely outlined the involved issues earlier. The steps forward (as I see it) are:

  1. make all the required information available (this affects the case where provider also has Mesh)
  2. make it easier to set up the desired acceptor Mesh once you have all the info (independent on whether provider was on Grid or Mesh)
  3. push generic code into the NUOPC Layer, especially for when providing a Grid, and wanting to accept it as a Mesh
rsdunlapiv commented 6 years ago

Example now available of how to do this: https://sourceforge.net/p/esmfcontrib/svn/HEAD/tree/NUOPC/trunk/AtmOcnMedTransferGridMakeMeshProto/med.F90#l520