Adapt grid sample dimension creation in case where metadata information are missing