Group computeGroup(String path, Variable v, Group parentGroup/*Ostensibly*/) { if (parentGroup == null) parentGroup = getRootGroup(); if (RC.getUseGroups()) { // If the path has '/' in it, then we need to insert // this variable into the proper group and rename it. However, // if this variable is within a structure, we cannot do it. if (v.getParentStructure() == null) { // HACK: Since only the grid array is used in converting // to netcdf-3, we look for group info on the array. String dodsname = v.getDODSName(); int sindex = dodsname.indexOf('/'); if (sindex >= 0) { assert (parentGroup != null); Group g = parentGroup.makeRelativeGroup(this, dodsname, true/*ignorelast*/); parentGroup = g; if (OLDGROUPCODE) { // change variable's name dodsname = dodsname.substring(dodsname.lastIndexOf('/') + 1); v.setName(dodsname); // change name } } } } return parentGroup; }
Group rootgroup = this.getRootGroup();