This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi, > > Normally, If I want to get value and do caculation with grid data, I > have to create a formula, create function with Jython and select data > source from "Field Selector". I want to ask are there any way to select > data source by using script only so I do not have to create formula and > manually choose data from " Field Selector" ? Yes. Look at the routines in the shell.py jython library: http://www.unidata.ucar.edu/software/IDV/docs/userguide/tools/JythonLib.html#shell In particular you can call: def getData(dataSourceName=None,dataChoiceName=None): This finds the first data source if the dataSourceName==null. Else it tries to match on the data source name which can be set in the data source properties dialog. -Jeff Ticket Details =================== Ticket ID: WWV-305170 Department: Support IDV Priority: Normal Status: Closed