Resources

Using the FORMAT=KMZ Option to Retrieve NOAA

/*----------------------------------------------------------------

                   SAS SAMPLE LIBRARY

       Name: noaaex09.sas
Description: Example program from SAS/ETS User's Guide,
             The SASENOAA Interface Engine
      Title: Using the FORMAT=KMZ Option to Retrieve NOAA
             NX3HAIL Data for a Filter
    Product: SAS/ETS Software
       Keys: NOAA Severe Weather Data Inventory NX3HAIL FORMAT=KMZ Option
      Procs: SASENOAA
      Notes: Read this before you run this sample.
             The sample data provided resides in the ets/sasmisc folder,
             and is only provided so that you can see how the data you
             download is supposed to look.
             The KMZ data that SASENOAA downloads
             should be identical as the sample data.

             You can define system environment variable
             named NOAA_DATA that designates the path of your writeable
             folder where the KMZ google earth map and XML file from the
             NOAA SWDIWS are to be written.
             To assign a fileref to the external file to be processed,
             you could then use the NOAA_DATA environment variable in the
             following form of the libname statement:

           libname noaa sasenoaa "%sysget(NOAA_DATA)"
              NOAASET=nx3hail
              RANGE='20110521:20110522'
              FILTERBY='WSR_ID:KFWS'
              FILTERBYCONDITION='WSR_ID:or'
              OUTKMZ=myK2by
              AUTOMAP=replace
              MAPREF=MyMap
              KMZMAP="%sysget(NOAA_DATA)\myK2BY.kmz"
              FORMAT=kmz
              ;

             Alternatively, you can specify a path to an already existing
             physical folder such as "/sasusr/playpens/saskff/noaa/test/"
             as shown in the code that follows.
 ----------------------------------------------------------------*/


options validvarname=any
   sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";

title 'Retrieve NOAA NX3HAIL Data for WSR_ID=KFWS on May 21, 2011';
libname _all_ clear;
libname mylib "/sasusr/playpens/saskff/noaa/doc/";

libname noaa sasenoaa "/sasusr/playpens/saskff/noaa/test"
   debug=on
   noaaset=nx3hail
   range='20110521:20110522'
   filterBy='WSR_ID:KFWS'
   filterByCondition='WSR_ID:or'
   outkmz=myK2by
   automap=replace
   mapref=MyMap
   kmzmap="/sasusr/playpens/saskff/noaa/test/myK2by.kmz"
   format=kmz
   ;

data mylib.HAILby2;
   set noaa.myK2by;
run;

proc contents data=mylib.HAILby2; run;
proc print data=mylib.HAILby2; run;