ghcn_station_counts.pl - Count stations in ghcn_fetch.pl output
version v0.0.004
ghcn_station_counts.pl [-input] [-output] [-debug] [-verbose] [ file... ] ghcn_station_counts.pl [--help | -? | --usage]
The purpose of this script is to read a station list produced by "ghcn_fetch.pl" and to turn that list into a set of active station counts for each year. No report option should be given, so it generates a list of stations rather than weather data.
The input data must be tab-separated and contain the Station ID, the country, the state/province, and the active range (e.g. 1900-1927). All trailing columns of data are ignored.
In typical use, you would extract the stations of interest with:
ghcn_fetch -report "" <other_options>
and then either pipe it to ghcn_station_counts or save the output to a file and then use that file as input to ghcn_station_counts.
The output is a tab-separated three-column list consisting of the year, decade, and the count of active stations found in that year. This is suitable for importing into Excel and turning into a bar chart using PivotTable. You can chart by year or decade, using the average, maximum or minimum of the station count.
Getoptions::Long is used, so either - or -- may be used. Parameter names may be abbreviated, so long as they remains unambiguous. Flag options may appear after filenames.
Send output to the Windows clipboard.
Enables debug() statements.
Display this documentation.
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.