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: [idvusers] addition

Luis:

As far as I know, newUnit()'s parameters are:
data, name-for-unit, valid-unit

If you use the Formula:  Misc -> Change Unit, you would be prompted
for the name and the unit.

I picked "deg_K" since I thought perhaps your ts_ data was some kind
of temperature.

It is very important to use the values in the udunits (like "deg_K")
for all your units....if you write the netCDF files, then I suggest
you include the correct values -- things like "degrees" don't mean
much.  If you did not write the files, I suggest you talk to whomever
did and encourage them to make the appropriate chages.

Best wishes,

tom
On Tue, Nov 2, 2010 at 1:54 PM, Luis Del Castillo
<luis.delcastillo@xxxxxxxxxxxx> wrote:
> It works perfectly can you explain the meaning of  newUnit(a, "degK", "deg_K")
> a = var
> degK = old unit
> deg_K = new unit
>
> something like that right
> thanks
> Luis
>
> -----Original Message-----
> From: Tom Whittaker [mailto:whittaker@xxxxxxxx]
> Sent: martes, 02 de noviembre de 2010 12:28 p.m.
> To: Luis Del Castillo
> Cc: idvusers@xxxxxxxxxxxxxxxx
> Subject: Re: [idvusers] addition
>
> Luis --
>
> Okay -- I had some time before leaving to download and look at your
> files.  The problem is that the units of the two grids are not
> compatible.
>
> IDV strictly enforces unit compatibility when adding and subtracting.
>  You have one parameter with units of "degrees" and the other has no
> units.  You need to make these units a) real units and b) compatible,
> if you want to add them.
>
> Before writing new files, you can this this by editing your "a+b"
> formula to change the units:
>
> newUnit(a, "degK", "deg_K") + newUnit(b, "degK", "deg_K")
>
> I don't know if your data fields are both temperatures or what, but
> this will show you that by making compatible units, the summation can
> be forced to work...
>
> Good luck,
>
> tom
>
> On Tue, Nov 2, 2010 at 11:19 AM, Luis Del Castillo
> <luis.delcastillo@xxxxxxxxxxxx> wrote:
>> Nop not work, in each files exist one variable so when y try to add  34.5 + 
>> 3 using add(S1, S2) the answer is 34.5 not 37.5
>>
>> Luis
>>
>
> --
> Tom Whittaker
> University of Wisconsin-Madison
> Space Science & Engineering Center (SSEC)
> Cooperative Institute for Meteorological Satellite Studies (CIMSS)
> 1225 W. Dayton Street
> Madison, WI  53706  USA
> ph: +1 608 262 2759
>
> _______________________________________________
> idvusers mailing list
> idvusers@xxxxxxxxxxxxxxxx
> For list information, to unsubscribe, visit: 
> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI  53706  USA
ph: +1 608 262 2759



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