For some reason 'if ds.coords['lat'].size > 1: #If there is data inside biggrid ' was removed on line 289.
If it turns out that the dataset added has no data inside the biggrid region, the subsequent building of GTG and GTd will fail. Not sure why this was removed. I can not see anything elsewhere in the code that should prevent it from chrashing, which was why i came across this.
For some reason 'if ds.coords['lat'].size > 1: #If there is data inside biggrid ' was removed on line 289. If it turns out that the dataset added has no data inside the biggrid region, the subsequent building of GTG and GTd will fail. Not sure why this was removed. I can not see anything elsewhere in the code that should prevent it from chrashing, which was why i came across this.