LIBNAME libref SASENOAA 'physical-name' options;
The LIBNAME statement assigns a SAS library reference (libref) to the physical path of the directory where you want the NOAA Severe Weather Data Inventory (SWDI) files to be downloaded and stored. The required physical-name argument specifies the location of the folder where your SWDI XML or data shapefiles reside. The physical-name should end with a backslash if you are in a Windows environment and a forward slash if you are in a UNIX environment. The designated folder that is specified in the physical-name argument must already exist before you submit the LIBNAME libref SASENOAA statement.
You can specify the following options in the LIBNAME libref SASENOAA statement.
specifies whether or not to overwrite the existing XML map file.
specifies that the XML map file be overwritten, and ensures that the most current XML map that is generated by the SASENOAA engine and named by the XMLMAP= option is used.
specifies that the XML map file not be overwritten, and ensures that a pre-existing XML map file that is named by the XMLMAP= option is used.
By default, AUTOMAP=REPLACE. The AUTOMAP= option is used only with the XML format (the default).
specifies the coordinates that define the bounding box in the format minLon,minLat,maxLon,maxLat. This option enables you to select the severe weather data that lie within the geographic area bounded by the box that is defined within the intersections of the specified paired sets of parallels and meridians.
specifies the center coordinates (longitude, latitude) of a geographic area that, when used along with the RADIUS= option, enable you to select the severe weather data from within the circle whose center is at the specified coordinates (CENTER= option) and of the specified radius (RADIUS= option). An example request follows for "Get all nx3tvs occurring on May 6, 2006, within 15 miles of latitude = 32.7 and longitude = –102.0 and return as XML":
LIBNAME libref sasenoaa 'physical-name'
FORMAT=xml
NOAASET=nx3tvs
RANGE='20060506:20060507'
RADIUS='15.0'
CENTER='-102.0,32.7'
OUTXML=mytvs;
specifies whether or not to use the connect method along with the PROXY= option. Note: You must use the PROXY= option and specify your proxy server in addition to the CONNECT=ON option when you want to use the connect method. For more information about a secure connection, see the PROXY= option.
specifies whether or not to include diagnostic message logging in the SAS log window. This information can be very useful for troubleshooting a problem.
specifies the column name and column value, separated by a colon, to filter the data by. Most often, the column name is WSR_ID and the column value is one of the NEXRAD III weather station ICAO codes shown in Table 2.
specifies the column name and condition value, separated by a colon, to filter the data by. Most often, the column name is WSR_ID and the condition is AND | OR. An example request follows:
LIBNAME libref sasenoaa 'physical-name'
FORMAT=xml
NOAASET=nx3hail
RANGE='20110521:20110522'
FILTERBY='WSR_ID:KFWS'
FILTERBYCONDITION='WSR_ID:or'
OUTXML=byNexR;
See also the FILTERBY= option.
specifies the format of the file to be retrieved from the NOAA SWDI web service. Although this service can report data in many formats, the SASENOAA engine supports only the XML, SHP, and KMZ formats. When you specify FORMAT=XML, the downloaded data file is named by the OUTXML= option and mapped using the fully designated physical file name specified in the XMLMAP= option. Similarly, when you specify FORMAT=KMZ, use the OUTKMZ= and KMZMAP= options to name your results; and when you specify FORMAT=SHP, use the OUTSHP= and SHPMAP= options to name your results. Note: Only one format specification is allowed in each SASENOAA LIBNAME statement.
specifies the message number to retrieve the complete text of the message for the data set specified in the NOAASET= option. ID numbers can be read from the ID column in the results data set (named in the OUTXML= option) for either the warn or plsr data set. The ID= option is used with either the warn or plsr data set to retrieve the entire message that matches the message number indicated in the ID= option for the desired data set, either the NOAA severe storm warnings (warn data set) or the preliminary local storm reports (plsr data set). See Example 50.1 for sample code that shows that the output from the ID= option is placed in the SAS data set named by appending _M to the member name specified in the OUTXML= option.
specifies the fully qualified name of the location where the KMZ map file (zipped KML map file) is automatically stored.
limits the number of observations in the results data set. Specify a number from 1 to 10,000,000.
specifies the fileref to use for the map assignment. For an example of the SASENOAA engine that uses the MAPREF= and XMLMAP= options in the FILENAME statement to assign a file name, as in the following, see the section Getting Started: SASENOAA Interface Engine:
FILENAME MyMap "/sasusr/playpens/saskff/noaa/test/gstart.map";
You can use the MAPREF= and XMLMAP= options to control where the map resides, what you name the map, and how you refer to it with a fileref. You can use the OUTXML= option to name your XML data file. It is placed in the folder that is designated by physical-name in your SASENOAA LIBNAME statement, and you can reference it by using the myLib libref. This is shown in the section Getting Started: SASENOAA Interface Engine, inside the DATA step in the SET statement. The SET statement reads observations from the input data set myLib.GSTART and stores them in a SAS data set named ShearV.
specifies the name of the NOAA SWDI data set that you want to access. Use one of the following names: nx3tvs, nx3meso, nx3mda, nx3hail, nx3structure, plsr, or warn. For a complete description of each data set, see the section Details: SASENOAA Interface Engine.
specifies a starting row number (offset) in the results to use as your first observation in the results data set.
specifies the name of the file where the KMZ data (FORMAT=KMZ) that are returned from the SWDI web service are stored. It is recommended that you specify the OUTKMZ= option when the FORMAT=KMZ option is specified. In cases where the two options do not correspond, the FORMAT= option overrides the designated OUTKMZ= option.
Note: The KMZ format produces a ZIP file whose name contains the corresponding file extension (.kmz). The SASENOAA engine automatically unzips the KMZ file to produce a KML map file. The KMZMAP= option gives the name and location of the resulting .kml file.
specifies the name of the file where the SHP data (FORMAT=SHP) that are returned from the SWDI web service are stored. It is recommended that you specify the OUTSHP= option when the FORMAT=SHP option is specified. In cases where the two options do not correspond, the FORMAT= option overrides the designated OUTSHP= option.
Note: The SHP format produces a ZIP file whose name contains the corresponding file extension (.shp). The SASENOAA engine automatically unzips the SHP file to produce four Esri map files with the file extensions .dbf, .prj, .shp, and .shx. For example, if OUTSHP=MYSBY and FORMAT=SHP, then the files that contain the SWDI data are named MYSBY.dbf, MYSBY.prj, MYSBY.shp, and MYSBY.shx.
specifies the name of the file where the XML data (FORMAT=XML), KMZ data (FORMAT=KMZ), or SHP data (FORMAT=SHP) that are returned from the SWDI web service are stored. When FORMAT=XML, additional SAS data sets are provided by the SASENOAA engine, depending on two options: ID= and STAT=. When an ID= option is also specified, the engine appends _M to the OUTXML= specification to name the resulting SAS data set that contains the message text that the SWDI web service returns. When the STAT= option is also specified, the engine appends _S to the OUTXML= specification to name the resulting data set that contains the counts from the statistical operation that is performed.
It is recommended that you specify the OUTXML= option when the FORMAT=XML option is specified. In cases where the two options do not correspond, the FORMAT= option overrides the designated OUTXML= option.
specifies which proxy server to use. This option is not required. The specified proxy server is used only when a connection-refused error or a connection-timed-out error occurs. For noaa_proxyserver, specify the server’s HTTP address followed by a colon and the port number, and enclose that string in double quotation marks; for example, PROXY="http://inetgw.unx.sas.com:8118". See also the CONNECT= option.
specifies the search radius (in miles) of the area to retrieve the severe weather data for. The current limit for the search radius is 15 miles. This option must be used with the CENTER= option.
specifies the date range to report severe (past) weather for. The format for noaa_range is YYYYMMDD:YYYYMMDD. The range must fall within the period of record for the desired data set. The NOAA SWDI data web service returns the period of record for the requested data set (in this case, nx3hail) at the following URL:
http://www.ncdc.noaa.gov/swdiws/xml/nx3hail/periodOfRecord
It also returns a begin date and end date, giving the available time range of data to choose from. Although the limit for a range is one year, often only a few days of data are requested, unless the STAT= option is used. More than one year is allowed in the RANGE= option when you also use the STAT= option to request the COUNT, which returns only the number of observations in the results data set.
specifies the fully qualified name of the location where the SHP map file (zipped Esri shapefiles) is automatically stored.
specifies the statistical operation that you want to perform on the requested severe weather data. You can specify one of the following values for noaa_stat_op within single quotes:
returns number of results only (no actual data).
returns number of results for each BY group (each WSR_ID that returns data).
returns daily feature counts for a tenth-of-a-degree grid centered at the specified coordinates.
Although the SASENOAA engine automatically checks the statistics to make sure there is a nonzero observation count before requesting the specified data, it is often useful to use the STAT= option to determine the best geographic area and the best date range to retrieve severe weather data that are of the most interest. Output from the STAT= option is placed in the SAS data set named by appending _S to the member name specified in the OUTXML= option.
specifies that you want to search for severe weather data in the geographic area within a 0.1 degree tile that is centered at the specified coordinates (longitude, latitude).
specifies the fully qualified name of the location where the XML map file is automatically stored.