Skip to content
Snippets Groups Projects
Commit ceff43ee authored by Peter Morstein's avatar Peter Morstein
Browse files

initial upload

parent 3375a841
No related branches found
No related tags found
No related merge requests found
Showing
with 203 additions and 23 deletions
Land-Ocean: Global Means
Year,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,J-D,D-N,DJF,MAM,JJA,SON
1880,-.17,-.23,-.08,-.15,-.08,-.20,-.17,-.09,-.13,-.22,-.20,-.16,-.16,***,***,-.10,-.15,-.19
1881,-.18,-.13,.04,.06,.07,-.17,.01,-.02,-.14,-.20,-.17,-.06,-.07,-.08,-.16,.06,-.06,-.17
1882,.18,.15,.05,-.15,-.13,-.22,-.15,-.06,-.13,-.23,-.15,-.35,-.10,-.07,.09,-.08,-.14,-.17
1883,-.28,-.36,-.11,-.17,-.16,-.07,-.05,-.13,-.20,-.10,-.22,-.10,-.16,-.18,-.33,-.15,-.08,-.17
1884,-.12,-.06,-.35,-.40,-.33,-.35,-.31,-.26,-.26,-.24,-.33,-.30,-.28,-.26,-.10,-.36,-.31,-.28
1885,-.58,-.33,-.26,-.41,-.45,-.43,-.33,-.31,-.28,-.23,-.23,-.10,-.33,-.34,-.40,-.37,-.36,-.25
1886,-.43,-.50,-.43,-.28,-.24,-.34,-.18,-.30,-.24,-.27,-.27,-.25,-.31,-.30,-.34,-.31,-.27,-.26
1887,-.71,-.56,-.35,-.34,-.30,-.24,-.25,-.35,-.25,-.35,-.25,-.32,-.36,-.35,-.51,-.33,-.28,-.28
1888,-.33,-.35,-.41,-.20,-.21,-.17,-.10,-.15,-.11,.02,.03,-.04,-.17,-.19,-.34,-.27,-.14,-.02
1889,-.08,.18,.06,.10,.00,-.09,-.07,-.20,-.24,-.25,-.33,-.28,-.10,-.08,.02,.05,-.12,-.27
1890,-.41,-.44,-.39,-.29,-.39,-.24,-.27,-.38,-.36,-.24,-.43,-.31,-.35,-.34,-.38,-.36,-.30,-.34
1891,-.33,-.46,-.18,-.27,-.16,-.20,-.17,-.17,-.15,-.21,-.30,-.04,-.22,-.24,-.37,-.20,-.18,-.22
1892,-.28,-.10,-.40,-.33,-.23,-.22,-.31,-.26,-.16,-.13,-.41,-.37,-.27,-.24,-.14,-.32,-.27,-.23
1893,-.80,-.56,-.22,-.26,-.33,-.24,-.13,-.24,-.22,-.18,-.18,-.31,-.31,-.31,-.58,-.27,-.21,-.19
1894,-.52,-.28,-.22,-.44,-.30,-.39,-.23,-.23,-.27,-.22,-.24,-.20,-.30,-.31,-.37,-.32,-.29,-.25
1895,-.39,-.42,-.32,-.21,-.26,-.20,-.16,-.17,-.12,-.10,-.16,-.13,-.22,-.23,-.34,-.27,-.18,-.13
1896,-.21,-.12,-.26,-.30,-.15,-.11,-.02,-.04,-.06,.07,-.04,-.04,-.11,-.11,-.15,-.23,-.06,-.01
1897,-.14,-.16,-.13,-.02,-.01,-.11,-.02,-.09,-.08,-.12,-.17,-.19,-.10,-.09,-.11,-.05,-.07,-.12
1898,-.01,-.29,-.50,-.30,-.29,-.18,-.21,-.25,-.20,-.33,-.37,-.23,-.26,-.26,-.16,-.36,-.21,-.30
1899,-.15,-.38,-.35,-.20,-.22,-.31,-.15,-.08,-.05,-.04,.13,-.26,-.17,-.17,-.25,-.26,-.18,.02
1900,-.35,-.05,.01,-.08,-.08,-.09,-.12,-.08,-.05,.10,-.06,-.06,-.08,-.09,-.22,-.05,-.10,.00
1901,-.21,-.10,.07,-.02,-.15,-.12,-.14,-.20,-.22,-.29,-.17,-.27,-.15,-.13,-.12,-.03,-.15,-.23
1902,-.17,-.06,-.27,-.28,-.31,-.29,-.27,-.29,-.28,-.28,-.35,-.41,-.27,-.26,-.17,-.29,-.28,-.30
1903,-.23,-.05,-.22,-.40,-.39,-.42,-.35,-.45,-.49,-.48,-.42,-.50,-.37,-.36,-.23,-.34,-.40,-.46
1904,-.63,-.57,-.47,-.50,-.51,-.48,-.50,-.48,-.55,-.38,-.16,-.32,-.46,-.48,-.57,-.49,-.49,-.37
1905,-.34,-.58,-.21,-.33,-.28,-.28,-.26,-.20,-.18,-.24,-.06,-.12,-.26,-.27,-.41,-.27,-.24,-.16
1906,-.27,-.29,-.18,-.04,-.25,-.19,-.22,-.19,-.28,-.19,-.37,-.14,-.22,-.22,-.23,-.16,-.20,-.28
1907,-.42,-.50,-.27,-.36,-.46,-.41,-.34,-.33,-.34,-.22,-.45,-.45,-.38,-.35,-.35,-.36,-.36,-.34
1908,-.44,-.32,-.54,-.44,-.37,-.37,-.34,-.45,-.35,-.43,-.51,-.48,-.42,-.42,-.40,-.45,-.39,-.43
1909,-.71,-.45,-.54,-.58,-.54,-.51,-.44,-.32,-.38,-.38,-.30,-.55,-.48,-.47,-.55,-.55,-.42,-.35
1910,-.40,-.40,-.50,-.41,-.33,-.38,-.33,-.36,-.38,-.40,-.54,-.66,-.42,-.41,-.45,-.41,-.36,-.44
1911,-.61,-.56,-.60,-.52,-.50,-.49,-.40,-.43,-.40,-.25,-.19,-.20,-.43,-.47,-.61,-.54,-.44,-.28
1912,-.24,-.13,-.36,-.16,-.20,-.22,-.41,-.53,-.57,-.56,-.37,-.42,-.35,-.33,-.19,-.24,-.39,-.50
1913,-.39,-.44,-.42,-.38,-.43,-.44,-.35,-.33,-.34,-.31,-.19,-.01,-.34,-.37,-.42,-.41,-.37,-.28
1914,.06,-.09,-.23,-.29,-.20,-.25,-.22,-.15,-.16,-.03,-.14,-.03,-.14,-.14,-.01,-.24,-.21,-.11
1915,-.19,-.03,-.09,.07,-.05,-.21,-.11,-.21,-.20,-.24,-.12,-.21,-.13,-.12,-.08,-.02,-.18,-.19
1916,-.11,-.14,-.28,-.30,-.34,-.49,-.36,-.27,-.36,-.32,-.45,-.81,-.35,-.30,-.15,-.30,-.38,-.38
1917,-.57,-.63,-.63,-.54,-.54,-.43,-.25,-.22,-.22,-.44,-.33,-.67,-.45,-.47,-.67,-.57,-.30,-.33
1918,-.47,-.33,-.24,-.43,-.42,-.36,-.31,-.31,-.17,-.06,-.11,-.29,-.29,-.32,-.49,-.37,-.33,-.11
1919,-.20,-.24,-.21,-.12,-.27,-.36,-.29,-.32,-.25,-.20,-.41,-.42,-.27,-.26,-.24,-.20,-.32,-.28
1920,-.24,-.26,-.12,-.24,-.26,-.35,-.30,-.26,-.22,-.26,-.26,-.46,-.27,-.27,-.30,-.21,-.31,-.25
1921,-.04,-.17,-.23,-.30,-.30,-.27,-.14,-.26,-.19,-.03,-.13,-.17,-.19,-.21,-.22,-.28,-.22,-.12
1922,-.33,-.44,-.15,-.23,-.33,-.31,-.27,-.32,-.36,-.33,-.15,-.19,-.28,-.28,-.31,-.24,-.30,-.28
1923,-.28,-.39,-.34,-.41,-.33,-.29,-.30,-.33,-.31,-.13,-.02,-.04,-.26,-.28,-.28,-.36,-.31,-.15
1924,-.23,-.24,-.08,-.31,-.18,-.26,-.29,-.36,-.32,-.35,-.21,-.43,-.27,-.24,-.17,-.19,-.30,-.29
1925,-.38,-.40,-.28,-.25,-.29,-.32,-.26,-.20,-.19,-.17,.05,.06,-.22,-.26,-.40,-.27,-.26,-.10
1926,.21,.03,.11,-.12,-.23,-.26,-.27,-.13,-.14,-.11,-.06,-.29,-.11,-.08,.10,-.08,-.22,-.10
1927,-.27,-.18,-.38,-.30,-.25,-.27,-.18,-.24,-.13,-.01,-.06,-.33,-.22,-.21,-.25,-.31,-.23,-.07
1928,-.02,-.09,-.25,-.27,-.30,-.38,-.19,-.22,-.21,-.19,-.08,-.16,-.20,-.21,-.14,-.27,-.27,-.16
1929,-.45,-.58,-.32,-.41,-.38,-.43,-.36,-.32,-.25,-.14,-.11,-.54,-.36,-.33,-.40,-.37,-.37,-.17
1930,-.29,-.26,-.11,-.25,-.24,-.22,-.21,-.15,-.15,-.12,.18,-.05,-.15,-.19,-.36,-.20,-.19,-.03
1931,-.10,-.21,-.10,-.23,-.19,-.08,-.04,-.04,-.07,.05,-.05,-.05,-.09,-.09,-.12,-.17,-.05,-.02
1932,.15,-.17,-.18,-.06,-.17,-.28,-.25,-.22,-.11,-.09,-.27,-.26,-.16,-.14,-.02,-.13,-.25,-.16
1933,-.23,-.29,-.30,-.24,-.29,-.34,-.21,-.24,-.29,-.25,-.31,-.45,-.29,-.27,-.26,-.28,-.26,-.28
1934,-.21,-.02,-.29,-.31,-.09,-.15,-.10,-.12,-.15,-.07,.03,-.02,-.13,-.16,-.23,-.23,-.13,-.06
1935,-.33,.14,-.14,-.37,-.29,-.27,-.22,-.22,-.22,-.06,-.26,-.17,-.20,-.19,-.07,-.27,-.24,-.18
1936,-.27,-.38,-.21,-.20,-.17,-.22,-.09,-.13,-.09,-.03,.02,-.01,-.15,-.16,-.28,-.19,-.15,-.03
1937,-.07,.03,-.21,-.16,-.05,-.05,-.04,.01,.09,.09,.08,-.07,-.03,-.02,-.02,-.14,-.03,.09
1938,.08,.03,.10,.06,-.09,-.17,-.09,-.06,.00,.15,.08,-.12,.00,.00,.02,.02,-.10,.08
1939,-.05,-.06,-.17,-.09,-.04,-.07,-.06,-.06,-.07,-.03,.07,.43,-.02,-.06,-.08,-.10,-.06,-.01
1940,.00,.08,.09,.17,.11,.11,.12,.07,.15,.11,.17,.32,.13,.14,.17,.13,.10,.14
1941,.18,.31,.10,.16,.17,.13,.22,.15,.02,.35,.23,.22,.19,.19,.27,.14,.16,.20
1942,.29,.02,.05,.09,.11,.05,.00,-.04,-.03,.01,.10,.13,.07,.07,.18,.08,.00,.03
1943,-.01,.17,-.04,.11,.07,-.05,.08,.01,.05,.23,.20,.24,.09,.08,.10,.05,.01,.16
1944,.36,.24,.26,.19,.18,.16,.18,.18,.28,.26,.11,.04,.20,.22,.28,.21,.17,.22
1945,.10,.00,.06,.19,.06,.00,.04,.26,.20,.18,.07,-.07,.09,.10,.05,.10,.10,.15
1946,.15,.03,.01,.05,-.07,-.21,-.12,-.20,-.08,-.08,-.05,-.31,-.07,-.05,.04,.00,-.18,-.07
1947,-.06,-.08,.06,.06,-.02,-.02,-.04,-.07,-.13,.07,.03,-.13,-.03,-.04,-.15,.04,-.04,-.01
1948,.06,-.15,-.24,-.12,-.01,-.05,-.11,-.12,-.14,-.05,-.12,-.24,-.11,-.10,-.07,-.12,-.09,-.11
1949,.07,-.14,-.02,-.11,-.10,-.27,-.13,-.13,-.15,-.06,-.10,-.18,-.11,-.12,-.10,-.08,-.18,-.10
1950,-.26,-.27,-.08,-.21,-.11,-.05,-.09,-.16,-.12,-.20,-.34,-.21,-.17,-.17,-.24,-.13,-.10,-.22
1951,-.34,-.42,-.20,-.14,.00,-.07,-.01,.06,.05,.08,-.01,.16,-.07,-.10,-.32,-.12,.00,.04
1952,.12,.11,-.08,.03,-.03,-.03,.05,.05,.07,.00,-.13,-.02,.01,.03,.13,-.02,.02,-.02
1953,.08,.15,.11,.19,.12,.12,.01,.05,.04,.08,-.03,.05,.08,.08,.07,.14,.06,.03
1954,-.24,-.10,-.14,-.14,-.20,-.18,-.19,-.17,-.10,-.02,.08,-.18,-.13,-.11,-.10,-.16,-.18,-.01
1955,.13,-.16,-.32,-.22,-.20,-.14,-.11,.02,-.11,-.05,-.25,-.28,-.14,-.13,-.07,-.25,-.08,-.14
1956,-.12,-.24,-.21,-.27,-.29,-.16,-.09,-.26,-.19,-.23,-.14,-.06,-.19,-.21,-.21,-.26,-.17,-.19
1957,-.09,-.03,-.05,.00,.09,.16,.02,.15,.09,.01,.08,.15,.05,.03,-.06,.01,.11,.06
1958,.39,.22,.08,.01,.06,-.08,.05,-.05,-.02,.04,.02,.01,.06,.07,.25,.05,-.03,.01
1959,.08,.07,.18,.16,.04,.03,.04,-.01,-.06,-.07,-.08,.00,.03,.03,.05,.13,.02,-.07
1960,.00,.14,-.34,-.15,-.08,-.04,-.04,.02,.07,.06,-.11,.19,-.02,-.04,.04,-.19,-.02,.00
1961,.07,.19,.09,.13,.12,.12,.01,.01,.09,.00,.04,-.16,.06,.09,.15,.12,.04,.04
1962,.06,.15,.10,.05,-.06,.03,.02,-.01,.00,.01,.06,-.02,.03,.02,.01,.03,.01,.02
1963,-.03,.18,-.14,-.07,-.06,.05,.06,.22,.18,.15,.15,-.03,.05,.06,.04,-.09,.11,.16
1964,-.09,-.10,-.21,-.32,-.25,-.04,-.04,-.22,-.29,-.32,-.21,-.30,-.20,-.18,-.07,-.26,-.10,-.27
1965,-.08,-.17,-.13,-.19,-.12,-.08,-.13,-.04,-.15,-.05,-.06,-.08,-.11,-.13,-.18,-.14,-.09,-.09
1966,-.19,-.04,.04,-.13,-.12,.01,.08,-.09,-.03,-.17,-.01,-.03,-.06,-.06,-.10,-.07,.00,-.07
1967,-.08,-.20,.05,-.05,.12,-.08,.02,.01,-.06,.09,-.05,-.05,-.02,-.02,-.10,.04,-.02,-.01
1968,-.25,-.14,.20,-.06,-.14,-.09,-.13,-.09,-.19,.09,-.05,-.15,-.08,-.07,-.15,.00,-.10,-.05
1969,-.11,-.18,.01,.17,.18,.03,-.04,.04,.09,.09,.12,.24,.05,.02,-.14,.12,.01,.10
1970,.08,.22,.06,.05,-.04,-.03,.01,-.10,.12,.03,.02,-.12,.03,.06,.18,.02,-.04,.05
1971,-.02,-.16,-.18,-.07,-.05,-.17,-.08,-.01,-.06,-.04,-.07,-.08,-.08,-.09,-.10,-.10,-.09,-.06
1972,-.22,-.18,.02,.00,-.03,.04,.01,.16,.02,.08,.02,.18,.01,-.01,-.16,.00,.07,.04
1973,.29,.32,.29,.27,.22,.18,.12,.05,.09,.10,.05,-.07,.16,.18,.26,.26,.12,.08
1974,-.10,-.27,-.06,-.12,-.04,-.05,-.03,.10,-.08,-.06,-.08,-.08,-.07,-.07,-.15,-.07,.01,-.07
1975,.10,.08,.12,.04,.16,-.01,-.01,-.17,-.03,-.11,-.17,-.17,-.01,-.01,.03,.11,-.06,-.10
1976,-.03,-.06,-.22,-.07,-.21,-.12,-.10,-.12,-.06,-.24,-.06,.11,-.10,-.12,-.09,-.16,-.11,-.12
1977,.18,.22,.24,.26,.33,.27,.20,.18,.02,.03,.16,.03,.18,.18,.17,.28,.22,.07
1978,.06,.10,.19,.17,.09,-.01,.04,-.14,.06,.03,.14,.08,.07,.06,.06,.15,-.04,.07
1979,.08,-.10,.19,.15,.03,.14,.03,.17,.25,.26,.28,.47,.16,.13,.02,.12,.11,.26
1980,.29,.39,.29,.30,.35,.20,.22,.18,.20,.13,.29,.21,.26,.28,.39,.31,.20,.21
1981,.52,.42,.48,.32,.24,.29,.32,.35,.15,.12,.23,.41,.32,.30,.39,.35,.32,.16
1982,.05,.15,.03,.15,.18,.05,.14,.03,.14,.13,.17,.42,.14,.14,.20,.12,.08,.15
1983,.53,.43,.41,.27,.33,.22,.18,.35,.37,.17,.30,.16,.31,.33,.46,.34,.25,.28
1984,.31,.14,.26,.05,.32,.02,.19,.19,.21,.13,.06,-.05,.15,.17,.20,.21,.13,.14
1985,.22,-.04,.17,.12,.14,.15,.04,.16,.13,.11,.05,.13,.12,.10,.04,.14,.12,.10
1986,.26,.37,.30,.22,.21,.11,.11,.15,.03,.15,.09,.13,.18,.18,.25,.24,.13,.09
1987,.31,.43,.18,.24,.25,.34,.40,.24,.35,.32,.29,.46,.32,.29,.29,.23,.33,.32
1988,.56,.44,.51,.42,.43,.39,.33,.39,.36,.37,.12,.28,.38,.40,.49,.46,.37,.28
1989,.12,.30,.36,.29,.17,.16,.34,.33,.35,.29,.19,.37,.27,.26,.23,.27,.28,.28
1990,.41,.43,.79,.56,.45,.37,.45,.34,.23,.44,.47,.40,.45,.44,.40,.60,.39,.38
1991,.42,.49,.35,.51,.34,.53,.47,.39,.44,.29,.29,.32,.40,.41,.44,.40,.46,.34
1992,.47,.40,.48,.27,.31,.25,.08,.08,-.01,.06,.02,.21,.22,.23,.40,.35,.14,.02
1993,.34,.37,.36,.27,.28,.23,.25,.11,.11,.23,.03,.18,.23,.23,.31,.31,.20,.13
1994,.26,.02,.29,.41,.28,.43,.30,.21,.31,.42,.44,.38,.31,.30,.15,.33,.32,.39
1995,.52,.79,.47,.47,.27,.43,.45,.45,.34,.47,.44,.25,.45,.46,.56,.40,.44,.42
1996,.24,.46,.33,.32,.28,.25,.36,.48,.24,.19,.39,.37,.33,.32,.32,.31,.37,.27
1997,.30,.41,.51,.34,.34,.54,.34,.42,.52,.61,.64,.59,.46,.44,.36,.40,.43,.59
1998,.58,.88,.63,.63,.68,.77,.66,.66,.42,.42,.43,.55,.61,.61,.68,.65,.69,.42
1999,.49,.64,.32,.31,.27,.36,.38,.32,.38,.34,.37,.41,.38,.39,.56,.30,.35,.37
2000,.25,.56,.55,.56,.36,.40,.39,.42,.38,.28,.30,.28,.39,.40,.41,.49,.40,.32
2001,.46,.44,.56,.51,.58,.52,.59,.50,.52,.51,.73,.56,.54,.51,.39,.55,.54,.58
2002,.77,.79,.88,.58,.64,.53,.61,.53,.62,.54,.59,.44,.63,.64,.71,.70,.56,.58
2003,.75,.58,.59,.55,.60,.47,.58,.65,.62,.73,.53,.75,.62,.59,.59,.58,.57,.63
2004,.58,.72,.63,.61,.37,.44,.26,.47,.50,.60,.73,.51,.54,.56,.68,.54,.39,.61
2005,.74,.60,.74,.68,.63,.64,.62,.61,.71,.74,.73,.68,.68,.66,.62,.68,.63,.73
2006,.56,.73,.63,.48,.49,.65,.54,.70,.64,.69,.73,.79,.64,.63,.65,.53,.63,.69
2007,1.02,.70,.73,.76,.69,.61,.61,.59,.59,.58,.59,.50,.66,.69,.84,.73,.60,.59
2008,.30,.38,.74,.54,.49,.49,.60,.47,.61,.66,.69,.54,.54,.54,.39,.59,.52,.65
2009,.65,.53,.54,.61,.65,.65,.74,.68,.72,.65,.81,.68,.66,.65,.57,.60,.69,.73
2010,.75,.84,.92,.84,.75,.67,.62,.67,.63,.70,.82,.45,.72,.74,.75,.84,.66,.72
2011,.51,.48,.65,.65,.53,.61,.70,.74,.56,.66,.58,.60,.61,.59,.48,.61,.68,.60
2012,.49,.49,.58,.72,.78,.64,.58,.63,.72,.79,.78,.53,.64,.65,.53,.70,.62,.76
2013,.70,.62,.67,.54,.61,.69,.60,.70,.77,.69,.84,.69,.68,.66,.62,.61,.66,.76
2014,.75,.55,.78,.79,.86,.67,.58,.82,.87,.80,.67,.79,.74,.74,.66,.81,.69,.78
2015,.85,.90,.95,.75,.80,.81,.73,.80,.85,1.09,1.05,1.15,.90,.86,.85,.84,.78,.99
2016,1.17,1.37,1.36,1.11,.95,.80,.85,1.01,.90,.88,.91,.86,1.01,1.04,1.23,1.14,.89,.90
2017,1.02,1.14,1.17,.94,.91,.72,.81,.86,.77,.90,.88,.94,.92,.91,1.01,1.01,.80,.85
2018,.81,.85,.89,.89,.83,.78,.82,.76,.80,1.02,.83,.92,.85,.85,.86,.87,.79,.88
2019,.93,.95,1.18,1.01,.85,.92,.94,.94,.92,1.01,1.00,1.10,.98,.97,.93,1.01,.93,.98
2020,1.17,1.25,1.18,1.14,1.02,.92,.90,.87,.99,.89,1.11,.81,1.02,1.04,1.17,1.11,.89,.99
2021,.81,.65,.89,.76,.80,***,***,***,***,***,***,***,***,***,.76,.82,***,***
File added
......@@ -10,5 +10,3 @@ __Verknüpfen der Klimadaten und Stationen___
Stationsliste iterieren und Wetterdaten herunterladen: [StationsID]_[Startdatum]_[Enddatum].txt
Mittelwert aller Stationen des Landes bilden
......@@ -23,7 +23,7 @@ def loadDWDGauges():
stationList['lon'] = stationList['lon'].str.strip()
stationList['lat'] = stationList['lat'].str.strip()
# rename countries to merge with world shape file
# rename countries to merge with geopandas world shape file
stationList.loc[stationList['country']=="Korea, Dem. People's Rep.", 'country'] = 'South Korea'
stationList.loc[stationList['country']=="Slovakia (Slovak. Rep.)", 'country'] = 'Slovakia'
stationList.loc[stationList['country']=="Slowenia", 'country'] = 'Slovenia'
......@@ -62,10 +62,10 @@ def loadDWDGauges():
dwdFTP.quit()
# filter climate files list by longest timeseries (multiple timeseries per station)
# filter climate files list by longest timeseries
# (because: there are multiple timeseries-files per station with same historical values)
longestSeries = pd.DataFrame()
for index, ftpFiles in fileList.groupby("id", axis=0):
#print(ftpFiles.iloc[-1])
longestSeries = longestSeries.append(ftpFiles.iloc[-1])
fileList.drop(fileList.index, inplace=True)
......@@ -77,11 +77,11 @@ def loadDWDGauges():
# with open("stationList.pickle","wb") as pf:
# pickle.dump(stationList, pf)
def fillMissingData(annualData):
months = ["Jan", "Feb", "Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]
for y in range(0,len(annualData)):
year = annualData.iloc[y]
# check month for nan values
for m in range(0,len(months)):
......@@ -132,7 +132,7 @@ def loadTemperatureFromDWDGauges():
global annualData
global worldTemperature
with open("stationList.pickle", "rb") as pickleFile:
with open("./pickle/stationList.pickle", "rb") as pickleFile:
stationList = pickle.load(pickleFile)
#stationList = pd.concat([stationList, pd.DataFrame(columns=list(range(1950,2020)))])
......@@ -145,26 +145,55 @@ def loadTemperatureFromDWDGauges():
for gid, gurl in zip(gaugeIds, gaugeURLs):
annualData = pd.read_csv(gurl, delimiter=";")
annualData = annualData.set_index("Jahr")
#annualData["mean"] = annualData.mean(axis=1)
annualData = fillMissingData(annualData)
# with open("annualData.pickle", "wb") as pickleFile:
# pickle.dump(annualData, pickleFile)
annualData["mean"] = annualData.mean(axis=1)
#annualData = fillMissingData(annualData)
for dataIndex, annualMean in annualData.iterrows():
try:
stationList.at[gid, dataIndex] = annualMean["mean"]
except:
continue
#for index, gaugeCountry in stationList.groupby("country", axis=0):
with open("stationList_temps.pickle", "wb") as pickleFile:
with open("./pickle/stationList_temps_missingData.pickle", "wb") as pickleFile:
pickle.dump(stationList, pickleFile)
#
def buildAverageTimeseries(fromYear, toYear, name):
global stationList
meanAverage = []
for stationID, station in stationList.iterrows():
temps = []
for i in range(fromYear,toYear):
if not np.isnan(station[i]):
temps.append(station[i])
if len(temps) > 5:
meanAverage.append(np.mean(temps))
else:
meanAverage.append(np.NaN)
stationList[name] = np.round(meanAverage,1)
def cleanAverageTimeseries():
# determine gauges that includes both timeseries. If not delete them.
global stationList
for stationID, station in stationList.iterrows():
if np.isnan(station['m1961T1990']) or np.isnan(station['m1991T2018']):
#station['m1961T1990'] = None
#station['m2010T2018'] = None
stationList.at[stationID, "m1961T1990"] = None
stationList.at[stationID, "m1991T2018"] = None
def buildStationListGDP():
global stationList
global stationGPD
with open("stationList_temps.pickle", "rb") as pickleFile:
with open("./pickle/stationList_temps_missingData.pickle", "rb") as pickleFile:
stationList = pickle.load(pickleFile)
del stationList["file"]
......@@ -175,33 +204,42 @@ def buildStationListGDP():
stationList["lat"] = stationList["lat"].astype(str).astype(float)
stationList["lon"] = stationList["lon"].astype(str).astype(float)
buildAverageTimeseries(1961,1990,"m1961T1990")
buildAverageTimeseries(1991,2018,"m1991T2018")
cleanAverageTimeseries()
stationGPD = gpd.GeoDataFrame(stationList, geometry=gpd.points_from_xy(stationList.lat, stationList.lon)).reset_index()
del stationGPD["lat"]
del stationGPD["lon"]
stationGPD.columns = stationGPD.columns.astype(str)
stationGPD = stationGPD.sort_index(axis=1, ascending=False)
stationGPD.to_file("stationList.shp", "ESRI Shapefile")
#stationGPD.to_file("stationList.shp", "ESRI Shapefile")
def buildAnnualCountryTemp():
global stationList
global countryTemp
global countryAnnualTemp
global countryMeanGPD
global world
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
countryMeanGPD = gpd.sjoin(world, stationGPD, how="inner", op='intersects')
print(countryMeanGPD.head())
countryMeanGPD = countryMeanGPD.groupby("name", axis=0).mean().reset_index()
countryMeanGPD["anomalie"] = countryMeanGPD["m1991T2018"] - countryMeanGPD["m1961T1990"]
del countryMeanGPD["pop_est"]
del countryMeanGPD["gdp_md_est"]
for i in range(1873,1950):
del countryMeanGPD[str(i)]
worldGauge = world.set_index("name").join(countryMeanGPD.set_index("name"))
#worldGauge = worldGauge.loc[(worldGauge.continent=="Europe")]
#worldGauge.columns = countryAnnualTemp.columns.map(str)
worldGauge.to_file("globalAnnualTemp_country.shp", "ESRI Shapefile")
worldGauge.to_file("./output/countryAnnualTemperature.shp", "ESRI Shapefile")
#countryAnnualTemp = stationList.groupby("country", axis=0).mean().reset_index()
#countryAnnualTemp.columns = countryAnnualTemp.columns.map(str)
......
ISO-8859-1
\ No newline at end of file
File deleted
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
File deleted
File deleted
File added
File moved
File moved
No preview for this file type
UTF-8
\ No newline at end of file
No preview for this file type
PROJCS["ETRS_1989_UTM_Zone_33N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
\ No newline at end of file
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment