Official version of SomToNCDF function and script containing all the required functions