예제 #1
0
  /** Read the value (parameters are ignored). */
  public boolean read(String datasetName, Object specialO) throws IOException {
    ArrayDouble.D0 a = (ArrayDouble.D0) ncVar.read();
    setValue(a.get());

    setRead(true);
    return (false);
  }
예제 #2
0
 private static Array getNcScalar(Number inNum, IObservationGroup.DataType dataType) {
   Array ret = null;
   switch (dataType) {
     case INT:
       ret = new ArrayInt.D0();
       ((ArrayInt.D0) ret).set(inNum.intValue());
       break;
     case LONG:
       ret = new ArrayLong.D0();
       ((ArrayLong.D0) ret).set(inNum.longValue());
       break;
     case FLOAT:
       ret = new ArrayFloat.D0();
       ((ArrayFloat.D0) ret).set(inNum.floatValue());
       break;
     case DOUBLE:
       ret = new ArrayDouble.D0();
       ((ArrayDouble.D0) ret).set(inNum.doubleValue());
       break;
   }
   return ret;
 }