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.
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 *************************************************************
idvusers
archives: