The array dcreate is allocated but never initialized

Added code to set dcreate to true if the dimension must be created and false if not.