NAME

GHCN::Fetch - Fetch station and weather data from the NOAA GHCN repository

VERSION

version v0.22.258

SYNOPSIS

use App::GHCN::Fetch;

App::GHCN::Fetch->run( \@ARGV );

See ghcn_fetch.pl -help for details.

SUBROUTINES

run ( \@ARGV )

Invoke this subroutine, passing in a reference to @ARGV, in order to fetch NOAA GHCN station data or daily weather data.

See ghnc_fetch.pl -help for details.

get_user_options ( $optfile=undef )

Fetch.pm uses get_user_options() to either get user options via Tk::GetOptions -- if it is installed -- or via Getopt::Long.

get_user_options_no_tk ( $optfile=undef )

This function obtains user options from @ARGV by calling Getopt::Long GetOptions using a list of option definitions obtained by calling GHCN::Options-get_getopt_list()>. The options (and their values) are extracted from @ARGV and put in a hash, a reference to which is then returned.

The $optfile argument is only used by get_user_options_no_tk.

get_user_options_tk ( $optfile=undef )

This function returns a reference to a hash of user options obtained by calling Tk::Getopt. This may launch a GUI dialog to collect the options.

The optional $optfile argument specifies a filename which Tk::GetOptions can use to store or load options.

valid_report_type ($rt, \@opttable)

This function is used to valid the report type. Valid values are defined in the built-in Tk options table, which can be obtained by calling:

my @opttable = ( GHCN::Options->get_tk_options_table() );

deabbrev_report_type ($rt)

The report types supported by the -report option can be abbrevated, so long as the abbrevation is unambiquous. For example, 'daily' can be abbreviated to 'dail', 'dai', 'da', or even 'd'.

This function takes a (possibly abbreviated) report type and returns an unabbreviated report type.

AUTHOR

Gary Puckering (jgpuckering@rogers.com)

LICENSE AND COPYRIGHT

Copyright 2022, Gary Puckering