Product Generator Reference
Welcome to the Product Generator reference page! This page will explain what exactly the Product Generator web app is and how to use it. This page will also include some sample download files at the very end so that you'll also have some examples to reference if you want to create your own original products.
What is the Product Generator?
The Product Generator is an interactive web app designed to allow meteorologists and meteorologists-in-training to "issue" products in a real-time operational setting for any geographic region of interest.
How do I use this web app?
Before you can issue any products, you'll first need to create at least one "template". A template is essentially the "type" of product that you want to issue, and you can customize each template to suit your specific needs.
Each template has the following features:
- Name: This allows you to easily identify which template you're looking for when you're about to issue a new product.
- Default Duration: When issuing a product that uses a template, the web app will automatically use this value to determine an appropriate expiration time.
- Geometry: This tells the web app whether you'll be drawing something on the map, and, if you are drawing on the map, what exactly you'll be drawing on the map.
• None: If the selected geometry is "None", you cannot draw anything on the map if this template is selected.
• Line: If the selected geometry is "Line", you'll be prompted to draw a series of points on the map that do not create a closed polygon.
• Polygon: If the selected geometry is "Polygon", you'll be prompted to draw a series of points on the map that create a closed polygon.
• Parallelogram: If the selected geometry is "Parallelogram", you'll be prompted to draw enough points to form a quadrilateral (think of severe thunderstorm and tornado watch polygons).
• Contours: If the selected geometry is "Contours", you'll be prompted to draw a series of shapes (that can be open or closed) on the map, and each shape can have its own category. This option is most suitable for outlooks with mulitple different risk levels.
• Point: If the selected geometry is "Point", you'll be prompted to draw a series of discrete unconnected points on the map.
- Categories: If you want a single product to potentially be for multiple different categories (e.g. a "watch" issued by the SPC can be either a "tornado watch" or a "severe thunderstorm watch", which both stem from the same product of "watch"), then you would click "add category" until you have all of the categories you want. After adding a category, you can assign each category a name and a color.
- Variables: If you want to customize different parameters within a product, then click "add variable" until you have all the parameters you want. If you want to use SPC watches as an example, you would have a variable for each of the 7 watch probabilities (plus some additional variables). A variable can hold five different values:
• Boolean: This represents either a "yes" or "no" option, which will show up as a check box.
• Number: This is intended to be a numerical value, and will show up as a small text box.
• String: This is intended to be a short excerpt of text, and will show up as a large text box.
• Menu: Whoever is issuing the product will have the option of selecting from a predetermined set of options. Click the "edit" button to change the options that can appear in this menu.
• Product: This will show all products that have been issued in a menu (ordered from newest to oldest). This is useful if you plan on issuing a product that itself could concern another product (e.g. the SPC issuing a mesoscale discussion that concerns an active watch).
• Calculation: This will automatically pull a specified value from the GeoSpatial Calculator (which can be distance, direction, speed, or the latitude/longitude of a specific point).
- Export URL: If you issue a product using this template, an XMLHttpRequest will be sent to a URL specified by what's in this box with a form that contains all of the product's information. This allows you to publish your products to a webserver if you want other people to see them. Leave blank if you want the products you issue to only be saved to your computer.
- Default Text: Whatever you put in this textbox will be the text that initially appears in a new product that uses this template.
Once you've created a template, you'll now have the option of downloading all of the templates you've created to a file. This allows you to save a backup or share the templates you've created with another person. To use a saved package of templates, simply click the "upload templates" button and select the appropriate templates file.
IMPORTANT: If you upload a file with templates and you've already got templates, you can either add the uploaded templates to the existing templates or you can replace the existing templates with the uploaded templates. Note that the "replace" option will also delete all products that you've issued!
Once you have templates that you're happy with, you can now begin issuing products in real-time. To do so, just click the "products" tab and then click the "new product" button.
After you click the "new product" button, you'll be asked to select a template from a menu. Once you've selected the desired template, click "next".
When the desired template is loaded, you'll see a new interface that has the following features:
- Forecaster: You can type your first and/or last name in here if you want a name attached to the product. The web app will automatically save this value for when you come back to the webpage.
- Password: This value can be ignored if you're not sending products to another URL. However, if you have a server side script that processes the products you issue, you may also want to have that server side script check for a password to ensure unwanted requests aren't being processed. The password that you type here will be included in the request that is sent to the specified URL.
- Issued At: A series of drop down menus corresponding to a time (in UTC) will allow you to specify when this product will get issued. By default, this value will be the exact time and date the product was first created. However, if you're issuing something that shouldn't take effect right away (e.g. a Day 2 outlook), you can change the menus to specify when you want the product to take effect.
- Expiration: A series of drop down menus corresponding to a time (in UTC) that specifies when the product expires. Once this expiration time is reached, the product will be completely hidden from view on the web app.
- Category: If multiple categories were included in the corresponding template, a menu will appear here with the options being each category.
- Variables: Each variable that was included in the corresponding template will appear below the category menu.
- Product Text: At the very bottom will be a text box, which will initially contain the default text from the corresponding template.
Map View Hot Keys
The Product Generator app allows you to save specific map views (latitude, longitude, and zoom level) as a hot key so that you can quickly toggle between locations as needed. To set a hot key, hold down the "control" key and then press one of the "F" keys (F1-F12+, but don't press a key that serves a different functionality like reloading the webpage!). To use the hot key, simply press the corresponding "F" key without holding the "control" key.
Technical details about the XMLHttpRequest
If you've included a URL to send your products to, that information will be passed as a form that looks like so:
{Template.URL}?action={Product.action}&name={Product.name}&type={Template.name}&index={Product.templateIndex}&ID={Product.ID}&category={Product.category}&issued={Product.issued}&expire={Product.expire}&point={Product.geometry}&text={Product.text}&forecaster={Product.forecaster}&password={Product.password}&variable=Product.variable&{Template.variable[0].name}={Product.variable[0]}&{Template.variable[1].name}={Product.variable[1]}... Example (PLEASE DO NOT OPEN THIS LINK): https://myawesomewebsite.com/receiveProduct.php?action=NEW&name=Mesoscale%20Discussion%20%231&type=Mesoscale%20Discussion&index=0&ID=1&category=Severe%20Weather&issued=20250826T2104Z&expire=20250826T2255Z&point=-102.31581115722574%2C36.13892655139096%2C-100.74090385436966%2C37.329691226397294%2C-98.98558044433595%2C37.8893455072144%2C-96.49013900756903%2C37.887652051901654%2C-95.68976783752528%2C37.42654238606554%2C-95.370735168458%2C36.6615288819445%2C-95.23709678650003%2C35.86282538910454%2C-95.44888401031447%2C35.50259990434861%2C-95.92354917526195%2C35.101805860149454%2C-96.96591997146548%2C34.67166503971144%2C-99.52219390869126%2C34.192559296161384%2C-100.64215564727708%2C34.076544552150416%2C-101.46565818786554%2C34.11215449570834%2C-102.08423995971599%2C34.40686889372425%2C-102.53658914565956%2C34.838105861764014%2C-102.65170955657875%2C35.54674802504743&text=...Summary...%0A%0A%0A%0A...Discussion...&forecaster=Stang&password=test&Concerning=Severe%20Potential...Watch%20needed%20soon&Watch%20Probability=95%20%25&Watch=N%2FA
In the above example:
- {Template.URL} is "https://myawesomewebsite.com/receiveProduct.php" (the web app will automatically add the ? for the form)
- {Product.action} is "NEW". This value can be "NEW" (if a brand new product is issued), "CON" (if a product is edited), or "CAN" (if a product is canceled, but not completely deleted), or "DEL" (if a product is completely deleted)
- {Product.name} is "Mesoscale Discussion #1" (the product's name)
- {Template.name} is "Mesoscale Discsussion" (the name of the corresponding template)
- {Product.templateIndex} is the index of the template that was used to make this product
- {Product.ID} is the ID number of the product (if, for example, you issue your 5th recorded mesoscale discussion, the ID will be 5)
- {Product.category} is "Severe Weather" (the product's category, passed as a string and not the index of a list)
- {Product.issued} is 20250826T2104Z (a time stamp with a format matching that of official NWS products; YYYYMMHHThhmmZ)
- {Product.expire} is 20250826T2255Z (another time stamp with a format matching that of official NWS products; YYYYMMHHThhmmZ)
- {Product.point} is a list of points. For contour geometry, this value is passed as a JSON format that also includes category. Otherwise, it is a comma-separated list where the even-number indices are longitudes and the odd-number indices are latitudes
- {Product.text} is the product's text.
- {Product.forecaster} is the product's forecaster.
- {Product.password} is the password used for server-side authentication purposes.
- {Product.variable} is a list of all of the product's variable values (rather than being broken up into separate named parameters). In this case, the list would be ["Severe Potential...Watch needed soon", "95 %", "N/A"]
- {Template[0].variable.name} is "Concerning"
- {Product[0].variable} is "Severe Potential...Watch needed soon"
- {Template[1].variable.name} is "Probability"
- {Product[1].variable} is "95 %"
- {Template[2].variable.name} is "Watch"
- {Product[2].variable} is "N/A"
You can also use the information passed to generate static plots of each product. For example, if you run a server-side Python script with MatPlotLib and CartoPy, the geometry information can be used to create a plot that can be saved to the server as an image file.
When developing a server-side script, I'd recommend creating a URL that will simulate the URL example provided and pasting that into a web browser. That way, that you don't have to create products and click "send product" each time you want to test your script.
In most circumstances, you'll want to use a local path (receiveProduct.php) instead of a universal path (https://myawesomewebsite.com/receiveProduct.php) to avoid "cross-origin access" errors. If you're new to web development, some websites will block XMLHttpRequests that originate from a different website for security reasons. Using the local path is a good way to avoid this problem.
This can be used to centralize all of the products you issue so that they can be accessed by the Product Generator app on any device. This also makes it possible to have a team of forecasters issuing products for a common organization. For more information about how to set this up, see this guide.
Sample Templates
Storm Prediction Center (SPC) Sample
Weather Prediction Center (WPC) Rainfall Products Sample