Forecast Parameter
This parameter defines which and in what order you want the data from NOAA's National Weather Service Forecast returned to you. This parameter is a comma delimited array of data chunks, each chunk revolving around one of the types of data available. The chunk ID is the first character of the chunk. Each of these chunks can also have modifiers that can be used to further define what is returned. Please note: some characters are both used as IDs and as modifiers. In addition, the inclusion of an integer value with any chunk that has a Padding Group Modifier available, will set the returned number of characters by either padding or truncating the data.
Core Chunks
Forecast - f
Chunk ID: f
Default Text: The full weather forecast text, left justified, and if the width is provided, then padded to that.
Example: forecast=f
returns "Partly cloudy, with a low around 27. Wind chill values between 15 and 20. North wind around 10 mph."
Modifier | Description | Example | Result |
---|---|---|---|
s | String | forecast=fs |
"Partly Cloudy" |
t | Title | forecast=ft |
"Forecast" |
b | Pad or Truncate | forecast=fs10b forecast=ft10b |
"Partly Clo" |
x | Truncate Only | forecast=fs10x forecast=ft10x |
"Partly Clo" |
r | Right Justify | forecast=ft10r |
" Forecast" |
c | Center Justify | forecast=ft10c |
" Forecast " |
Temperature - t
Chunk ID: t
Default Text: Forecast temperature, left justified, and if the width is provided, then padded to that.
Example: forecast=t
returns "27"
Modifier | Description | Example | Result |
---|---|---|---|
s | String | forecast=ts |
"Low around 27" |
t | Title | forecast=tt |
"Daily Minimum Temperature" |
d | Append Degree | forecast=td |
"27°" |
l | Short Label | forecast=tl |
"27Low" |
b | Pad or Truncate | forecast=tt8b forecast=tl8b |
"Daily Mi" |
x | Truncate Only | forecast=tt8x forecast=tl8x |
"Daily Mi" |
r | Right Justify | forecast=tl8r |
" 27Low" |
c | Center Justify | forecast=tl8c |
" 27Low " |
Precipitation - r
Chunk ID: r
Default Text: Observed Feels Like degrees in Fahrenheit (if returned by NOAA), left justified, and if the width is provided, then padded to that.
Example: forecast=r
returns "40"
Modifier | Description | Example | Result |
---|---|---|---|
s | String | forecast=rs |
"Chance of precipitation is 40%" |
t | Title | forecast=rt |
"Probability of Precipitation" |
b | Pad or Truncate | forecast=rt8b forecast=r8b |
"Probabil" |
x | Truncate Only | forecast=rt8x forecast=r8x |
"Probabil" |
r | Right Justify | forecast=r8r |
" 40" |
c | Center Justify | forecast=r8c |
" 40 " |
Period - p
Chunk ID: p
Default Text: The period of time the forecast covers, left justified, and if the width is provided, then padded to that.
Example: forecast=p
returns "Tonight"
Modifier | Description | Example | Result |
---|---|---|---|
s | String | forecast=ps |
"Forecast for Tonight" |
t | Title | forecast=pt |
"Period" |
b | Pad or Truncate | forecast=ps10b forecast=p10b |
"Forecast f" |
x | Truncate Only | forecast=ps10x forecast=p10x |
"Forecast f" |
r | Right Justify | forecast=p10r |
" Tonight" |
c | Center Justify | forecast=p10c |
" Tonight " |
Advanced Chunks
Start Valid Time - v
Chunk ID: v
Default Text: The starting date and time of the period of time of the forecast in rfc2822 format, left justified, and if the width is provided, then padded to that.
Example: forecast=v
returns "2020-12-15T21:00:00-05:00"
Modifier | Description | Example | Result |
---|---|---|---|
m | Date Time Format A | forecast=vm&dtformata=Y-m-d |
"2020-12-15" |
k | Date Time Format B | forecast=vk&dtformatb=g:i:s |
"9:00:00" |
j | Date Time Format C | forecast=vj&dtformatc=g a |
"9 pm" |
s | String | forecast=vs |
"Starting 2020-12-15T22:00:00-05:00" |
t | Title | forecast=vt |
"Start Valid Time" |
b | Pad or Truncate | forecast=vt8b forecast=vj8b&dtformatc=g a |
"Start Va" |
x | Truncate Only | forecast=vt8x forecast=vj8x&dtformatc=g a |
"Start Va" |
r | Right Justify | forecast=vj8r&dtformatc=g a |
" 9 pm" |
c | Center Justify | forecast=vj8c&dtformatc=g a |
" 9 pm " |
Labels - w
Chunk ID: w
If you wish to have arbitrary text returned, you can do so using the Labels Chunk.
Example: forecast=w
returns "Forecast"
Modifier | Description | Example | Result |
---|---|---|---|
m | Label A | forecast=wm&labela=LabelA |
"LabelA" |
k | Label B | forecast=wk&labelb=LabelB |
"LabelB" |
j | Label C | forecast=wj&labelc=LabelC |
"LabelC" |
s | String | forecast=ws |
"Current Forecast" |
b | Pad or Truncate | forecast=ws10b forecast=wj10b&labelc=LabelC |
"Current Fo" |
x | Truncate Only | forecast=ws10x forecast=wj10x&labelc=LabelC |
"Current Fo" |
r | Right Justify | forecast=wl8r |
" LabelC" |
c | Center Justify | forecast=wl8c |
" LabelC " |
Textual Chunks
Character - c
Chunk ID: c
If you wish to have a single specific UTF-8 character returned, you can do so using the Character Chunk.
Integer values between 33 and 126 inclusive are allowed. UTF-8 Character code values can be found at the UTF-8 encoding table and Unicode characters web page.
Example: forecast=c64
returns "@"
Symbol - s
Chunk ID: s
If you wish to have a specific character returned that can be padded or repeated, you can do so using the Symbol Chunk.
Values of ":", "@", "\", "-", ".", "_", "~", "!", "$", "'", "(", ")", "*", ";" are allowed. If only an "s" is sent, then a space will be returned.
Example: forecast=s#
returns "#"
Modifier | Description | Example | Result |
---|---|---|---|
s | repeat instead of pad | forecast=s#6 |
"$$$$$$" |
r | Right Justify | forecast=s#6r |
" #" |
c | Center Justify | forecast=s#6c |
" # " |