visad/src/main/java/ucar/nc2/iosp/grid/GridHorizCoordSys.java
private void addGDSparams(Variable v) {
    // add all the gds parameters
    List<String> keyList = new ArrayList<>(gds.getKeys());
    Collections.sort(keyList);
    String pre = getGDSprefix();

    for (String key : keyList) {
      String name = pre + "_param_" + key;

      String vals = gds.getParam(key);
      try {
        int vali = Integer.parseInt(vals);
        if (key.equals(GridDefRecord.VECTOR_COMPONENT_FLAG)) {
          String cf = GridCF.VectorComponentFlag.of(vali);
          v.addAttribute(new Attribute(name, cf));
        } else {
          v.addAttribute(new Attribute(name, vali));
        }
      } catch (Exception e) {
        try {
          double vald = Double.parseDouble(vals);
          v.addAttribute(new Attribute(name, vald));
        } catch (Exception e2) {
          v.addAttribute(new Attribute(name, vals));
        }
      }
    }
  }
private void addGDSparams(Variable v) {
    // add all the gds parameters
    List<String> keyList = new ArrayList<>(gds.getKeys());
    Collections.sort(keyList);
    String pre = getGDSprefix();

    for (String key : keyList) {
      String name = pre + "_param_" + key;

      String vals = gds.getParam(key);
      try {
        int vali = Integer.parseInt(vals);
        if (key.equals(GridDefRecord.VECTOR_COMPONENT_FLAG)) {
          String cf = GridCF.VectorComponentFlag.of(vali);
          v.addAttribute(new Attribute(name, cf));
        } else {
          v.addAttribute(new Attribute(name, vali));
        }
      } catch (Exception e) {
        try {
          double vald = Double.parseDouble(vals);
          v.addAttribute(new Attribute(name, vald));
        } catch (Exception e2) {
          v.addAttribute(new Attribute(name, vals));
        }
      }
    }
  }
Add the GDS params to the variable as attributes

@param v the GDS params.