cdm/src/main/java/ucar/nc2/Group.java
public boolean removeDimension(String dimName) {
    if (immutable) throw new IllegalStateException("Cant modify");
    for (int i = 0; i < dimensions.size(); i++) {
      Dimension d = dimensions.get(i);
      if (dimName.equals(d.getShortName())) {
        dimensions.remove(d);
        return true;
      }
    }
    return false;
  }
public boolean removeDimension(String dimName) {
    if (immutable) throw new IllegalStateException("Cant modify");
    for (int i = 0; i < dimensions.size(); i++) {
      Dimension d = dimensions.get(i);
      if (dimName.equals(d.getShortName())) {
        dimensions.remove(d);
        return true;
      }
    }
    return false;
  }
public boolean removeDimension ( String dimName ) { if ( immutable ) throw new IllegalStateException ( "Cant modify" ) ; for ( int i = 0 ; i < dimensions . size ( ) ; i ++ ) { Dimension d = dimensions . get ( i ) ; if ( dimName . equals ( d . getShortName ( ) ) ) { dimensions . remove ( d ) ; return true ; } } return false ; }
remove a Dimension using its name, in this group only

@param dimName Dimension name.
@return true if dimension found and removed
remove a Dimension using its name in this group only