Weather::GHCN::App::StationCounts - Count stations in Weather::GHCN::Fetch station output
version v0.0.011
use Weather::GHCN::App::StationCounts; Weather::GHCN::App::StationCounts->run( \@ARGV );
See ghcn_station_counts -help for details.
Encapsulates the mainline logic so this module can be used in a test script. An application script merely needs to use this module and then call:
Weather::GHCN::App::StationCounts->run( \@ARGV );
From the file handle $fh, read a list of stations in the format generated by Fetch.pm, and count the stations that were active in any given year.
Sometime the active range in data retreived from the NOAA station inventory is malformed. This routine tries to spot these malformed ranges and fix them.
get_options encapsulates everything we need to process command line options, or to set options when invoking this script from a test script.
Normally it's called by passing a reference to @ARGV; from a test script you'd set up a local array variable to specify the options.
By convention, you should set up a file-scoped lexical variable named $Opt and set it in the mainline using the return value from this function. Then all options can be accessed used $Opt->option notation.
Gary Puckering (jgpuckering@rogers.com)
Copyright 2022, Gary Puckering
To install Weather::GHCN::Fetch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Weather::GHCN::Fetch
CPAN shell
perl -MCPAN -e shell install Weather::GHCN::Fetch
For more information on module installation, please visit the detailed CPAN module installation guide.