JOSS publication figures creator#

This script will create the figures that are used in the JOSS publication of the Metob-toolkit.

[1]:
#!pip install MetObs-toolkit
%config InlineBackend.print_figure_kwargs = {'bbox_inches':None} #else the legend is cutoff in ipython inline plots
[2]:
import logging
import math
import os
import sys
import time
from pathlib import Path

import metobs_toolkit
print(f'Metobs_toolkit version: v{metobs_toolkit.__version__}')

import matplotlib.pyplot as plt
import pandas as pd

Metobs_toolkit version: v0.4.1a

Creation of the Dataset#

[3]:
datadf = pd.read_csv(metobs_toolkit.demo_datafile, sep=';')
metadf = pd.read_csv(metobs_toolkit.demo_metadatafile, sep=',')

# Subset to regio ghent
ghent_stations = [ 'vlinder24', 'vlinder25', 'vlinder05', 'vlinder27',
                  'vlinder02', 'vlinder01', 'vlinder28']


datadf = datadf[datadf['Vlinder'].isin(ghent_stations)]
metadf = metadf[metadf['Vlinder'].isin(ghent_stations)]

# subset period
datadf['dummy_dt'] = datadf['Datum'] + datadf['Tijd (UTC)']
datadf['dummy_dt'] = pd.to_datetime(datadf['dummy_dt'], format='%Y-%m-%d%H:%M:%S')

#Subset to period
from datetime import datetime
startdt = datetime(2022, 9, 1)
enddt = datetime(2022, 9, 10)
datadf = datadf[(datadf['dummy_dt'] >= startdt) & (datadf['dummy_dt'] <= enddt)]
datadf = datadf.drop(columns=['dummy_dt'])

# Inducing outliers as demo
datadf = datadf.drop(index=datadf.iloc[180:200, :].index.tolist())

# save in paper folder
folder = os.path.abspath('')
datadf.to_csv(os.path.join(folder, 'datafile.csv'))
metadf.to_csv(os.path.join(folder, 'metadatafile.csv'))

#Importing raw data
dataset = metobs_toolkit.Dataset()

dataset.import_data_from_file(input_data_file=os.path.join(folder, 'datafile.csv'),
                        input_metadata_file=os.path.join(folder, 'metadatafile.csv'),
                        template_file=metobs_toolkit.demo_template)
Unnamed: 0 is present in the datafile, but not found in the template! This column will be ignored.
Luchtdruk is present in the datafile, but not found in the template! This column will be ignored.
Neerslagintensiteit is present in the datafile, but not found in the template! This column will be ignored.
Neerslagsom is present in the datafile, but not found in the template! This column will be ignored.
Rukwind is present in the datafile, but not found in the template! This column will be ignored.
Luchtdruk_Zeeniveau is present in the datafile, but not found in the template! This column will be ignored.
Globe Temperatuur is present in the datafile, but not found in the template! This column will be ignored.
The following columns are present in the data file, but not in the template! They are skipped!
 ['Neerslagsom', 'Unnamed: 0', 'Rukwind', 'Neerslagintensiteit', 'Globe Temperatuur', 'Luchtdruk', 'Luchtdruk_Zeeniveau']
The following columns are found in the metadata, but not in the template and are therefore ignored:
['benaming', 'Unnamed: 0', 'stad', 'sponsor', 'Network']

Timeseries for each station#

[4]:
#1. Coarsen resolution and apply quality control with non-defaults as demonstration
dataset.resample(target_freq='20min')

ax1 = dataset.make_plot(colorby='station', title='Temperature for all stations')

#translate axes
ax1.set_ylabel('T2m in °C')
plt.show()
The present gaps are removed, new gaps are constructed for wind_direction data of station vlinder01..
The present gaps are removed, new gaps are constructed for temp data of station vlinder01..
The present gaps are removed, new gaps are constructed for wind_speed data of station vlinder01..
The present gaps are removed, new gaps are constructed for humidity data of station vlinder01..
../_images/paper_paper_figures_6_2.png

Timeseries with quality control labels#

[ ]:

#1. gross value check target = 'temp' dataset.gross_value_check( target_obstype=target, lower_threshold=10.7, upper_threshold=26.3) #2. persistence check dataset.persistence_check( target_obstype=target, timewindow='60min', min_records_per_window=3) #3. repetitions check dataset.repetitions_check( target_obstype=target, max_N_repetitions=5 ) #4. repetitions check dataset.step_check( target_obstype=target, max_increase_per_second = 5.0 / 3600.0, #depends on standard unit! max_decrease_per_second = -10.0 / 3600.0) #depends on standard unit! #5. window variation check dataset.window_variation_check( target_obstype=target, timewindow='60min', min_records_per_window=3, max_increase_per_second=8.0 / 3600.0, #depends on standard unit! max_decrease_per_second = -10.0 / 3600.0, #depends on standard unit! ) #6. buddy check dataset.buddy_check( target_obstype=target, #main check settings spatial_buddy_radius=15000, #15km defenition of buddy radius spatial_z_threshold=2.0, #outlier threshold #requirements min_sample_size=5, max_alt_diff=None, # Maximum elevation difference between stations N_iter=3, #Number of iterations instantaneous_tolerance='4min', #Max timestamp tolerance for 'at the same time' lapserate=None, #Specify the variation with altitude, if None no correction is applied min_std=1.0, # Minimum standart deviation ) # Create the plot ax2 = dataset.make_plot(colorby='label') #translate axes ax2.set_title('Temperature for all stations') ax2.set_ylabel('T2m in °C') plt.show()
/home/thoverga/anaconda3/envs/metobs_dev/lib/python3.12/site-packages/numpy/_core/fromnumeric.py:57: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
  return bound(*args, **kwds)
/home/thoverga/anaconda3/envs/metobs_dev/lib/python3.12/site-packages/numpy/_core/fromnumeric.py:57: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
  return bound(*args, **kwds)
/home/thoverga/anaconda3/envs/metobs_dev/lib/python3.12/site-packages/numpy/_core/fromnumeric.py:57: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.
  return bound(*args, **kwds)
../_images/paper_paper_figures_8_2.png

Fill gaps and plot timeseries of Vlinder28#

[6]:
# 1. Convert the outliers to gaps
dataset.convert_outliers_to_gaps()

# 2. Extract ERA5 temperature timeseries at the location of the stations
era5_manager = metobs_toolkit.default_GEE_datasets['ERA5-land']
#Extract the timeseries
era5_temp = dataset.get_gee_timeseries_data(
            geedynamicdatasetmanager=era5_manager, #The datasetmanager to use
            target_obstypes=['temp'], #the observationtypes to extract, must be knonw modelobstypes
            get_all_bands=False, #If true, all bands are extracted (but not stored in the stations if the band is unknwown)
            force_direct_transfer=True,
            )

WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder01.!
WARNING:<metobs_toolkit>:Flushing current gaps for wind_direction data of station vlinder01.
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder01.!
WARNING:<metobs_toolkit>:Flushing current gaps for temp data of station vlinder01.
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder01.!
WARNING:<metobs_toolkit>:Flushing current gaps for wind_speed data of station vlinder01.
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder01.!
WARNING:<metobs_toolkit>:Flushing current gaps for humidity data of station vlinder01.
WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder02.!
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder02.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder02.!
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder02.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder05.!
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder05.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder05.!
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder05.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder24.!
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder24.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder24.!
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder24.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder25.!
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder25.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder25.!
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder25.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder27.!
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder27.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder27.!
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder27.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_direction data of station vlinder28.!
WARNING:<metobs_toolkit>:Outliers are flushed for temp data of station vlinder28.!
WARNING:<metobs_toolkit>:Outliers are flushed for wind_speed data of station vlinder28.!
WARNING:<metobs_toolkit>:Outliers are flushed for humidity data of station vlinder28.!
[7]:
# 3. Fill the gaps (For shorter gaps we use interpolation, and for longer gaps we use debiased ERA5 temperature).

dataset.interpolate_gaps(target_obstype='temp',
                         method='time',
                         max_consec_fill=18, #equivalent of 6h at 20min resolution
                         overwrite_fill=False,
)

# 4. Fill the gaps with ERA5 data
dataset.fill_gaps_with_debiased_modeldata(target_obstype='temp',
                                          leading_period_duration='24h',
                                          min_leading_records_total=3,
                                          trailing_period_duration='24h',
                                          min_trailing_records_total=3,
                                          overwrite_fill=False) #Do not overwrite the interpolated small gaps

# 4. Make plot (of single station for clearity)
ax3 = dataset.get_station('vlinder28').make_plot(colorby='label')

#translate axes
ax3.set_title('Temperature for vlinder28')
ax3.set_ylabel('T2m in °C')

plt.show()
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a4dbe60> because the gap is too large (42 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a51e540> because the gap is too large (73 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b48440> because the gap is too large (24 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a4d2a80> because the gap is too large (40 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b4a210> because the gap is too large (73 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b4b170> because the gap is too large (24 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b587a0> because the gap is too large (29 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b5a630> because the gap is too large (44 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b60c80> because the gap is too large (96 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b62f60> because the gap is too large (30 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b78aa0> because the gap is too large (27 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b78e90> because the gap is too large (195 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a589eb0> because the gap is too large (28 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b7b6b0> because the gap is too large (73 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b882f0> because the gap is too large (26 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a4cec30> because the gap is too large (29 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b8b890> because the gap is too large (73 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b9c7d0> because the gap is too large (24 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a4a4620> because the gap is too large (46 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79b9f0b0> because the gap is too large (73 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79ba47d0> because the gap is too large (24 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c5a38a750> because the gap is too large (33 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79ba6810> because the gap is too large (92 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:Cannot interpolate <metobs_toolkit.gap.Gap object at 0x7f8c79ba6a80> because the gap is too large (25 records) to be filled with interpolation (and max_consec_fill=18). Increase the max_consec_fill or use another gapfill method.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a6e5220> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b12870> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b137d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b12ed0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4ba4b0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a3c8740> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a73f080> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a73dee0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a51f1d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a51e480> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a51d5e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a57bfe0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d3cb0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4ce7b0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4cfb30> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 08:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b48b30> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b48f50> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d2390> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a47f110> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a578170> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a55ed50> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a6e58e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b48b60> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b495e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b49a00> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b49e20> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b4a600> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b4a9f0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b4adb0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 08:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b4b590> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a59a0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a57b5f0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a58aff0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a513650> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a510ce0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a511cd0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d1e80> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b4bbc0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b4bfb0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b583e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
Start of modeltimeseries is not compatible with the start of the gap (minus the leading period size): 2022-09-01 00:00:00+00:00 <= (2022-09-01 20:00:00+00:00 - 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b58b90> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b58f50> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b592e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b596d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b59ac0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b59e50> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5a240> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5aa20> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5ae10> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5b200> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5b590> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5b980> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b5bd40> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b60170> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b60500> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b608f0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b61070> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b61460> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b61850> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b61be0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b61fd0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b62390> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b62780> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b62b70> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b63350> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b63740> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b63b00> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b63ef0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b782f0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b786e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 23:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a512480> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a511040> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a40b0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a5be0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a5c40> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a4a10> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b79310> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b79730> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b79af0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b79f10> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7a2d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7a690> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7aab0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7aed0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7b290> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7bad0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7bec0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 08:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b88710> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b88ad0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b88ec0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d8b90> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a5280> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a3c8b30> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4cfc20> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b7a900> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a512e40> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b89490> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b89850> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b89c40> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8a060> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8a480> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8a8a0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8acc0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8b0e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8b4d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b8bc50> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9c050> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9c410> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 08:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9cb90> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9cf80> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a7410> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a76e0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d9730> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d9d30> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d82f0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d87d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9d550> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9d970> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9dd60> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9e120> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9e510> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9e8d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9ecf0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9f470> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9f890> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79b9fc50> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba4050> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba4410> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 08:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba4b90> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4d31a0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a3cabd0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a74a1b0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a74aea0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a55e270> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4a70b0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba5010> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba53d0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba57f0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba5b80> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba5fa0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba6390> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c5a4db140> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba6c30> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba7020> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:Incompatible modeldata for debias_model_gapfill:
End of modeltimeseries is not compatible with the end of the gap (plus the trailing period size): 2022-09-10 00:00:00+00:00 >= (2022-09-09 08:40:00+00:00 + 1 days 00:00:00) == False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba76b0> cannot be filled because it already contains filled values, and overwrite fill is False.
WARNING:<metobs_toolkit>:<metobs_toolkit.gap.Gap object at 0x7f8c79ba7a70> cannot be filled because it already contains filled values, and overwrite fill is False.
../_images/paper_paper_figures_11_2.png

Diurnal Analysis#

[8]:

# Get Meta data dataset.get_landcover_fractions(buffers=[50, 150, 500], aggregate=True) # Create analysis from the dataset ana = metobs_toolkit.Analysis(dataset) # Make diurnal cycle analysis with plot ax4 = ana.plot_diurnal_cycle(colorby='name', trgobstype='temp', title='Hourly average temperature diurnal cycle', legend=True, ) fig = plt.gcf() fig.set_dpi(200) fig.tight_layout() plt.show()
../_images/paper_paper_figures_13_1.png

Interactive spatial#

[9]:

geemanager_to_plot = metobs_toolkit.default_GEE_datasets['worldcover'] dataset.make_gee_plot(geedatasetmanager=geemanager_to_plot)
[9]: