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: David Ahijevych <address@hidden> >Organization: NCAR >Keywords: 200408302324.i7UNOx8E023594 IDV wind vector Hi David- >The program works - this was my first experience with Jython! Congratulations. It's a pretty simple language. Combined with the VisAD data model which the IDV is based on, it is pretty powerful. You can do things like a-b where a is a grid on one projection and b is a grid on another projection and VisAD takes care of the underlying resampling, unit conversion before doing the math. >But I also want to plot wind vectors where the u-component is udiff and >the v-component is vdiff. I tried to modify the formulas you gave me, but >I kept getting error messages. Okay, I got the same errors. I've got a fix, but the issue is how to get it to you. How are you running the IDV? Are you using the InstallAnywhere installers, or are you building from scratch? Let me know so I can figure the best way to do this. Just for the record, this is how I did the wind vectors: To create wind vectors, you just need to create the udiff and vdiff fields, then call the makeVector procedure: #calculate the u and v layer difference and return as vector def windShearVector(u, v, top, bottom): udiff = layerDiff(u, top, bottom) vdiff = layerDiff(v, top, bottom) return makeVector(udiff, vdiff) Now, create a formula to use this function: From the Edit->Formulas->Formula->Create Formulas menu, open the formula editor. Fill out the form (this assumes version 1.1): - for the name, enter wind shear vector - for the Formula, enter: windShearVector(u, v, top[isuser=true,default=500], bottom[isuser=true,default=850]) optionally: if the Advanced panel is not opened, click on the down arrow - for the Description, enter something like Layer Wind Shear Vectors - for the Group, enter whatever category you want - for the Displays, click the Use selected: radio button and click the "All off" button. Then scroll down and find the "Flow Displays" category and check that on. Then click "Add Formula". After you have your gridded data loaded in, select the Formulas data source and the Wind Shear Vector field and the type of flow display you want, then click the "Create Display" button. You will first be prompted for the layers you want. If using 1.1 and have set the defaults and that's what you want, click OK. Next you will be prompted for the u, and v values for the calculation. Select these, click OK and then the calculation should happen and you should see the values displayed. Don NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publically 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.