NAME
    Weather::GHCN::Fetch - Access the NOAA GHCN Global Historical
    Climatology Network repository

VERSION
    version v0.0.004

DESCRIPTION
    The Weather::GHCN module library provides classes that can be used to
    develop applications that access weather data collected by the U.S.
    National Oceanic and Atmospheric Administration. The modules enable the
    retrieval of the surface station weather data and metadata that NOAA
    publishes as the Global Historical Climatology Network (GHCN) data
    repository, which is fed by weather data sources from around the world.

NOAA GHCN DATA SOURCES
    The main data sources are:

    *   <https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/all/>

    *   <https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt>

    *   <https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-inventory.txt>

    NOAA also provides a readme file here:

    *   <https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/readme.txt>

APPLICATION SCRIPTS
    The Weather::GHCN::Fetch package includes fully functional application
    scripts that are based on Weather::GHCN::App modules. These are:

    ghcn_fetch
        Fetches station and/or weather data for reporting.

    ghcn_extremes
        Reports temperature extremes, including heatwaves and coldwaves,
        from station-level daily weather retrieved by ghcn_fetch.

    ghcn_station_counts
        Take a list of stations found by ghcn_fetch, examines the active
        date range, and produces a count of stations that were active in
        each year of the range.

    The output from all scripts is tab-separated and designed for easy
    import into Excel (or similar) for analysis, reporting and charting.
    ghcn_extremes and ghcn_station_counts are designed to take the output
    from ghcn_fetch via pipeline.

    Each script has a -help option that documents its features and options.

APPLICATION MODULES
    The application scripts are mostly just a thin veneer over corresponding
    modules in the Weather::GHCN::App namespace. That and the POD necessary
    for -help and -usage.

    The application scripts are built upon the API modules, primarily
    Weather::GHCN::StationTable.

API MODULES
    The API modules are the heart of the package, encapsulating the logic
    necessary for accessing the GHCN repository, downloading station
    metadata and daily weather data, managing the plethora of options
    supported by the ghcn_fetch application, etc.

    The modules are:

        Weather::GHCN::StationTable
        Weather::GHCN::Station
        Weather::GHCN::Common
        Weather::GHCN::CountryCodes
        Weather::GHCN::Measures
        Weather::GHCN::Options
        Weather::GHCN::TimingStats

    This module, Weather::GHCN::Fetch, is actually just a stub that provides
    documentation and a primary module name for the distribution.

EXAMPLES
    The primary usefulness of this package comes from the application
    scripts. Here are some examples:

    List the weather stations in NY state with "New York" in the name:

    "ghcn_fetch -country US -state NY -location "New York""

    List the New York weather stations active between 1900 and 1920:

    "ghcn_fetch -cou US -st NY -location "New York" -active 1900-1920"

    Report the yearly max, min and average temperatures at JFK airport:

    "ghcn_fetch yearly -cou US -st NY -location "New York JFK""

    Report the monthly max, min and average temperatures at JFK airport:

    "ghcn_fetch monthly -cou US -st NY -location "New York JFK""

    Report the daily max, min and average temperatures at JFK airport:

    "ghcn_fetch daily -cou US -st NY -location "New York JFK""

    Launch the GUI for an options dialog

    "ghcn_fetch -gui"

    (requires Tk and Tk::Getopt to be installed)

    Get documentation on all the options

    "ghcn_fetch -help"

    Find the 5-day heatwaves at the JFK airport station:

    "ghcn_fetch id -cou US -st NY -location "New York JFK" | ghcn_extremes"

    Find the 3-day coldwaves (<= 15C) at the JFK airport station:

    "ghcn_fetch id -cou US -st NY -location "New York JFK" | ghcn_extremes
    -cold -ndays 3 -limit -15"

    For each year between 1900 and 1950, count the number of active weather
    stations in NY state:

    "ghcn_fetch id -cou US -st NY -active 1900-1950 | ghcn_station_counts"

AUTHOR
    Gary Puckering (jgpuckering@rogers.com)

LICENSE AND COPYRIGHT
    Copyright 2022, Gary Puckering