tum-ens / pyGRETA

python Generator of REnewable Time series and mAps
GNU General Public License v3.0
37 stars 14 forks source link

How does the programm use the shapefile of the subregions? #168

Open SaberaAli opened 3 years ago

SaberaAli commented 3 years ago

I have two questions:

  1. How does the programm use the shapefile of the subregions? If we have, for example, 3 regions: A, B, C, which effect does it have on the output files?

  2. In the code, the functions _get_regressioncoefficients and _generate_timeseries_forregions were commented out (in runme.py). Should it be like that? I tried to execute these functions, and I have got an error that the subregions of Afghanistan are not contained in the IRENA database. As far as I know, the IRENA database contains only information about countries and not specifics about the regions of the countries. Does it mean that these functions can not be used and timeseries and regression coefficients can not be generated for the subregions?

kais-siala commented 3 years ago

Hi,

  1. When you generate the time series, the code considers all the available pixels within region A, sorts them based on their full-load hours, and picks the pixels at the user-specified quantiles (for example q50 = median, q100 ~ best location, q0 ~ worst location). It generates the time series for those pixels. No averaging over the region is done to preserve the fluctuation of the time series. Same for regions B and C.
  2. Correct, those functions can only run for countries that are within IRENA. You could create a csv file manually instead of running the regression, where you specify how you want to combine the different quantiles (giving them weights), then run the last function. An example of what such a file looks like can be found in this archive: https://zenodo.org/record/4028181

I hope this helps!