# GeoSTATS Data-fusion tools to post-process AQ modelling results ## Code structure The code is developed in R. It is structured in multiple scripts that are invoked from the main script “UK_+_LOOCV.R”, and a configuration file, “config_file.yml”, where several parameters of the simulation and the directories of the necessary input files are specified. The structure of the “UK_+_LOOCV.R” script is as follows: The parameters specified in the configuration file “config_file.yml” are read. The observation data at the measurement stations are read ("load_obs_cat.R") and those located within the specified domain are filtered ("set_stations.R") The availability of data at each of the measurement stations is calculated The raw data simulated by the regional air quality model CALIOPE are read ("load_caliope.R") The model values ​​are interpolated at the locations of the measurement stations (Ordinary Kriging) ("OK_interpolate_model_to_AQMS_v2.R") The GBM methodology is executed, if specified in the config_file, to fill in the time series of the measurement stations ("gbm_fill_obs_gaps.R") The Universal Kriging methodology is executed to correct the bias of the raw model data ("loop_uk_cat_v2.R") The efficiency of the system is checked with the LOOCV methodology ("loop_uk_cat_v2.R") The correction results are saved in netcdf format ("daily_rds_to_daily_nc.R") ## Authors This code was first developed in the BSC-Earth Sciences group, Air Quality Services team by Jan Mateu and Meriem Hajji and has been updated and mantained by Cristina Carnerero and Ada Barrantes.