cdm/src/main/java/ucar/nc2/iosp/nids/Nidsheader.java
void addParameter(String pName, String longName, NetcdfFile nc, ArrayList dims, Attribute att,
                    DataType dtype, String ut, long hoff, long doff, boolean isZ, int y0)
    {
          String vName = pName;
          Variable vVar = new Variable(nc, null, null, vName);
          vVar.setDataType(dtype);
          if( dims != null ) vVar.setDimensions(dims);
          else vVar.setDimensions("");
          if(att != null ) vVar.addAttribute(att);
          vVar.addAttribute( new Attribute(CDM.UNITS, ut));
          vVar.addAttribute( new Attribute(CDM.LONG_NAME, longName));
          nc.addVariable(null, vVar);
          vVar.setSPobject( new Vinfo (numX, numX0, numY, y0, hoff, doff, isR, isZ, null, null, 0, 0));
    }
void addParameter(String pName, String longName, NetcdfFile nc, ArrayList dims, Attribute att,
                    DataType dtype, String ut, long hoff, long doff, boolean isZ, int y0)
    {
          String vName = pName;
          Variable vVar = new Variable(nc, null, null, vName);
          vVar.setDataType(dtype);
          if( dims != null ) vVar.setDimensions(dims);
          else vVar.setDimensions("");
          if(att != null ) vVar.addAttribute(att);
          vVar.addAttribute( new Attribute(CDM.UNITS, ut));
          vVar.addAttribute( new Attribute(CDM.LONG_NAME, longName));
          nc.addVariable(null, vVar);
          vVar.setSPobject( new Vinfo (numX, numX0, numY, y0, hoff, doff, isR, isZ, null, null, 0, 0));
    }
void addParameter ( String pName , String longName , NetcdfFile nc , ArrayList dims , Attribute att , DataType dtype , String ut , long hoff , long doff , boolean isZ , int y0 ) { String vName = pName ; Variable vVar = new Variable ( nc , null , null , vName ) ; vVar . setDataType ( dtype ) ; if ( dims != null ) vVar . setDimensions ( dims ) ; else vVar . setDimensions ( "" ) ; if ( att != null ) vVar . addAttribute ( att ) ; vVar . addAttribute ( new Attribute ( CDM . UNITS , ut ) ) ; vVar . addAttribute ( new Attribute ( CDM . LONG_NAME , longName ) ) ; nc . addVariable ( null , vVar ) ; vVar . setSPobject ( new Vinfo ( numX , numX0 , numY , y0 , hoff , doff , isR , isZ , null , null , 0 , 0 ) ) ; }
adding new parameter to the netcdf file
@param pName                variable name
@param longName             variable long name
@param nc                    netcdf file
@param dims                 variable dimensions
@param att                  attribute
@param dtype                data type
@param ut                   unit string
@param hoff                 header offset
@param doff                 data offset
@param isZ                  is compressed file
@param y0                   reserved
adding new parameter to the netcdf file