-
Notifications
You must be signed in to change notification settings - Fork 370
Description
In the yac-coupling branch, where we couple ICON and the EBFM to Elmer/Ice, the elmer grid information that YAC needs to interpolate the fields is currently computed using an external c-function (https://github.com/ElmerCSC/elmerfem/blob/yac-coupling/fem/src/elmer_grid.c). This function reads in the coordinates from the partitioned mesh files. The proj-string is currently also hard-coded (https://github.com/ElmerCSC/elmerfem/blob/yac-coupling/fem/src/elmer_grid.c#L59-L61). While this is working for the moment, it makes running Elmer/Ice on different domains (e.g. Svalbard, Antarctica) cumbersome for now.
From my point of view it would be ideal, if the user can provide the proj-string, while the mesh coordinates, cell-centers etc. are used from Elmer internals.
A shopping list of what YAC needs is the following:
int num_nodes // number of nodes stored on the local process
int num_elem // number of elements stored on the local process
int node_ids[num_nodes] // global ids of all local nodes
int elem_ids[num_elem] // global ids of all elem
double node_x[num_nodes] // x coords of local nodes
double node_y[num_nodes] // y coords of local nodes
int num_node_per_elem[num_elem] or int num_node_per_elem // number of nodes for each elem
int elem_to_node[SUM(num_node_per_elem[:])] or int elem_to_node[num_node_per_elem * num_elem] // local index of nodes for each elem; node of each elem have to be order either clock or counter-clock wise; values are in the range [0;num_nodes-1]; nodes of i'th elem are stored at elem_to_node[SUM(num_node_per_elem[0:i-1]):SUM(num_node_per_elem[0:i])]
some kind of information on the projection being used
If available (I can also compute it from node_x/node_y):
double elem_x[num_elem] // x coords of center of elem
double elem_y[num_elem] // y coords of center of elem