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.
To: address@hidden From: =?big5?q?LEONG=20IVAN?= <address@hidden> Subject: Re: 20030807: Questions in creating formula in IDV!! Organization: UCAR/Unidata Keywords: 200308080256.h782uDLd018245 IDV formula
Ivan-
Thank you for your kindly aid. Actually I am using JMA nc data to do some research. I prefer the second method you suggested ( create a new formula which would pass in the parameters directly instead of having the prompting dialog). But, where can i get more information about the methods just like DerivedGridFactory.createLayerDifference (a, 500, 850) which can be run in IDV. Is that a interval function or mehtod in IDV. Is that come fromVisAD? Jython?
This is a Java function within IDV's class DerivedGridFactory which has javadoc at: http://www.unidata.ucar.edu/community/committees/metapps/docs/ucar/unidata/data/grid/DerivedGridFactory.html As you've found the formula/diagnostics portion of the IDV is not well documented and flushed out. Our plan is to develop a library of standard functions that can be used in formulas. The code (and documentation) is just not there yet. In your case, we could create a Jython wrapper around this method like: # Create a difference of the values of two layers of a grid # @param a grid to use # @param b top of layer (double value in units of vertical coordinate) # @param c bottom of layer (double value in units of vertical coordinate) def layerDiff(a, b, c): from ucar.unidata.data.grid.DerivedGridFactory import * return createLayerDifference(a,b,c) and then in the formula, you could call layerDiff(a,500,850) and it would be hidden that this is coming from the Java method (and shorter to type). So, you could use the methods in DerivedGridFactory as well as the standard Jython functions. If there is a particular function you'd like help with, let us know.
Please give me some tips. Thanks a lot!
We will be updating our documentation with the next release and will make sure to focus on documenting the diagnostic capabilities more. For now, the best docs we have are in the "Doing more" section of the User Guide. Don