public void setDimensions ( String dimString ) { if ( immutable ) throw new IllegalStateException ( "Cant modify" ) ; try { setDimensions ( Dimension . makeDimensionsList ( getParentGroup ( ) , dimString ) ) ; //this.dimensions = Dimension.makeDimensionsList(getParentGroup(), dimString); resetShape ( ) ; } catch ( IllegalStateException e ) { throw new IllegalArgumentException ( "Variable " + getFullName ( ) + " setDimensions = '" + dimString + "' FAILED: " + e . getMessage ( ) + " file = " + getDatasetLocation ( ) ) ; } }
Set the dimensions using the dimensions names . The dimension is searched for recursively in the parent groups .