Board update
Effective April 12, 2021, we had to delete about 8000 frivolous spammer accounts going back over a year. There was no way for us to locate all legitimate user applications, so some may have been deleted. If you are an actual user who created an account since March 2020 but did not get approved, please register again. You can also contact us via the Contact link on the main Weather Graphics webpage to get assistance. When you contact us, it is essential you provide brief but detailed info on your meteorological background or inform us of any previous order you've made, this way we can tell you are a legit user, otherwise we will assume it is a spammer trying to bypass the application checks. Thanks. -Tim

Where shall we go with scripting?

This is the place to get help with Digital Atmosphere, suggest improvements, and get tips.
Post Reply
Tim Vasquez
Posts: 529
Joined: Sat Nov 22, 2003 10:47 pm

Where shall we go with scripting?

Post by Tim Vasquez »

We are about to enhance the scripting of Digital Atmosphere so that it is possible to combine fields, do true custom analyses, and so on. The idea is to use scripting to form a flexible foundation for Digital Atmosphere, and thus the menu commands (Contour > Temperature, etc) would not drive the program but would simply feed the command line interpreter with a hardcoded command (all behind the scenes of course, for the beginners).

For example, to display an ageostrophic wind we might do: VECT(WIND-GWIND) where DA would subtract the geostrophic wind from the true wind, and the resulting field would be displayed in a vector format. Or to do wind barbs we could do BARB(WIND-GWIND). The user would also be able to create his/her favorite commands and put them into the Contour menu, or a script menu. To do a pressure analysis with a line thickness of 2 we could do CONT(SLP) LINE(2). The question is what is the optimum format to use for such a command?

I had considered the PCGRIDDS script style but decided it was a bit awkward (it strictly reads from right to left). However it is a good start and I think I will draw on some of the conventions it uses. In fact I may begin that way and then make improvements from there. For those interested, the syntax is shown at in Appendix B.

Anyone here have experience with AWIPS? It would be interesting to see what meteorological scripting conventions it uses (that is, if it has any).

Posts: 24
Joined: Mon Nov 24, 2003 8:40 pm


Post by jrader »

I like the idea to make scripting a driving force. I'm not sure what would be gained in going to a new syntax as far as weather chart products go. Perhaps what is gained is a new granularity of control. Perhaps even some wx chart products previously not producable via the old syntax is part of the goal. Or even a combination of both.

Being that weather is more of a hobby I'm learning, my suggestions are more on the practical and usability side. Thngs I would susgest are things like the following:

* external triggers via tcp ports, pipes, ipc/signals, files and file contents.
* capability to make use of or call external programs, scripts and batch files within DAW scripts, which would be great in your linux version but useful as well in the windows version.
* enhanced file handling/manipulation (just in cause format changes like the ASUS1 -> ASUS01 change happen again)
Mike Deason
Junior Member
Posts: 9
Joined: Wed Nov 26, 2003 12:10 am
Location: Grand Island, NE

Post by Mike Deason »

Actually, I think the PCGRIDDS command mode would be a good base to start with Tim, contingent on reversing it from right to left. For the most part I find the PCGRIDDS command pretty intuitive. For instance, being able to compute one hour field changes by using a TDIF command with the RUC fields would, for me at least, be a nice leap ahead in how I would use DAWS. The PCGRIDDS commands are all pretty much 4 alphanumeric characters and I believe most users would easily grasp their use even without experience using PCGRIDDS.

Maybe you could incorporate an editable menu item (similar to the internet retrieval module) in which a person could program, store and call up their own custom scripts.


Tim Vasquez
Posts: 529
Joined: Sat Nov 22, 2003 10:47 pm

Post by Tim Vasquez »

Work on this scripting has been ongoing much of today. It is very much being based on PCGRIDDS (which, I agree, is rather intuitive even though it seems a bit awkward). Here is the type of form that is taking shape.

To plot a simple temperature map in deg C, you would enter

A much more elaborate example contours temperatures above 32F every 1F, using dotted lines, and also shows the actual gridded values.

Showing temperatures at another level you could do

Transformation of values will be supported, too... for example to show a grid of winds in km/h you would do:
Or to make your own conversion constant you could do:

Likewise you can do thickness by a scalar field subtraction

Multiparameter forms such as divergence will have this form:
DVRG(WIND,MIXR) (extra parameter produces a flux value)

I've decided not to support the complexities of formula-style constructs until I have a better idea of where all this is heading.

All of this actually works inhouse and will be released this weekend as a patch. The dropdown Contour selections will drive the scripts using predetermined forms (transparent to beginners).

Post Reply