sfctext
Sections
NAME
sfctext - Surface data display program
SYNOPSIS
sfctext [parameters...] filename
PARAMETERS
Command Line | Resource | Default | Description |
---|---|---|---|
-h | help | No | Lists basic help information. |
-df=filename | default | wxp.cfg | Sets the name of the resource file. |
-na=name | name | the program name | Specifies the name used in resource file parsing. |
-me=level | message | out2 | Specifies level of messages to be displayed |
-fp=path | file_path | the current directory | Specifies location of database files. |
-dp=path | data_path | the current directory | Specifies the location of the input raw data files. |
-cp=path | con_path | the current directory | Specifies location of decoded/converted data files |
-nc=name_conv | name_conv | name.cnv or name_conv file | This sets which name convention file to use. |
-if=in_file | in_file | sfc_dat | Specifies the input file name tag. |
-cu=[hour] | current | none | This specifies to use current data files. |
-ho=hour | hour | none | Specifies the exact hour that a data file is valid for. |
-nh=hours[,skip] | num_hour | Value Generally 0 | Specifies the number of hours worth of data to use in the program |
-cf=filename | city_file | program specific | Specifies the name of the city database file |
-pd=domain | plot_domain | program dependent, mostly "us" | Sets the plotting domain |
-pr=prior | stat_prior | Plot size dependent | Specifies the station priority to use in filtering stations on the plot |
-id=ident[,ident...] | identifier | None | Specifies a station identifier to plot or parse for |
-pa=param[,param...] | parameter | none | Specifies addition parameters to program. |
filename (positional) | filename | none | Specify input filename |
DESCRIPTION
This program displays surface data in a tabular format. The input to the program is either a raw ingested surface data file or a converted surface data file produced by the prog:sfcdec program.
The programs starts off by prompting the user for input data file name. The user may specify the input file either via the command line of through the resrc:current resource. The input naming convention is specified by the sfc_dat tag (or sfc_cvt if "cvt" data is requested) but this can be changed with the resrc:in_file resource.
Next, the user enters a station identifier. The stations are entered by their 3/4 letter IDs. Once the station is selected, the program prints out surface data.
Text Output
There are 4 formats for surface data output:
- raw - this prints the raw undecoded data (second line will
be indented):
KBIV 070242Z AUTO 13006KT 5SM -RA BR SCT015 15/15 A2995 RMK AO2
P0002 TSNO
- pln - this prints a single line of decoded output:
ID TIME T TD RH DIR SPD GST ALT SLP VIS CIL COV WX MAX MIN PR6 PR24 SC
KLNP 0240 52 43 71 150 4 002 10 CLR
K4BK 2347 69 52 54 310 10 114 30 CLR 72 59 - plns - this is a 2 line output of decoded output plus an
optional third line for comments:
ID Tp Time Vis PWx SLPres T Td WD-WS WG Alt PT Max Min
CHt CCv CHt CCv CHt CCv CHt CCv CHt CCv L:M:H Rn3 Rn6 Rn12 Rn24 SC
PATL SP 0335 10.0 64 51 290- 4 29.58
43 SCT : :
COMMENT: AO1
PAEH SP 0335 10.0 49 43 340- 4 29.66
6 SCT : :
COMMENT: AO1 - psyn - this prints out a single line of decoded output
setup for synoptic data:
ID Cht Cv Vis PWx SLPres T Td WD-WS WG Te PT Rn6 Rn24 SC L:M:H
KSLC 250 F 15.0 1004.7 68 58 280- 7
- psimp - this prints out a single line of decoded data more
appropriate for general use:
ID Temp Dew Winds Press Clouds Prec Weather
F F deg knt mb 100ft cov in
MGGT 64 63 360 at 14 ------ --- ---- heavy drizzle
MGGT 64 63 360 at 14 ------ --- ---- heavy drizzle
PAWR 55 46 90 at 3 1024.0 --- ----
PASD 46 39 50 at 5 ------ --- ---- - pfull - this is a multi-line output per station more
appropriate for general use:
Data for: KHOU
-----------------------------------
Report time: 0450 Z
Temperature: 82 F = 27.5 C
Dewpoint: 78 F = 25.3 C
Winds: 160 deg at 6 knt
Altimeter setting: 29.85 in Hg
Sea level pressure: 1010.8 mb
Clouds:level 1: 1500 feet few
level 2: 2500 feet scattered
Visibility: 10.00 miles
Heat index: 89.5 F - pvar - use the variable resource to create the table of station data (see below).
Column headings include:
- ID - Station identifier
- Tp - Type of report (SA,RS,SP)
- Time - Time of the report in GMT
- Vis - Visibility in miles
- PWx - Present weather (RW-F for example)
- SLP/SLPres - Sea level pressure in mb
- T - Temperature in F
- Td - Dewpoint in F
- DIR/WD - Wind direction
- SPD/WS - Wind speed (separated from direction by a hyphen)
- GST/WG - Gust data (left blank if none reported)
- Alt - Altimeter setting in inches of Hg
- PT - Pressure tendency in standard coded form (310 for example)
- PR6/Rn6 - 3 or 6 hour precipitation in inches (separated from PT by a colon)
- PR24/Rn24 - 24 hour precipitation in inches
- Te - Extreme temperature in F
- Max - maximum temperature in F
- Min - minimum temperature in F
- SC - Snow cover in inches
- CIL/CHt - Cloud ceiling height data
- COV/Cv/CCv - Cloud coverage data for each cloud level as text "SCT" or eighths "1/8"
- L, M, H - Low, middle and high cloud type information (separated by colons)
Printing using Variable Interface
If the print type is set to pvar, the variable resource is
used to determine which variables will be printed in the table. There is a
sa_parse.var file for setting up complicated tables and simplifying
program use. The possible formatting includes the units and output C
format (wetblb:F:%.1f
). Also, time can be specified for
use with precipitation (anal-6acc::prec::%.2f
). The data
is displayed in 7 character wide columns. The output for
"city,temp,dewp,rhum,wetblb:F:%.1f
" would look like:
city temp dewp rhum wetblb F KTHV 83 66 57 71.1 KIPT 85 64 50 70.4 KAGC 84 61 45 68.4 KPIT 82 61 49 67.9 KPHL 84 73 70 76.0 KFKL 81 61 51 67.4 KERI 82 65 56 70.2 KAFJ 82 61 48 67.9 KSEG 85 63 48 69.9 ...
Here is a list of the possible variables:
Variable | Description and units |
---|---|
city or id | Station ID |
otime | Observation time |
temp | Temperature (F) |
dewp | Dewpoint (F) |
dewd | Dewpoint depression (F) |
wdir | Wind direction (deg) |
wspd | Wind speed (knt) |
wgst | Wind gust (knt) |
alt | Altimeter setting (in_Hg) |
pres | Sea level pressure (mb) use level parameter to get station/surface pressure |
pralt | Sea level pressure or altmeter setting if sea level pressure is missing (mb) |
elev | Station elevation (m) |
wx | Present weather (string) |
vis | Visibility (mi) |
cldcl | Cloud ceiling (100 ft) |
cldcv | Cloud cover (cloud string) |
ptend | Pressure tendency (mb, trend is a string) |
prec | Precipitation (in) use time parameter to specify which type (3,6,12,24 hour) |
extt | Extreme temperature (F) uses maximum if available, else
minimum. Use time parameter to specify which type (6,24 hour) |
maxt | Maxmium temperature (F) use time parameter to specify which type (6,24 hour) |
mint | Minimum temperature (F) use time parameter to specify which type (6,24 hour) |
snwdp | Snow depth (in) |
lcld | Low cloud type (string) |
mcld | Middle cloud type (string) |
hcld | High cloud type (string) |
solar | Equivalent solar radiation (min) |
sst | Sea surface temperature (C) |
wavper | Wave period (sec) |
wavhgt | Wave height (m) |
vpres | Vapor pressure (mb) |
svpres | Saturation vapor pressure (mb) |
wchilt | Wind chill temperature (K) |
wchilf | Wind chill factor (W/m^2) |
heat | Heat index (K) |
humit | Humiture (F) |
mrat | Mixing ratio (g/kg) |
smrat | Saturation mixing ration (g/kg) |
shum | Specific humidity (g/kg) |
rhum | Relative humidity (%) |
wetblb | Wetbulb temperature (K) |
thetaw | Wetbulb potential temperture (K) |
thetae | Equivalent potential temperature (K) |
thetav | Virtual potential temperture (K) |
theta | Potential temperature (K) |
vtemp | Virtual temperature (K) |
fr | Flight rules (number and string: 0=VFR, 1=MVFR, 2=IFR) |
EXAMPLES
sfctext -cu=la -id=KIND KIND 020756Z 11003KT 9SM CLR 06/06 A3013 RMK AO2 SLP203 T00560056 $
This displays surface data for KIND.sa_parse -cu=la -id=KIND -if=cvt ID TIME T TD RH DIR SPD GST ALT SLP VIS CIL COV WX MAX MIN PR6 PR24 SC KIND 0756 42 42 100 110 3 013 203 9 CLR
This displays a user specified list of variables:sa_parse -cu=la -if=cvt -id=ST=PA -pa=city,pvar \ -va=city,temp,dewp,rhum,wetblb:F:%.1f city temp dewp rhum wetblb F KTHV 83 66 57 71.1 KIPT 85 64 50 70.4 KAGC 84 61 45 68.4 KPIT 82 61 49 67.9 KPHL 84 73 70 76.0 KFKL 81 61 51 67.4 KERI 82 65 56 70.2 KAFJ 82 61 48 67.9 KSEG 85 63 48 69.9 ...
FILES
- sao.cty - the surface station location database file
SEE ALSO
Last updated October 2013