Template Variables

As previously stated, HWimage is an add-on to HAMweather Pro and thus uses most of the same template variables as HAMweather. For a full list of these parameters look to the lower in this page.

But HWimage also adds a few additional template variables of its own, which are listed at the top of the table below:

Variable Name Description
Variables for use with HWimage Add-on Only
%%hicon_path%% The path to the current conditions(hourly) icon.  This can be used to load a current conditions icon into the current image.
%%hforecasttime%% The time of the Current Conditions (hourly) forecast.  Does not include the date.
%%num_zone_days%% The number of days in the zone or zandh forecast. Actually this is includes night and days that the NWS provided data for.
%%num_day_title_rows%% This provide the number of words in the longest zone forecast day title.   For example: if a zone forecast had one day worded 'Wednesday Night' then the value returned would be 2.  This is useful when defining the height of an image.
%%num_day_weather_rows%% This provide the number of words in the longest zone forecast day weather conditions.  For example: if a zone forecast had one day worded 'Mostly Cloudy' then the value returned would be 2.  This is useful when defining the height of an image.
%%num_day_temp_rows%% This provide the number of rows needed to display the temps. If no temps are available it will return zero, if one temp max per day either HI or LO then it will return 1 if any day has both HI and LO temps available then it will return '2'.  This is useful when defining the height of an image.
%%hwind_val%% This is similar to the normal %%hwind%% except a numeric only value is returned.  If the wind is calm then a value of zero is returned.
%%day_iconN%% This is used to return the path to icon for day N.  For example, %%day_icon1%% would provide the path to the icon for the first day or night weather condition.
 
Standard Variables
%%scripturl%% The URL to the hamweather.cgi script
%%getstateurl%% The URL to the getstate.cgi script
%%metarlisterurl%% The URL to the metarlister.cgi script
%%emailstorerurl%% The URL to the hw2email_storer.cgi script
%%mapimagesurl%% The URL to the HAMweather Pro national maps
%%main_html_url%% The URL to the main HW directory.
%%imagesurl%% The URL to the main HW images directory
 
%%pands%% The "place, state" or zipcode combination.
%%zipcode%% The zipcode entered.
%%place%% Current Place needing forecast for
%%lcplace%% Current Place needing forecast for with proper casing
%%lplace%% Current place with proper html encoding (spaces turned to "+", etc)
%%state%% Current State needing forecast for. (abbreviation) Note: Even is user types in the full state name this variable will only be the two letter abbreviation.
%%lcstate%% Current State needing forecast for with proper casing and full name.
%%lstate%% Current state url encoded.
%%country%% Current Country needing forecast for
%%lcountry%% Current country URL encoded (spaces turned to "+", etc)
%%lccountry%% Current Country needing forecast for with proper casing.
%%icao%% The Current ICAO code of place needing observation for.
%%zone%% The weather zone number supplied by user. (Only available is supplied)
%%zforecast%% The text based portion of the forecast
%%forecastdate%% Date of the needed forecast
%%forecastneeded%% The actual forecast type requested.
%%lcforecastneeded%% The actual forecast type needed with proper casing
%%stateimagesurl%% URL to the state images directory
%%iconwidth%% The width of the wx icons
%%iconheight%% The height of the wx icons
%%statemap%% or %%imagemap%% The state image map for the current state (specified by state parameter)
%%metarlist%% or %%list%% The list of places to get current conditions for. the "abbrev" paramter must be set to the state or country abbreviation.
%%statehourly%% The state hourly round up
%%user%% The current user name
%%theme%% The current theme
Variables for use with the Zone (includes zandh) Forecasts Only
%%activewarning%% Displays the current active warning/watch or special message if feature is turned on.
%%iconrow%% The table row that holds all the weather icon coding for the zone forecast
%%daytitlerow%% The table row that holds the corresponding day titles for the weather icon row
%%weatherrow%% The table row that holds the corresponding weather conditions for the weather icon row
%%temprow%% The table row that holds the corresponding temperatures for the weather icon row.
%%num_zone_days%% The number of days avaliable for the wetaher icon row
%%day_title#%% This is the day title for icon # in the icon row
%%day_weather#%% This is the weather conditions for icon # in the icon row
%%day_icon#%% This is the url to weather icon for icon # in the icon row
%%day_temps#%% or
%%day_temps#HL%%
The HI and LO temps for icon # in the icon row.
Displays as: HI:24F  LO:12F
%%day_temps#N%% or
%%day_temps#HLN%%
The HI and LO temps for icon # in the icon row, but with out the "HI" or "LO" text.
Displays as : 24F  12F
%%day_temps#H%% The HI  temps only for icon # in the icon row
Displays as : HI:24F
%%day_temps#/HN%% The HI  temps only for icon # in the icon row, but with out the "HI" text
Displays as : 24F
%%day_temps#L%% The  LO temps only for icon # in the icon row.
Displays as : LO:12F
%%day_temps#LN%% The LO temps only for icon # in the icon row, but with out the "HI" or "LO" text.
Displays as : 12F
Variables for use with the Hourly and Metar Observations Only
%%hicon%% URL to the icon for current weather condition
%%hname%% The name of the current place
%%hsky%% The  sky condition (weather condition)
%%htempf%% The temperature in Fahrenheit
%%htempc%% The temperature in Celcius
%%hdewptf%% The dew point in Fahrenheit
%%hdewptc%% The dew point in Celcius
%%hrh%% The relative humidity
%%hwind%% The wind speed in Miles per hour and direction (includes gusts if available)
%%hwind_nogusts%% The wind speed in MPH and direction but no gust measurement
%%hwind_gusts%% The wind gusts speed only (if available) in MPH
%%hwind_knots%% The wind in knots (includes gusts if available)
%%hwind_knots_nogusts%% The wind in knots but no gust measurment
%%hwind_knots_gusts%% The wind gusts speed only (if available) in knots
%%hwind_mps%% The wind in Meters per Second (includes gusts if available)
%%hwind_mps_nogusts%% The wind in Meters per Second but no gust measurement
%%hwind_mps_gusts%% The wind gusts speed only (if available) in MpS
%%hwind_kmh%% The wind in Killimeters per Hour (includes gusts isifavailable)
%%hwind_kmh_nogusts%% The wind in KM/H but no gusts measurement
%%hwind_kmh_gusts%% The wind gusts speed only (if available) in KM/H
%%hpressure%% The barometric pressure in inches unless metric=1 then in millibars
%%hpressure_mb%% The barometric pressure in millibars
%%hremarks%% Possible additional Hourly remarks
%%hhif%% Heat Index in Fahrenheit
%%hhic%% Heat Index in Celsius
%%hwcf%% Wind Chill in Fahrenheit
%%hwcc%% Wind Chill in Celsius
%%hforecastdate%% The Hourly forecast date and time
Variable for use with the hwgetstate.cgi Script Only
%%getstateimagesurl%% This provides the URL to the proper state image when displaying a state image map that can be clicked to get a zone forecast
%%imagemap%% This is the actual image map coding for the above map
Variables for use with the metarlister.cgi Script Only
%%list%% This is the actual list of places either in a state or country that the metar observations are available for.
Variables for use with the hw2email_storer.cgi Only
%%address%% This is the email address that is being subscribed or unsubscribed
Variables for use with HAMweather Pro  Only
%%usnsmap%% or
%%usccmap%%
The url tot he US National Summary Map
%%usfcmap%% The url to the US National Forecast map
%%uswarningmap%% The url to the US warning map.
%%warningtable%% Table of the states that have an active warning.  Each state is a hyperlink to the individual state warnings page.  Used with the National warning (uswarnings) report.
%%usradar%% The URL to the national Radar image
%%radarzoneimg%% The URL to the regional radar image
Used Defined Variables
%%hwvxxxx%% HAMweather allows user defined variables to be passed and inserted into the output.   Refer to the User Defined Variables page for more info.
Misc Variables
%%current_month%% The name of the current month
%%current_month_num%% The number of the current month (from 0 to 11)
%%current_day%% The current day in the month (1 to 31)
%%current_year%% The four digit number of the current year.
%%admin_email%% The email to the site administrator
%%metric%% The current metric usage setting
%%celsius%% The current celsius usage setting
HAMweather Include
%%hwi=xxxx%% HAMweather allows you to include files in the output. This can be used to have a custom header or footer for all the templates.  Thus allowing you so simply edit a couple files for the entire weather site.
NOTE: if the XXXX portion of the HWI template variable includes another variable, the "other" variable will be translated first.  This is you had %%hwi=current%%metric%%%% HAMweather would parse the %%metric%% before parsing the HWI. Thus if %%metric%% equals "1" then effectively you owuld have:   %%hwi=current1%%