Insolation - Perl extension for calculating the amount of energy at a given point on the earth for a given time period.
use Insolation; my $insolation = new Insolation(); $insolation->set_latitude('44.915982'); # set latitude $insolation->set_longitude('-93.228340'); # set longitude $insolation->set_year('2010'); # set year $insolation->set_month('10'); # set month $insolation->calculate_insolation(); # calculate the insolation for the givin information # get xml output my $xml = $insolation->get_xml(); # get csv output my $csv = $insolation->get_csv(); # get culmulative energy for the month my $month_energy = $insolation->get_ym_insolation('2010-10'); printf "insolation for 2010-10 : %9.2f\n", $month_energy; # get the energy on a specific day my $day_energy = $insolation->get_ymd_insolation('2010-10-01'); printf "insolation for 2010-10-01 : %9.2f\n", $day_energy;
This module will compute the amount of insolation at a specific location. Passing in your longitude and latitude it'll then need your month and year. "Insolation" means sunlight received from the Sun at top-of-atmosphere. On a global annual basis, about 57% of insolation is incident on the Earth's surface. Clouds are the main cause of this decrease, but even clear sky will have some reduction.
Calculation for insolation in the Atmosphere-Ocean Model has inaccuracies that should be kept in mind. These are roughly ordered according to importance.
1. We assume the Earth revolves through its orbit in exactly 365 days.
2. We assume that the Vernal equinox always occurs on March 21, hour 0.
3. We calculate the Earth in its orbit only once a day.
4. Instead of integrating insolation over a GCM grid box, we integrate insolation over a single latitude line within the box. That line is the area weighted latitude of the box. This error causes global insolation to increase by .0001 and is accentuated at the poles.
5. We keep the orbital parameters fixed during long runs.
6. We keep the meridion where the sun is overhead on noon Greenwich mean time as the Greenwich meridion. (That meridion is calculated but not used.)
7. We treat the Sun as a point; its radius does not affect our distance to the sun.
8. We treat the Earth as a point; its radius does not affect the distance to the sun.
9. We ignore the existence of the Moon, and assume that the center of the Earth-Moon system is the center of the Earth.
10. We assume that the Earth is spherical.
11. We assume that the orbit is a perfect ellipse; other heavenly bodies do not affect it.
12. We use Berger's orbital parameters.
None by default.
Idea Source link : http://aom.giss.nasa.gov/srlocat.html
Wiki link : http://en.wikipedia.org/wiki/Insolation
Web link : http://www.travisbeste.com/programming/perl/Insolation
Travis Kent Beste, <travis@tencorners.com>
Copyright (C) 2010 by Travis Kent Beste
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Insolation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Insolation
CPAN shell
perl -MCPAN -e shell install Insolation
For more information on module installation, please visit the detailed CPAN module installation guide.