fixed NPE bug of the write local grid when there is no geosubset selected, the bbx of the whole dataset will be used.