import pandas as pd import numpy as np import matplotlib.pyplot as plt import statsmodels.api as sm from datetime import datetime import pandas as pd import sys from core import FeedbackAnalysis as FA from importlib import reload reload(FA) df = FA.FeedbackAnalysis(uptake=('TRENDY', 'LPJ-GUESS_S1_nbp'), temp='CRUTEM', time='year', sink="Earth_Land", time_range=slice("2008", "2017")) df.data df.U len(df.uptake), len(df.temp), len(df.CO2) df.data df.model.summary() df.data df.model.params df.confidence_intervals('const', alpha) df.model.summary()
time_ranges.pop(-1) time_ranges.append((str(time_stop - 10), str(time_stop))) return time_ranges """ EXECUTION """ for input in tqdm(inputs): uptake, tempsink, time = input temp, sink = tempsink time_start, time_stop = timerange_inputs[uptake[0]][uptake[1]] time_start = int(time_start) time_stop = int(time_stop) time_ranges = build_time_ranges(time_start, time_stop) # [str(max(1959, time_start)), '2017'] for time_range in time_ranges: if time == "month": # Grab last month of previous year as end point. month_tr = str(int(time_range[1]) - 1) time_range = (f'{time_range[0]}-01', f'{month_tr}-12') slice_time_range = slice(*time_range) df = FA.FeedbackAnalysis(uptake=uptake, temp=temp, time=time, sink=sink, time_range=slice_time_range) df.feedback_output()