NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: unit conversion in VisAD

Stu-

Stuart Wier wrote:
> 
> Making some computations in VisAD, for example in part
> dtdp = (FlatField) (dtdp.multiply( ((FlatField)absvor.getSample(i))) );
> 
> The results have values such as .002 and "units" 0.001 K m2 s-1 kg-1.
> 
> How can I get the results to have value 2 and "units" 0.000001 K m^2 s-1 kg-1?
> 
> Or values 2E-6 and units K m^2 s-1 kg-1?


As an alternative to my last message, you could just do:

     unit.scale(1000);

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: