Package ucar.nc2.dataset

Examples of ucar.nc2.dataset.VariableDS.addAttribute()


        Variable lat = ncDataset.findVariable("radar_latitude");
        Variable lon = ncDataset.findVariable("radar_longitude");
        float    latv = (float)lat.readScalarDouble();
        float    lonv = (float)lon.readScalarDouble();
        Variable pv = ncDataset.findVariable("Projection");
        pv.addAttribute(new Attribute("longitude_of_projection_origin", lonv) );
        pv.addAttribute(new Attribute("latitude_of_projection_origin", latv) );

        Variable sdate = ncDataset.findVariable("start_date");
        Variable stime = ncDataset.findVariable("start_time");
        Variable tvar = ncDataset.findVariable("time");
View Full Code Here


        Variable lon = ncDataset.findVariable("radar_longitude");
        float    latv = (float)lat.readScalarDouble();
        float    lonv = (float)lon.readScalarDouble();
        Variable pv = ncDataset.findVariable("Projection");
        pv.addAttribute(new Attribute("longitude_of_projection_origin", lonv) );
        pv.addAttribute(new Attribute("latitude_of_projection_origin", latv) );

        Variable sdate = ncDataset.findVariable("start_date");
        Variable stime = ncDataset.findVariable("start_time");
        Variable tvar = ncDataset.findVariable("time");
        String dateStr = sdate.readScalarString();
View Full Code Here

      for (String vname : vars) {
        Variable v = ds.findVariable(vname);
        if (v != null) {
          AxisType atype = getAxisType(ds, (VariableEnhanced) v);
          if (atype != null)
            v.addAttribute(new Attribute(_Coordinate.AxisType, atype.name()));
        }
      }
    }

  }
View Full Code Here

  private boolean setAxisType(NetcdfDataset ds, String varName, AxisType atype) {
    Variable v = ds.findVariable(varName);
    if (v == null) return false;

    v.addAttribute(new Attribute(_Coordinate.AxisType, atype.toString()));
    return true;
  }
}
View Full Code Here

        Variable v = new Variable(ncfile, null, null, shortName+abbrev);
        v.setDataType(DataType.SHORT);
        v.setDimensions(dims);
        ncfile.addVariable(null, v);

        v.addAttribute( new Attribute("units", firstRay.getDatatypeUnits(abbrev)));
        v.addAttribute( new Attribute("long_name", longName));
        v.addAttribute( new Attribute("abbrev", abbrev));
        v.addAttribute( new Attribute("missing_value", firstRay.getMissingData()));
        v.addAttribute( new Attribute("signal_below_threshold", firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
        v.addAttribute( new Attribute("scale_factor", firstRay.getDatatypeScaleFactor(abbrev)));
View Full Code Here

        v.setDataType(DataType.SHORT);
        v.setDimensions(dims);
        ncfile.addVariable(null, v);

        v.addAttribute( new Attribute("units", firstRay.getDatatypeUnits(abbrev)));
        v.addAttribute( new Attribute("long_name", longName));
        v.addAttribute( new Attribute("abbrev", abbrev));
        v.addAttribute( new Attribute("missing_value", firstRay.getMissingData()));
        v.addAttribute( new Attribute("signal_below_threshold", firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
        v.addAttribute( new Attribute("scale_factor", firstRay.getDatatypeScaleFactor(abbrev)));
        v.addAttribute( new Attribute("add_offset", firstRay.getDatatypeAddOffset(abbrev)));
View Full Code Here

        v.setDimensions(dims);
        ncfile.addVariable(null, v);

        v.addAttribute( new Attribute("units", firstRay.getDatatypeUnits(abbrev)));
        v.addAttribute( new Attribute("long_name", longName));
        v.addAttribute( new Attribute("abbrev", abbrev));
        v.addAttribute( new Attribute("missing_value", firstRay.getMissingData()));
        v.addAttribute( new Attribute("signal_below_threshold", firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
        v.addAttribute( new Attribute("scale_factor", firstRay.getDatatypeScaleFactor(abbrev)));
        v.addAttribute( new Attribute("add_offset", firstRay.getDatatypeAddOffset(abbrev)));
       // v.addAttribute( new Attribute("_Unsigned", "false"));
View Full Code Here

        ncfile.addVariable(null, v);

        v.addAttribute( new Attribute("units", firstRay.getDatatypeUnits(abbrev)));
        v.addAttribute( new Attribute("long_name", longName));
        v.addAttribute( new Attribute("abbrev", abbrev));
        v.addAttribute( new Attribute("missing_value", firstRay.getMissingData()));
        v.addAttribute( new Attribute("signal_below_threshold", firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
        v.addAttribute( new Attribute("scale_factor", firstRay.getDatatypeScaleFactor(abbrev)));
        v.addAttribute( new Attribute("add_offset", firstRay.getDatatypeAddOffset(abbrev)));
       // v.addAttribute( new Attribute("_Unsigned", "false"));
View Full Code Here

        v.addAttribute( new Attribute("units", firstRay.getDatatypeUnits(abbrev)));
        v.addAttribute( new Attribute("long_name", longName));
        v.addAttribute( new Attribute("abbrev", abbrev));
        v.addAttribute( new Attribute("missing_value", firstRay.getMissingData()));
        v.addAttribute( new Attribute("signal_below_threshold", firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
        v.addAttribute( new Attribute("scale_factor", firstRay.getDatatypeScaleFactor(abbrev)));
        v.addAttribute( new Attribute("add_offset", firstRay.getDatatypeAddOffset(abbrev)));
       // v.addAttribute( new Attribute("_Unsigned", "false"));

        v.addAttribute( new Attribute("range_folding_threshold" ,firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
View Full Code Here

        v.addAttribute( new Attribute("units", firstRay.getDatatypeUnits(abbrev)));
        v.addAttribute( new Attribute("long_name", longName));
        v.addAttribute( new Attribute("abbrev", abbrev));
        v.addAttribute( new Attribute("missing_value", firstRay.getMissingData()));
        v.addAttribute( new Attribute("signal_below_threshold", firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
        v.addAttribute( new Attribute("scale_factor", firstRay.getDatatypeScaleFactor(abbrev)));
        v.addAttribute( new Attribute("add_offset", firstRay.getDatatypeAddOffset(abbrev)));
       // v.addAttribute( new Attribute("_Unsigned", "false"));

        v.addAttribute( new Attribute("range_folding_threshold" ,firstRay.getDatatypeRangeFoldingThreshhold(abbrev)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.