def single_location_comparison(model_filepath, lat, lon): """ Plots model outputs for given coordinates over time """ era5_ds = dd.collect_ERA5() cmip_ds = dd.collect_CMIP5() cordex_ds = dd.collect_CORDEX() cru_ds = dd.collect_CRU() #aphro_ds = dd.collect_APHRO() era5_ts = select_coords(era5_ds, lat, lon) cmip_ts = select_coords(cmip_ds, lat, lon) cordex_ts = select_coords(cordex_ds, lat, lon) cru_ts = select_coords(cru_ds, lat, lon) #aphro_ts = select_coords(aphro_ds, lat, lon) timeseries = [era5_ts, cmip_ts, cordex_ts, cru_ts] #, aphro_ts] xtr, y_gpr_t, y_std_t = model_prep([lat, lon], model_filepath) tims.benchmarking_plot(timeseries, xtr, y_gpr_t, y_std_t) dataset_stats(timeseries, xtr, y_gpr_t, y_std_t) corr.dataset_correlation(timeseries, y_gpr_t) pdf.benchmarking_plot(timeseries, y_gpr_t)
def basin_comparison(model_filepath, location): """ Plots model outputs for given coordinates over time """ era5_ds = dd.collect_ERA5() cmip_ds = dd.collect_CMIP5() cordex_ds = dd.collect_CORDEX() cru_ds = dd.collect_CRU() #aphro_ds = dd.collect_APHRO() era5_bs = select_basin(era5_ds, location) cmip_bs = select_basin(cmip_ds, location) cordex_bs = select_basin(cordex_ds, location) cru_bs = select_basin(cru_ds, location) #aphro_bs = select_basin(aphro_ds, location) basins = [era5_bs, cmip_bs, cordex_bs, cru_bs] #, aphro_ts] xtr, y_gpr_t, y_std_t = model_prep(location, model_filepath) tims.benchmarking_plot(basins, xtr, y_gpr_t, y_std_t) dataset_stats(basins, xtr, y_gpr_t, y_std_t) corr.dataset_correlation(basins, y_gpr_t) pdf.benchmarking_plot(basins, y_gpr_t)