*
* @return long variable name
*/
private String makeLongName() {
Formatter f = new Formatter();
GridParameter param = lookup.getParameter(firstRecord);
f.format("%s", param.getDescription());
if (firstRecord instanceof GribGridRecord) {
GribGridRecord ggr = (GribGridRecord) firstRecord;
if (ggr.getEdition() == 2) {
Grib2Pds pds2 = (Grib2Pds) ggr.getPds();
String useGenType = pds2.getUseGenProcessType();
if (useGenType != null)
f.format("_%s", useGenType);
}
String suffixName = ggr.makeSuffix( );
if (suffixName != null && suffixName.length() != 0)
f.format("%s", suffixName);
if (ggr.isInterval()) {
String intervalName = makeIntervalName();
if (intervalName.length() != 0) {
String stat = ggr.getStatisticalProcessTypeNameShort();
if (stat != null)
f.format(" (%s for %s)", ggr.getStatisticalProcessTypeName(), intervalName);
else
f.format(" (%s)", intervalName);
}
}
}
String levelName = GridIndexToNC.makeLevelName(firstRecord, lookup);
if (levelName.length() != 0)
f.format(" @ %s", levelName);
return f.toString();
}