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] Anyway to transform coordinates using Jython?

On 2/27/2013 7:04 PM, Paul Graham wrote:
Hi IDV'ers,

Can anyone tell me if there is a way to transform coordinate systems using
IDV?  For example, if you have U at some ETA level, is it possible to
transform it into pressure coordinates in Jython?

Thanks,

Paul Graham
_______________________________________________
idvusers mailing list
idvusers@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/


You can try:

import ucar.unidata.data.grid.GridUtil as GridUtil
filename = '......'
file_opener = 'file.grid'
ds = makeDataSource(filename, file_opener)
variable = 'Temperature'
display_type = 'planviewcontour'
image_dimensions = (800, 600)
output_name = 'contour2D.png'
setOffScreen(1)
idv.getStateManager().setViewSize(java.awt.Dimension(image_dimensions[0], 
image_dimensions[1]))
temperature= getData(ds.getName(), variable)
altValues = [1000.0, ....]
GridUtil.setVerticalValues(temperature, altValues, RealType.Altitude,
                                 CommonUnits.HECTOPASCAL);

dc = createDisplay(display_type, temperature)

pause()
image = getImage()
writeImage(output_name)




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