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.
>From: "Valentijn Venus" <address@hidden> >Organization: ITC >Keywords: 200508312110.j7VLAQjo012462 IDV extensions Hi Valentijn- >thanks for your help, and no worries it took a bit longer... > >We completed building the satellite/solar zenith angle functions, and are now > trying to load them in but placing the new jar in the same folder as the othe > rs and calling it from jython as indicated below doesn't seem to do the job. > >import sys; >sys.add_package('angles') Since this JAR file is not in your classpath, then it doesn't get picked up. What is in this jar file? Is it a single .py file (or even a handful) or does it have code as well? If it's just a .py file, you could: put it in your ~/.metapps/DefaultIdv directory and call it default.py. This will automatically read it in. If it's several .py files, you could put them in the ~/.metapps/DefaultIdv directory and modify the idv.rbi file there to add in the list of files to the section: <!-- Python libraries --> <resources name="application.resource.jython"> </resources> e.g. <!-- Python libraries --> <resources name="application.resource.jython"> <resource location="%USERPATH%/file1.py"/> <resource location="%USERPATH%/file2.py"/> <resource location="%USERPATH%/file3.py"/> </resources> If there is code in there, then could you send me the JAR file and I can figure out how to do what you want? Thanks. Don NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.