Metobs without observational data#
For some applications you do not have observational data (yet), but you still want to use the Metobs toolkit functionality on the metadata (the locations of the stations). In the toolkit, this is implemented as “metadata-only” Datasets.
These Datasets do not hold observational data, and thus no outliers and gaps, but only metadata. The process for creating a “metadata-only” Datasets is similar to creating a regular Dataset.
[1]:
import metobs_toolkit
[2]:
%%script true
# start by making a template, and answer "N" when asked if you have an observational data file
metobs_toolkit.build_template_prompt()
As an example, we use the demo metadata file and use it to create a “metadata-only” Dataset by applying the Dataset.import_only_metadata_from_file() method.
[3]:
# Initiate an empty dataset
dataset = metobs_toolkit.Dataset()
# Update the paths to the metadata and template file
#Load the data
dataset.import_data_from_file(
template_file=metobs_toolkit.demo_template, #The template file
input_data_file=None, #Do not provide an observational data file
input_metadata_file=metobs_toolkit.demo_metadatafile, #The metadata file
)
dataset.get_info()
The following columns are found in the metadata, but not in the template and are therefore ignored:
['Network', 'benaming', 'sponsor', 'stad']
================================================================================
General info of Dataset
================================================================================
--- Observational info ---
-Dataset instance without observation records.
--- Metadata info ---
-28 number of stations
-The following metadata is present: ['lat', 'lon', 'school', 'geometry']
--- Modeldata info ---
-Dataset instance without modeldata.
We have a dataset without observational data (no SensorData in the Stations). We can not apply methods related to observational data, but methods related to metadata can be applied similar as if there where observations.
In practice this can be used to extract timeseries (i.g. ERA5) or static data (i.g. LCZ, altitude, landcover fractions) from GEE. See the GEE Example Notebook for a full demonstration.