Produces a solar raster map for the current time. Rasters are produced at 0.5° resolution. Processing time will vary per machine but a modest processor takes about 6 minutes per raster with --high-accuracy and less than 1 minute without.
The output raster contains Wattage values and can be used in calculations requiring solar radiation at Earth's surface. See pysolar documentation for more information.
- GDAL / pygdal
- numpy
- pysolar
- pytz
usage: create_solar_raster.py [-h] [-s start time] [-o save location] [--high-accuracy]
Generates a solar radiation raster
optional arguments:
-h, --help show this help message and exit
-s, --start-time
Solar radiation model UTC date in YYYYMMDDHHMM format;
default: NOW
-o full path to the new output GeoTIFF file
--high-accuracy uses a refined algorithm for solar altitude at the
expense of time
Generate the current solar raster
$ python create_solar_raster.py -o ~/Documents/current.tif
Generate for a given time
$ python create_solar_raster.py -s 201903202258 -o ~/Documents/springequinox.tif
Generate at high accuracy
$ python create_solar_raster.py -s 201906211554 -o ~/Documents/summersolstice.tif --high-accuracy