Henning Nolzen (6210c5cc) at 02 Feb 16:40
Merge branch 'update-visualisation-scripts' into 'master'
Henning Nolzen (12cd7981) at 02 Feb 16:36
Henning Nolzen (bddbf734) at 02 Feb 16:36
Merge branch 'update-visualisation-scripts' into 'master'
... and 11 more commits
Henning Nolzen (3e1070b5) at 02 Feb 16:35
Henning Nolzen (38da64ea) at 02 Feb 16:35
Merge branch 'update-odd-protocol' into 'master'
... and 10 more commits
Henning Nolzen (4b6113d0) at 02 Feb 16:28
Add CSV files of climate input data for reproducibility
Henning Nolzen (75b7e39c) at 02 Feb 16:22
Add CSV files of weather time series to enable reproduction
Thank you! Your suggestion works well!
Henning Nolzen (12cd7981) at 10 Nov 14:40
Fix broken curve fitting visualisation with np.arange()
I suspect the problem is that temperature is not a factor, i.e. not a categorical variable. Hence .unique()
will not reduce the duplicate values as they maybe just almost duplicate.
I think the think'o here is that for plotting the regression you do not really need to use the data points for the x axis, you just want to plot a curve and hence using something like
arange(x_clm_future.min(), x_clm_future.max())
should work just as well? (Fine tuned for proper spacing etc.)
When I plot this over the years, everything works fine. However, when I plot over the temperature, the curve fit is displayed strangely. I suspect this has to do with the unique()
function (see below) but I cannot narrow down the problem any further. Do you have any idea what my mistake could be, Adam @reichold ?
x_clm_future
Out[5]:
122 8.646881
123 9.139450
124 9.789102
125 9.005843
126 9.178969
1987 12.309988
1988 11.696322
1989 12.008490
1990 11.778064
1991 13.240555
Name: mean_annual, Length: 1170, dtype: float64
x_clm_future.unique()
Out[6]:
array([ 8.64688069, 9.1394503 , 9.78910205, ..., 12.00848963,
11.77806406, 13.24055541])
and for the y argument:
reg_function(start_value_clm_future)(x_clm_future.unique(), *popt_climate)
Out[7]:
array([1677.07363702, 1423.39782865, 1146.53232308, ..., 547.59774955,
591.26383768, 363.33252357])
x_clm_future
Out[2]:
122 2021
123 2022
124 2023
125 2024
126 2025
1987 2094
1988 2095
1989 2096
1990 2097
1991 2098
Name: year, Length: 1170, dtype: int64
x_clm_future.unique()
Out[3]:
array([2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031,
2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042,
2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053,
2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064,
2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075,
2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086,
2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097,
2098], dtype=int64)
and for the y argument:
reg_function(start_value_clm_future)(x_clm_future.unique(), *popt_climate),
Out[9]:
(array([1361.49316184, 1343.63853453, 1326.01805289, 1308.62864632,
1291.4672845 , 1274.53097686, 1257.81677203, 1241.32175736,
1225.04305838, 1208.97783833, 1193.12329765, 1177.47667349,
1162.03523922, 1146.79630399, 1131.75721222, 1116.91534317,
1102.26811045, 1087.81296161, 1073.54737765, 1059.46887263,
1045.57499318, 1031.86331813, 1018.33145804, 1004.97705483,
991.79778132, 978.79134085, 965.95546691, 953.28792268,
940.78650067, 928.44902237, 916.27333781, 904.25732523,
892.3988907 , 880.69596773, 869.14651694, 857.7485257 ,
846.50000776, 835.39900294, 824.44357675, 813.63182006,
802.9618488 , 792.43180359, 782.03984944, 771.78417542,
761.66299435, 751.6745425 , 741.81707925, 732.08888681,
722.48826993, 713.01355559, 703.66309269, 694.4352518 ,
685.32842486, 676.34102488, 667.47148571, 658.71826172,
650.07982754, 641.55467783, 633.14132696, 624.83830882,
616.64417649, 608.55750206, 600.5768763 , 592.70090851,
584.92822619, 577.25747486, 569.6873178 , 562.21643581,
554.84352701, 547.56730655, 540.38650649, 533.29987547,
526.30617856, 519.40419703, 512.5927281 , 505.87058482,
499.23659575, 492.68960484]),)
Henning Nolzen (93ff0871) at 08 Nov 17:30
Enable automatic curve fitting depending on whether the year or the...
Henning Nolzen (ad2873c7) at 08 Nov 16:29
Adjust size and color of data points and plot lines for a better ov...
... and 1 more commit
Henning Nolzen (dd69e7f9) at 08 Nov 15:27
Swap the order in which the DWD and projected climate data are plot...
Henning Nolzen (4e350248) at 08 Nov 13:11
Change colors for DWD and future climate projection data points for...
... and 1 more commit
Henning Nolzen (fd103f38) at 08 Nov 10:50
Make axis labels bold by default to be consistent with the other pl...
Henning Nolzen (4a6d9cef) at 08 Nov 10:33
Make axis labels bold by default to be consistent with the other pl...
Henning Nolzen (b83c00b9) at 08 Nov 10:19
Change default value to the observer and x axis type that is used m...
... and 1 more commit