Package ucar.nc2

Examples of ucar.nc2.Group.addAttribute()


    Variable v = ds.findVariable("time_offset");
    v.addAttribute(new Attribute( "units", "seconds since "+dfo.toDateTimeString(start)));

    Group root = ds.getRootGroup();
    root.addAttribute(new Attribute( "Convention", "Suomi-Station-CDM"));   
    ds.finish();
  }

  protected AxisType getAxisType(NetcdfDataset ncDataset, VariableEnhanced v) {
    String name =  v.getShortName();
View Full Code Here


            Dimension ncDim = new Dimension(name, size, true);
            ncFile.addDimension(null, ncDim);
            if (name.equals(ENS_VAR)) {
                v = new Variable(ncFile, null, null, name, DataType.STRING,
                                 name);
                v.addAttribute(new Attribute("standard_name", "ensemble"));
                v.addAttribute(new Attribute(_Coordinate.AxisType,
                                             AxisType.Ensemble.toString()));
                List<String> names =
                    gradsDDF.getEnsembleDimension().getEnsembleNames();
                String[] nameArray = new String[names.size()];
View Full Code Here

            ncFile.addDimension(null, ncDim);
            if (name.equals(ENS_VAR)) {
                v = new Variable(ncFile, null, null, name, DataType.STRING,
                                 name);
                v.addAttribute(new Attribute("standard_name", "ensemble"));
                v.addAttribute(new Attribute(_Coordinate.AxisType,
                                             AxisType.Ensemble.toString()));
                List<String> names =
                    gradsDDF.getEnsembleDimension().getEnsembleNames();
                String[] nameArray = new String[names.size()];
                for (int i = 0; i < nameArray.length; i++) {
View Full Code Here

                v.setCachedData(dataArray, false);
            } else {
                double[] vals = dim.getValues();
                v = new Variable(ncFile, null, null, name, DataType.DOUBLE,
                                 name);
                v.addAttribute(new Attribute("units", dim.getUnit()));
                if (name.equals(Y_VAR)) {
                    v.addAttribute(new Attribute("long_name", "latitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "latitude"));
                    v.addAttribute(new Attribute("axis", "Y"));
View Full Code Here

                double[] vals = dim.getValues();
                v = new Variable(ncFile, null, null, name, DataType.DOUBLE,
                                 name);
                v.addAttribute(new Attribute("units", dim.getUnit()));
                if (name.equals(Y_VAR)) {
                    v.addAttribute(new Attribute("long_name", "latitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "latitude"));
                    v.addAttribute(new Attribute("axis", "Y"));
                    sizeY = dim.getSize();
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
View Full Code Here

                v = new Variable(ncFile, null, null, name, DataType.DOUBLE,
                                 name);
                v.addAttribute(new Attribute("units", dim.getUnit()));
                if (name.equals(Y_VAR)) {
                    v.addAttribute(new Attribute("long_name", "latitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "latitude"));
                    v.addAttribute(new Attribute("axis", "Y"));
                    sizeY = dim.getSize();
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lat.toString()));
View Full Code Here

                v.addAttribute(new Attribute("units", dim.getUnit()));
                if (name.equals(Y_VAR)) {
                    v.addAttribute(new Attribute("long_name", "latitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "latitude"));
                    v.addAttribute(new Attribute("axis", "Y"));
                    sizeY = dim.getSize();
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lat.toString()));
                } else if (name.equals(X_VAR)) {
                    v.addAttribute(new Attribute("long_name", "longitude"));
View Full Code Here

                    v.addAttribute(new Attribute("long_name", "latitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "latitude"));
                    v.addAttribute(new Attribute("axis", "Y"));
                    sizeY = dim.getSize();
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lat.toString()));
                } else if (name.equals(X_VAR)) {
                    v.addAttribute(new Attribute("long_name", "longitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "longitude"));
View Full Code Here

                    v.addAttribute(new Attribute("axis", "Y"));
                    sizeY = dim.getSize();
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lat.toString()));
                } else if (name.equals(X_VAR)) {
                    v.addAttribute(new Attribute("long_name", "longitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "longitude"));
                    v.addAttribute(new Attribute("axis", "X"));
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lon.toString()));
View Full Code Here

                    sizeY = dim.getSize();
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lat.toString()));
                } else if (name.equals(X_VAR)) {
                    v.addAttribute(new Attribute("long_name", "longitude"));
                    v.addAttribute(new Attribute("standard_name",
                            "longitude"));
                    v.addAttribute(new Attribute("axis", "X"));
                    v.addAttribute(new Attribute(_Coordinate.AxisType,
                            AxisType.Lon.toString()));
                    sizeX = dim.getSize();
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.