ncfile.addAttribute(null, new Attribute("Conventions", "CF-1.4"));
String center = null;
String subcenter = null;
if ( lookup instanceof Grib2GridTableLookup ) {
Grib2GridTableLookup g2lookup = (Grib2GridTableLookup) lookup;
GribGridRecord ggr = (GribGridRecord) firstRecord;
center = g2lookup.getFirstCenterName();
ncfile.addAttribute(null, new Attribute("Originating_center", center));
subcenter = g2lookup.getFirstSubcenterName();
if (subcenter != null)
ncfile.addAttribute(null, new Attribute("Originating_subcenter", subcenter));
String model = g2lookup.getModel();
if (model != null)
ncfile.addAttribute(null, new Attribute("Generating_Model", model));
if (null != g2lookup.getFirstProductStatusName())
ncfile.addAttribute(null, new Attribute("Product_Status", g2lookup.getFirstProductStatusName()));
ncfile.addAttribute(null, new Attribute("Product_Type", g2lookup.getFirstProductTypeName()));
} else if ( lookup instanceof Grib1GridTableLookup ) {
Grib1GridTableLookup g1lookup = (Grib1GridTableLookup) lookup;
center = g1lookup.getFirstCenterName();
subcenter = g1lookup.getFirstSubcenterName();