The refinement function refines in the horizontal plane. Automatically remove all-nan layers would be a bit out of place in this function. I would expect this feature to be part of the function that collects the REGIS data.
My case: I have a connection table that connects REGIS data to our own layers. Only after this weaving is done, I would like to remove the nan layers.
Desired change: remove the option remove_nan_layers from the refine function.
Changing the default value to False might break things without the user being aware of it.