Пример #1
0
  /**
   * _more_
   *
   * @param dTimes _more_
   * @return _more_
   */
  protected List<SoundingOb> getTimeMatchingSoundingObs(List<DateTime> dTimes) {
    List soundingObs = getRDS().getSoundingObs();
    List newSoundingObs = new ArrayList<SoundingOb>();
    SoundingAdapter adapter = getRDS().adapter;

    for (Iterator iter = soundingObs.iterator(); iter.hasNext(); ) {
      SoundingOb ob = (SoundingOb) iter.next();

      for (Iterator itr = dTimes.iterator(); itr.hasNext(); ) {
        // Date       d      = (Date) itr.next();
        DateTime obTime = (DateTime) itr.next();
        SoundingOb ob1 = null;
        try {
          // obTime = new DateTime(d);
          ob1 = new SoundingOb(ob.getStation(), obTime);
          newSoundingObs.add(ob1);
        } catch (Exception e) {
        }
      }
    }

    raobDataSet = new RaobDataSet(adapter, newSoundingObs);

    return newSoundingObs;
  }
Пример #2
0
 /**
  * Gets the SoundingOb associated with this DataChoice. The VisAD {@link visad.MathType} of the
  * return value is the {@link visad.Tuple} ({@link visad.DateTime}, {@link
  * visad.georef.EarthLocationTuple}, {@link ucar.visad.functiontypes.InSituAirTemperatureProfile},
  * {@link ucar.visad.functiontypes.DewPointProfile}).
  *
  * @param dc DataChoice for data
  * @param dataSelection subselection criteria
  * @return The sounding observation.
  * @throws RemoteException Java RMI problem
  * @throws VisADException VisAD problem
  */
 private Data makeSoundingOb(DataChoice dc, DataSelection dataSelection)
     throws VisADException, RemoteException {
   SoundingOb so = getRDS().initSoundingOb((SoundingOb) dc.getId());
   if (so == null) {
     return null;
   }
   RAOB raob = so.getRAOB();
   SoundingStation ss = (SoundingStation) so.getStation();
   // sanity check
   FlatField t = raob.getTemperatureProfile();
   if (t.getDomainSet().getLength() == 1) {
     return null;
   }
   return new Tuple(
       new Data[] {
         so.getTimestamp(),
         ((SoundingStation) so.getStation()).getNamedLocation(),
         raob.getTemperatureProfile(),
         raob.getDewPointProfile(),
         raob.getWindProfile()
       });
 }