Host cell IDs for LGR sometimes written to XML - how to force write to HDF5?

I am currently using Fesapi version for C# extension; I noted that if there is only one host (parent) cell in the model with LGR, then the bulk data for host cells (populated using setParentWindow API) is written instead to the XML file in the EPC, but if the model has more than one host (parent) cell, it is written to the HDF5. Besides trying to manually write the bulk data to the HDF5 after the EPC is generated, is there any way to force the data to always be written to the HDF5 file regardless of how many host cells are there?
Thank you,

Hi Sunil,

The standard clearly allows to optimize the transfer in such a case.
Why would we code FESAPI in a non optimized way? Using HDF5 for storing a scalar is clearly not optimized at all. HDF5 is done to store (huge) numerical arrays.

It indeed exists several ways to transfer this one host (parent) cell (even more than only 2 ways) but I don’t think that it would be valuable to allow to write each different flavor. Inversely, this is important to be able to read each different flavor.
I think FESAPI should just concentrate on what the standard allows as the optimal way and let the other possible flavors.

Keep also in mind that RESQML2.2 will allow XML arrays and that more and more (little) arrays are going to be transferred in XML only.

1 Like

Thanks Philippe,
Agree with you about following the standard and optimizing the transfer. Thanks for confirming and also sharing about RESQML 2.2 standard using XML arrays for little arrays (question about that - how little is little in that case?). Basically I wanted to know what are some possible workarounds because in this case the client application (flow simulator) reading the RESQML is currently constrained to read bulk data directly from H5 in order to be compatible with their parallel I/O feature. What I had in mind in that case, was to manually access the H5 file after EPC generation, and write the bulk data using H5write at the relevant folder locations so that it is consistent with the format of the multi-host cell case. Hope that is reasonable approach.

Hi Sunil

The writer is free to choose what means “little”. FESAPI will either arbitrarily choose (as for storing only one host cell) or allow to set a memory maximum for “little” arrays.

Basically, the thing to do is in my opinion to “fix” the reader side. A honoring RESQML reader must not support only a subset of the standard functionality but the standard itself. Whatever is allowed by the standard should be allowed/supported by a RESQML “certifed” reader.

I doubt that it is going to be easy since you will have to change the H5 part but also the XML part (reference to the values) which is in EPC. But, technically speaking, yes this is a valid workaround.

If you don’t strictly want to honor the standard, you can also use FESAPI to send more than one host parent and tell to your reader to ignore the second host parent at reading time. You can use an extra metadata for that. But, really, here we are talking about how not to respect the standard which is definitely out of scope of this forum which intends to respect the standard and encourage its planned optimization.

1 Like

Thank you, for this it turned out to be a bug in my code, which I fixed (apologies for not following up). After that everything is working OK, and actually I never ran into that issue again.