tum-ens / pyGRETA

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

Raster of land use #167

Open SaberaAli opened 3 years ago

SaberaAli commented 3 years ago

Ich habe eine Frage was den Download von den Daten für den Input (Raster of Land use) angeht. In der Dokumentation ist folgender Link angegeben:( https://search.earthdata.nasa.gov/search/granules?p=C186286578-LPDAAC_ECS&pg[0][gsk]=-start_date&q=C186286578-LPDAAC_ECS&m=0!0.0703125!2!1!0!0%2C2&tl=1582926769!4!! )

Hier erhalte ich aber, anstatt einer .tif Format, viele kleine Dateien in .hdf Fromat. ( https://search.earthdata.nasa.gov/search/granules?p=C186286578-LPDAAC_ECS&pg[0][gsk]=-start_date&g=G1918439935-LPDAAC_ECS&q=C186286578-LPDAAC_ECS&m=-48.20000323902508!-133.83238430858052!0!1!0!0%2C2&tl=1583055942!4!! ) Ich wollte fragen wie ich das umwandeln kann und diese als eine große Datei hernehmen kann.

Ich werde eine Analyse für das Land Afghanistan durchführen. Unter diesen LInk konnte ich die Dateien in der richtigen Format für das Land finden: ( https://lpdaacsvc.cr.usgs.gov/appeears/download/29fa8a73-d06a-4311-8653-1545780e343f ) Dies kann ich aber leider nicht in dem Code als Input verwenden, da es zur Fehlermeldungen kommt. Ich denke es muss eine Datei für das ganze Globus sein und nicht spezifisch für das Land.

kais-siala commented 3 years ago

Hi, (I am going to reply in English so that other users can understand)

You have two options:

  1. Either write a small module that reads the small .hdf files, combines them in one single matrix, then outputs a .tif file.
  2. Or use the file you have found for Afghanistan directly. Make sure that the matrix dimensions match the size of the scope exactly (that is usually not given).

Explanation: The script can use global maps to derive maps for the exact scope, but that step can be skipped if you already have .tif files that are the right size. You need to comment line 21 in the script "lib/generate_inputs.py" if you do not use the global map of land use (option 2). If you choose option 1, it would be nice to add that module to the code. I encourage you to push that change, when it is ready.

Cheers, Kais