The Linke turbidity csv file is formatted as Latitude, Longitude, Linke for January. The Latitude and Longitude values are in WGS84.
Convert Coordinates (m.proj)
In order to import the values as a vector in our LOCATION, we must first convert the Latitude and Longitude values to the LOCATION's Coordinate Reference System.
Before doing any processing, especially for rasters, it is important to make sure that the computational region (extent and resolution) is correct.
You can show the current computational region by:
g.region -ap
For our purpose, we need to set the computational region equal to that of the elevation raster. This can be done by:
g.region raster=elev@REG03
Or by right clicking on the layer and selecting
Processing
Slope and Aspect raster
Slope and aspect rasters can be computed using r.slope.aspect
Horizon rasters are computed using r.horizon.
For quicker computations, set the computational region to 300 prior to computing the horizon rasters by using:
g.region res=300
Afterwards, the horizon rasters can be computed by:
This can also be done by right clicking on the vector -> Show attribute data -> Manage Tables -> Add columns
Sample elevation values at the vector points (v.what.rast)
The next step is to get the elevation values at the vector points. This can be done by sampling the elevation raster at the vector points with v.what.rast.
Clear-sky solar radiation computations using r.sun
r.sun is a topography based solar radiation model implemented in GRASS GIS whose main inputs are an elevation raster and the Julian date. Here we will use r.sun to compute for the clear-sky GHI on January 1 of Region 3. The inputs that we will use are:
Changing the color scheme of rasters can be done using r.color. Built-in color rules are provided but users can also create their own color rules.
For example:
You can also save the color table to a file so that you can re-use it.
Getting the average solar radiation received by each province (v.rast.stats)
Zonal statistics like getting the average raster values inside a polygon can be done using v.rast.stats. Here, we want to compute for the average clear-sky solar radiation received by each province for the day (Jan 1).
First we load the provinces vector into the Layer Manager. Then we use v.rast.stats to compute for the average GHI received by each province.
Make sure that you tick the force removal checkbox and select the data type.
You use regular expressions or wildcards to remove multiple data with the same names.
g.remove
Resampling a raster (r.resamp.stats)
Before resampling a raster, you should first set the resolution of the computation region to that of the resolution you want to resample to. For example, if you want to resample from 90m to 300m, first set the resolution of the computation region to 300 by:
g.region res=300
Resampling is done using r.resamp.stats. This resamples the raster based on an aggregation method (e.g. average, median, mode, etc.) chosen by the user.