Package ucar.nc2.dataset

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


                                         AxisType.Lat.toString()));
            Variable v1 = ds.findVariable("Lon");
            if (v1 == null) {
                v1 = ds.findVariable("GEO_lon");
            }
            v1.addAttribute(new Attribute(_Coordinate.AxisType,
                                          AxisType.Lon.toString()));
        } else {
            Dimension dim = ds.findDimension("time");
            int       n   = dim.getLength();
            Variable latVar = new VariableDS(ds, null, null, "Lat",
View Full Code Here


            Dimension dim = ds.findDimension("time");
            int       n   = dim.getLength();
            Variable latVar = new VariableDS(ds, null, null, "Lat",
                                             DataType.FLOAT, dim.getName(),
                                             "degree", null);
            latVar.addAttribute(new Attribute(_Coordinate.AxisType,
                    AxisType.Lat.toString()));
            ds.addVariable(null, latVar);
            Variable lonVar = new VariableDS(ds, null, null, "Lon",
                                             DataType.FLOAT, dim.getName(),
                                             "degree", null);
View Full Code Here

                    AxisType.Lat.toString()));
            ds.addVariable(null, latVar);
            Variable lonVar = new VariableDS(ds, null, null, "Lon",
                                             DataType.FLOAT, dim.getName(),
                                             "degree", null);
            lonVar.addAttribute(new Attribute(_Coordinate.AxisType,
                    AxisType.Lon.toString()));
            ds.addVariable(null, lonVar);
            Variable altVar = new VariableDS(ds, null, null, "MSL_alt",
                                             DataType.FLOAT, dim.getName(),
                                             "meter", null);
View Full Code Here

    try {
      Date d = format.parse(dateS+timeS);
      VariableDS time = new VariableDS(ds, vhrr, null, "time", DataType.LONG, "",
          "seconds since 1970-01-01 00:00", "time generated from PRODUCT_METADATA/PRODUCT_DETAILS");

      time.addAttribute( new Attribute(_Coordinate.AxisType, AxisType.Time.toString())); // // LOOK : cant handle scalar coordinates yet ??
      time.addAttribute( new Attribute("IsoDate", new DateFormatter().toDateTimeStringISO(d)));
      ds.addVariable(vhrr, time);
      ArrayLong.D0 timeData = new ArrayLong.D0();
      timeData.set(d.getTime() / 1000);
      time.setCachedData(timeData, true);
View Full Code Here

      Date d = format.parse(dateS+timeS);
      VariableDS time = new VariableDS(ds, vhrr, null, "time", DataType.LONG, "",
          "seconds since 1970-01-01 00:00", "time generated from PRODUCT_METADATA/PRODUCT_DETAILS");

      time.addAttribute( new Attribute(_Coordinate.AxisType, AxisType.Time.toString())); // // LOOK : cant handle scalar coordinates yet ??
      time.addAttribute( new Attribute("IsoDate", new DateFormatter().toDateTimeStringISO(d)));
      ds.addVariable(vhrr, time);
      ArrayLong.D0 timeData = new ArrayLong.D0();
      timeData.set(d.getTime() / 1000);
      time.setCachedData(timeData, true);
View Full Code Here

    DataType coordType = getCoordinateType();
    VariableDS joinAggCoord = new VariableDS(ncDataset, null, null, dimName, coordType, dimName, null, null);
    ncDataset.addVariable(null, joinAggCoord);
    joinAggCoord.setProxyReader( this);
    if (isDate)
      joinAggCoord.addAttribute(new ucar.nc2.Attribute(_Coordinate.AxisType, "Time"));

    // if speced externally, this variable will get replaced
    CacheVar cv = new CoordValueVar(joinAggCoord.getFullName(), joinAggCoord.getDataType(), joinAggCoord.getUnitsString());
    joinAggCoord.setSPobject( cv);
    cacheList.add(cv);
View Full Code Here

      // _CoordinateAxes if it exists must be modified
      Attribute att = vagg.findAttribute(_Coordinate.Axes);
      if (att != null) {
        String axes = dimName + " " + att.getStringValue();
        vagg.addAttribute(new Attribute(_Coordinate.Axes, axes));
      }

      newGroup.removeVariable( aggVar.getShortName());
      newGroup.addVariable( vagg);
      aggVars.add(vagg);
View Full Code Here

      joinAggCoord = new VariableDS(ncDataset, null, null, dimName, DataType.STRING, dimName, null, null);
      joinAggCoord.setProxyReader( this);
      ncDataset.getRootGroup().addVariable(joinAggCoord);
      aggVars.add(joinAggCoord);
     
      joinAggCoord.addAttribute(new ucar.nc2.Attribute(_Coordinate.AxisType, "Time"));
      joinAggCoord.addAttribute(new Attribute("long_name", "time coordinate"));
      joinAggCoord.addAttribute(new ucar.nc2.Attribute("standard_name", "time"));
    }

    if (timeUnitsChange) {
View Full Code Here

      joinAggCoord.setProxyReader( this);
      ncDataset.getRootGroup().addVariable(joinAggCoord);
      aggVars.add(joinAggCoord);
     
      joinAggCoord.addAttribute(new ucar.nc2.Attribute(_Coordinate.AxisType, "Time"));
      joinAggCoord.addAttribute(new Attribute("long_name", "time coordinate"));
      joinAggCoord.addAttribute(new ucar.nc2.Attribute("standard_name", "time"));
    }

    if (timeUnitsChange) {
      readTimeCoordinates(joinAggCoord, cancelTask);
View Full Code Here

      ncDataset.getRootGroup().addVariable(joinAggCoord);
      aggVars.add(joinAggCoord);
     
      joinAggCoord.addAttribute(new ucar.nc2.Attribute(_Coordinate.AxisType, "Time"));
      joinAggCoord.addAttribute(new Attribute("long_name", "time coordinate"));
      joinAggCoord.addAttribute(new ucar.nc2.Attribute("standard_name", "time"));
    }

    if (timeUnitsChange) {
      readTimeCoordinates(joinAggCoord, cancelTask);
    }
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.