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 Yuan, > > A question to ask for your advice. I add a function to the Jython library > and then create a corresponding formula. This formula has two arguments, > one is a variable, another is a number (wish to choose a number e.g.2 > or3). Wondering how to pass this number to the formula as an argument > (it seems like IDV can only use file names as arguments). Thanks. > > Best regards, > > Wen Hi Xu Wen, It is possible to create this kind of formula. You can reference the following case minOverTime(field, makeTimes=0) , the second argument is default to 0, but you can overwrite to 1 when needed. def minOverTime(field,makeTimes=0): """Take the min of the values in each time step If makeTimes is true (1) then we return a field mapping all of the times to the average. Else we just return the min """ return GridMath.minOverTime(field,makeTimes); Yuan > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > This message contains confidential information and is intended only for > the individual named. If you are not the named addressee you should not > disseminate, distribute or copy this e-mail. > Ticket Details =================== Ticket ID: RTK-267759 Department: Support IDV Priority: Normal Status: Closed