Re: [idvusers] issue

Hi Luis-

What version of the IDV are you using?

Luis Del Castillo wrote:
I have a variable  tgk is ground temperature in kelvins how can i change the 
values from kelvin to celcius if I havent a value in the Change display unit.

Was this from a newCDF file or some other source?  It sounds like
the unit was not specified in the file if there is no Change Unit
menu.

If it is a netCDF file, you could wrap it with NcML like the following:

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"; location="your_filename_here">
  <variable name="tgk">
    <attribute name="units" value="K" />
  </variable>
</netcdf>

Put that in a text file with an extension of .ncml (e.g. fixunits.ncml),
change "your_filename_here" to the name of the file and place it in the
same directory as the file.  Then open the NcML file in the IDV.

Alternatively, you can use the Miscellaneous->Change unit formula to
set the initial unit on the field.  Select the Formulas Data Source,
then the Miscellaneous->Change unit formula and the type of display
you want.  Then when prompted, give the name of the field (tgk) and
the unit (K) and when prompted, select the field from the list.
Then you can use the Edit->Change Unit menu in the display control
to change it to Celsius.  You'd have to do this for each display,
so the NcML solution is more global.

Or, if you have control over the writing of the file, make
sure the units are specified in the file.

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
*************************************************************



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