NAME
Weather::GHCN::App::StationCounts - Count stations in Weather::GHCN::Fetch station output
VERSION
version v0.0.011
SYNOPSIS
use Weather::GHCN::App::StationCounts;
Weather::GHCN::App::StationCounts->run( \@ARGV );
See ghcn_station_counts -help for details.
SUBROUTINES
run ($progname, $argv_aref)
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 );
See ghcn_station_counts -help for details.
read_data( $fh, \%count )
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.
parse_active_range ($stnid, $active)
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 ( \@argv )
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.
AUTHOR
Gary Puckering (jgpuckering@rogers.com)
LICENSE AND COPYRIGHT
Copyright 2022, Gary Puckering