*
* @param gr record to check
* @return Parameter.
*/
public GridParameter getParameter(GridRecord gr) {
GribGridRecord ggr = (GribGridRecord) gr;
Grib2Pds pds = (Grib2Pds) ggr.getPds();
// NCEP is default, table has all parameters even local ones > 191
if (firstID.getCenter_id() == 7 ||
ggr.getParameterNumber() < 192 && pds.getParameterCategory() < 192 && ggr.getDiscipline() < 192)
return ParameterTable.getParameter(ggr.getDiscipline(), pds.getParameterCategory(), ggr.getParameterNumber());
else { // get local parameter for center
return ParameterTable.getParameter(ggr.getDiscipline(), pds.getParameterCategory(), ggr.getParameterNumber(), firstID.getCenter_id());
}
}