/** * Add the global attributes. * * @param ncfile the file to add to */ protected void addLightningGlobalAttributes(NetcdfFile ncfile) { super.addLightningGlobalAttributes(ncfile); ncfile.addAttribute(null, new Attribute("title", "NLDN Lightning Data")); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "NLDN-CDM")); }
/** * Add the global attributes. * * @param ncfile the file to add to */ protected void addLightningGlobalAttributes(NetcdfFile ncfile) { super.addLightningGlobalAttributes(ncfile); ncfile.addAttribute(null, new Attribute("title", "NLDN Lightning Data")); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "NLDN-CDM")); }
/** * Add the global attributes. * * @param ncfile the file to add to */ protected void addLightningGlobalAttributes(NetcdfFile ncfile) { super.addLightningGlobalAttributes(ncfile); ncfile.addAttribute(null, new Attribute("title", "NLDN Lightning Data")); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "NLDN-CDM")); }
/** * Add the global attributes. Specific implementations should call super * and then add their own. * @param ncfile the file to add to */ protected void addLightningGlobalAttributes(NetcdfFile ncfile) { ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.point.toString())); ncfile.addAttribute( null, new Attribute(CDM.HISTORY, "Read directly by Netcdf Java IOSP")); }
/** * Add the global attributes. Specific implementations should call super * and then add their own. * @param ncfile the file to add to */ protected void addLightningGlobalAttributes(NetcdfFile ncfile) { ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.point.toString())); ncfile.addAttribute( null, new Attribute(CDM.HISTORY, "Read directly by Netcdf Java IOSP")); }
/** * Add the global attributes. Specific implementations should call super * and then add their own. * @param ncfile the file to add to */ protected void addLightningGlobalAttributes(NetcdfFile ncfile) { ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.point.toString())); ncfile.addAttribute( null, new Attribute(CDM.HISTORY, "Read directly by Netcdf Java IOSP")); }
private void addGlobalAttributes(TagVGroup group) throws IOException { // look for attributes for (int i = 0; i < group.nelems; i++) { Tag tag = tagMap.get(tagid(group.elem_ref[i], group.elem_tag[i])); if (tag == null) throw new IllegalStateException(); if (tag.code == 1962) { TagVH vh = (TagVH) tag; if (vh.className.startsWith("Att")) { String lowername = vh.name.toLowerCase(); if ((vh.nfields == 1) && (H4type.setDataType(vh.fld_type[0], null) == DataType.CHAR) && ((vh.fld_isize[0] > 4000) || lowername.startsWith("archivemetadata") || lowername.startsWith("coremetadata") || lowername.startsWith("productmetadata") || lowername.startsWith("structmetadata"))) { ncfile.addVariable(null, makeVariable(vh)); // // large EOS metadata - make into variable in root group } else { Attribute att = makeAttribute(vh); if (null != att) ncfile.addAttribute(null, att); // make into attribute in root group } } } } group.used = true; }
private void addGlobalAttributes(TagVGroup group) throws IOException { // look for attributes for (int i = 0; i < group.nelems; i++) { Tag tag = tagMap.get(tagid(group.elem_ref[i], group.elem_tag[i])); if (tag == null) throw new IllegalStateException(); if (tag.code == 1962) { TagVH vh = (TagVH) tag; if (vh.className.startsWith("Att")) { String lowername = vh.name.toLowerCase(); if ((vh.nfields == 1) && (H4type.setDataType(vh.fld_type[0], null) == DataType.CHAR) && ((vh.fld_isize[0] > 4000) || lowername.startsWith("archivemetadata") || lowername.startsWith("coremetadata") || lowername.startsWith("productmetadata") || lowername.startsWith("structmetadata"))) { ncfile.addVariable(null, makeVariable(vh)); // // large EOS metadata - make into variable in root group } else { Attribute att = makeAttribute(vh); if (null != att) ncfile.addAttribute(null, att); // make into attribute in root group } } } } group.used = true; }
nc.addAttribute(null, new Attribute("summary", "Dorade radar data " + "from radar " + mySweep.getSensorName(0) + " in the project " + mySweep.getProjectName())); nc.addAttribute(null, new Attribute("radar_name", mySweep.getSensorName(0))); nc.addAttribute(null, new Attribute("project_name", mySweep.getProjectName())); nc.addAttribute(null, new Attribute("keywords_vocabulary", "dorade")); nc.addAttribute(null, new Attribute("geospatial_lat_min", new Float(lat_min[0]))); nc.addAttribute(null, new Attribute("geospatial_lat_max", new Float(lat_max[0]))); nc.addAttribute(null, new Attribute("geospatial_lon_min", new Float(lon_min[0]))); nc.addAttribute(null, new Attribute("geospatial_lon_max", new Float(lon_max[0]))); nc.addAttribute(null, new Attribute("geospatial_vertical_min", new Float(lon_min[0]))); nc.addAttribute(null, new Attribute("geospatial_vertical_max", new Float(lon_max[0]))); Date [] dd = mySweep.getTimes(); nc.addAttribute(null, new Attribute("time_coverage_start", dd[0].toString())); nc.addAttribute(null, new Attribute("time_coverage_end", dd[dd.length-1].toString())); nc.addAttribute(null, new Attribute("Content", "This file contains one scan of remotely sensed data")); nc.addAttribute(null, new Attribute(CDM.CONVENTIONS, _Coordinate.Convention)); nc.addAttribute(null, new Attribute(CF.FEATURE_TYPE, FeatureType.RADIAL.toString())); nc.addAttribute(null, new Attribute("format", "Unidata/netCDF/Dorade")); nc.addAttribute(null, new Attribute("Radar_Name", mySweep.getSensorName(0))); nc.addAttribute(null, new Attribute("Project_name", ""+mySweep.getProjectName())); nc.addAttribute(null, new Attribute("VolumeCoveragePatternName", mySweep.getScanMode(0).getName())); nc.addAttribute(null, new Attribute("Volume_Number", ""+mySweep.getVolumnNumber())); nc.addAttribute(null, new Attribute("Sweep_Number", ""+mySweep.getSweepNumber())); nc.addAttribute(null, new Attribute("Sweep_Date", mySweep.getTime().toString())); if(mySweep.sensorIsMoving(0) == true) nc.addAttribute(null, new Attribute("IsStationary", "0")); else nc.addAttribute(null, new Attribute("IsStationary", "1"));
private void addGlobalAttributes(TagVGroup group) throws IOException { // look for attributes for (int i = 0; i < group.nelems; i++) { Tag tag = tagMap.get(tagid(group.elem_ref[i], group.elem_tag[i])); if (tag == null) throw new IllegalStateException(); if (tag.code == 1962) { TagVH vh = (TagVH) tag; if (vh.className.startsWith("Att")) { String lowername = vh.name.toLowerCase(); if ((vh.nfields == 1) && (H4type.setDataType(vh.fld_type[0], null) == DataType.CHAR) && ((vh.fld_isize[0] > 4000) || lowername.startsWith("archivemetadata") || lowername.startsWith("coremetadata") || lowername.startsWith("productmetadata") || lowername.startsWith("structmetadata"))) { ncfile.addVariable(null, makeVariable(vh)); // // large EOS metadata - make into variable in root group } else { Attribute att = makeAttribute(vh); if (null != att) ncfile.addAttribute(null, att); // make into attribute in root group } } } } group.used = true; }
/** * Add a Global attribute to the file. Must be in define mode. * @param att the attribute. * @return the created attribute */ public Attribute addGlobalAttribute(Attribute att) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!N3iosp.isValidNetcdfObjectName(att.getShortName())) { String attName = N3iosp.makeValidNetcdfObjectName(att.getShortName()); log.warn("illegal netCDF-3 attribute name= "+att.getShortName() + " change to "+ attName); att = new Attribute(attName, att.getValues()); } return super.addAttribute(null, att); }
/** * Add a Global attribute to the file. Must be in define mode. * @param att the attribute. * @return the created attribute */ public Attribute addGlobalAttribute(Attribute att) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!N3iosp.isValidNetcdfObjectName(att.getShortName())) { String attName = N3iosp.makeValidNetcdfObjectName(att.getShortName()); log.warn("illegal netCDF-3 attribute name= "+att.getShortName() + " change to "+ attName); att = new Attribute(attName, att.getValues()); } return super.addAttribute(null, att); }
/** * Add a Global attribute to the file. Must be in define mode. * @param g the group to add to. if null, use root group * @param att the attribute. * @return the created attribute */ public Attribute addGroupAttribute(Group g, Attribute att) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!isValidObjectName(att.getShortName())) { String attName = createValidObjectName(att.getShortName()); log.warn("illegal attribute name= "+att.getShortName() + " change to "+ attName); att = new Attribute(attName, att.getValues()); } return ncfile.addAttribute(g, att); }
/** * Add a Global attribute to the file. Must be in define mode. * @param att the attribute. * @return the created attribute */ public Attribute addGlobalAttribute(Attribute att) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!N3iosp.isValidNetcdfObjectName(att.getShortName())) { String attName = N3iosp.makeValidNetcdfObjectName(att.getShortName()); log.warn("illegal netCDF-3 attribute name= "+att.getShortName() + " change to "+ attName); att = new Attribute(attName, att.getValues()); } return super.addAttribute(null, att); }
/** * Add a Global attribute to the file. Must be in define mode. * * @param g the group to add to. if null, use root group * @param att the attribute. * @return the created attribute */ public Attribute addGroupAttribute(Group g, Attribute att) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!isValidObjectName(att.getShortName())) { String attName = createValidObjectName(att.getShortName()); log.warn("illegal attribute name= " + att.getShortName() + " change to " + attName); att = new Attribute(attName, att.getValues()); } return ncfile.addAttribute(g, att); }
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException { this.raf = raf; this.ncfile = ncfile; init(); ncfile.addAttribute(null, new Attribute(CDM.HISTORY, "Direct read of NMC ON29 by CDM")); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "Unidata")); ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.timeSeriesProfile.toString())); try { ncfile.addDimension(null, new Dimension("station", stations.size())); Structure station = makeStationStructure(); ncfile.addVariable(null, station); ncfile.addDimension(null, new Dimension("report", reports.size())); Structure reportIndexVar = makeReportIndexStructure(); ncfile.addVariable(null, reportIndexVar); Structure reportVar = makeReportStructure(); ncfile.addVariable(null, reportVar); } catch (InvalidRangeException e) { log.error("open ON29 File", e); throw new IllegalStateException(e.getMessage()); } }
/** * Add a Global attribute to the file. Must be in define mode. * * @param g the group to add to. if null, use root group * @param att the attribute. * @return the created attribute */ public Attribute addGroupAttribute(Group g, Attribute att) { if (!defineMode) throw new UnsupportedOperationException("not in define mode"); if (!isValidObjectName(att.getShortName())) { String attName = createValidObjectName(att.getShortName()); log.warn("illegal attribute name= " + att.getShortName() + " change to " + attName); att = new Attribute(attName, att.getValues()); } return ncfile.addAttribute(g, att); }
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException { super.open(raf, ncfile, cancelTask); init(); ncfile.addAttribute(null, new Attribute(CDM.HISTORY, "Direct read of NMC ON29 by CDM")); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "Unidata")); ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.timeSeriesProfile.toString())); try { ncfile.addDimension(null, new Dimension("station", stations.size())); Structure station = makeStationStructure(); ncfile.addVariable(null, station); ncfile.addDimension(null, new Dimension("report", reports.size())); Structure reportIndexVar = makeReportIndexStructure(); ncfile.addVariable(null, reportIndexVar); Structure reportVar = makeReportStructure(); ncfile.addVariable(null, reportVar); } catch (InvalidRangeException e) { log.error("open ON29 File", e); throw new IllegalStateException(e.getMessage()); } }
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException { this.raf = raf; this.ncfile = ncfile; init(); ncfile.addAttribute(null, new Attribute(CDM.HISTORY, "Direct read of NMC ON29 by CDM")); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "Unidata")); ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, CF.FeatureType.timeSeriesProfile.toString())); try { ncfile.addDimension(null, new Dimension("station", stations.size())); Structure station = makeStationStructure(); ncfile.addVariable(null, station); ncfile.addDimension(null, new Dimension("report", reports.size())); Structure reportIndexVar = makeReportIndexStructure(); ncfile.addVariable(null, reportIndexVar); Structure reportVar = makeReportStructure(); ncfile.addVariable(null, reportVar); } catch (InvalidRangeException e) { log.error("open ON29 File", e); throw new IllegalStateException(e.getMessage()); } }
lon.setCachedData(lonData, false); ncfile.addAttribute(null, new Attribute(CDM.CONVENTIONS, "CF-1.0")); ncfile.addAttribute(null, new Attribute("History", "Direct read by Netcdf-Java CDM library")); ncfile.addAttribute(null, new Attribute("Source", "http://eros.usgs.gov/products/elevation/gtopo30.html"));