wrong merging of elements (elements over differnt layers are merged)

Mathias Bavay
2019-02-11T22:33:53Z

**This issue was reported by Thiemo Theile.**

Steps to reproduce the problem:
1. run snowpack with the attached files (and WFJ_optimaldataset_v7.smet) for one time step: -c iowfjref2.ini -e 2008-05-16T09:00
2. compare the input-caaml and the output-caaml (for example using niviz.org)

Expected result:
output-caaml should look like the input-caaml

Actual result:
elements from the MF-layer and the RG-layer are merged to a new layer. This should not happen!

I followed the problem up to WaterTransport.cc. If I switch off the function mergingElements (around line 1258), the problem disappears. If I switch off the key ""COMBINE_ELEMENTS"" in [SNOWPACKADVANCED] in the ini-file, the problem remains.

Is there a bug in the function WaterTransport::mergingElements? Is this merging necessary?

**Attachments**:
* [iowfjref2.ini](/uploads/0c54f8727fbfc26dc2a92c4c4c57eacf/iowfjref2.ini)
* [199712310830.SimpleProfile_sdbo.caaml](/uploads/1da252850de3417822cd352c4d93502d/199712310830.SimpleProfile_sdbo.caaml)