6. Functions for validation#
6.1. Timeseries#
6.1.1. GRDC#
The top-level to evalute simulated timeseries with GRDC observations can be used via command line. See _usage_timeseries.
6.1.2. GSIM#
Todo
Would be very nice to have
6.1.3. EXCEL#
Todo
Documentation needs to be added still.
6.2. Polygons#
With pcrglobwb_utils it is possible to validate spatially-varying PCR-GLOBWB output against a range of datasets.
Per domain, area averages per timestep are computed and timeseries validated.
- class spatial_validation.validate_per_shape(shp_fo, shp_key, crs='epsg:4326', out_dir=None)[source]#
Initializing object for validating output for area(s) provided by shp-file. If the shp-file contains multiptle (polygon) geometries, validation is performed per individual geometry. Per geometry, r and RMSE are determined.
- Parameters
shp_fo (str) – Path to shp-file defining the area extent for validation.
shp_key (str) – Column name in shp-file to be used as unique identifier per entry in shp-file.
crs (str, optional) – Definition of projection system in which validation takes place. Defaults to ‘epsg:4326’.
out_dir (str, optional) – Path to output directory. In None, then no output is stored. Defaults to None.
Methods Summary
against_GLEAM(PCR_nc_fo, GLEAM_nc_fo[, ...])With this function, simulated land surface evaporation (or another evaporation output) from PCR-GLOBWB can be validated against evaporation data from GLEAM (or any other evaporation data in GLEAM).
against_GRACE(PCR_nc_fo, GRACE_nc_fo[, ...])With this function, simulated totalWaterStorage output from PCR-GLOBWB can be validated against GRACE-FO observations.
Methods Documentation
- against_GLEAM(PCR_nc_fo, GLEAM_nc_fo, PCR_var_name='total_evaporation', GLEAM_var_name='E', convFactor=1000)[source]#
With this function, simulated land surface evaporation (or another evaporation output) from PCR-GLOBWB can be validated against evaporation data from GLEAM (or any other evaporation data in GLEAM). Works with monthly totals and computes monthly area averages per time step from it.
- Parameters
PCR_nc_fo (str) – Path to netCDF-file containing evaporation output from PCR-GLOBWB.
GLEAM_nc_fo (str) – Path to netCDF-file containing GLEAM evaporation data.
PCR_var_name (str, optional) – netCDF variable name in PCR-GLOBWB output. Defaults to ‘land_surface_evaporation’.
GLEAM_var_name (str, optional) – netCDF variable name in GLEAM data. Defaults to ‘E’.
convFactor (int, optional) – conversion factor to convert PCR-GLOBWB units to GLEAM units. Defaults to 1000.
- Returns
containing data of shp-file appended with columns for R and RMSE per entry.
- Return type
geo-dataframe
- against_GRACE(PCR_nc_fo, GRACE_nc_fo, PCR_var_name='total_thickness_of_water_storage', GRACE_var_name='lwe_thickness', convFactor=100)[source]#
With this function, simulated totalWaterStorage output from PCR-GLOBWB can be validated against GRACE-FO observations. Yields timeseries of anomalies. Works with monthly averages and computes monthly area averages per time step from it.
- Parameters
PCR_nc_fo (str) – Path to netCDF-file containing totalWaterStorage output from PCR-GLOBWB.
GRACE_nc_fo (str) – Path to netCDF-file containing GRACE-FO data
PCR_var_name (str, optional) – netCDF variable name in PCR-GLOBWB output. Defaults to ‘total_thickness_of_water_storage’.
GRACE_var_name (str, optional) – netCDF variable name in GRACE-FO data. Defaults to ‘lwe_thickness’.
convFactor (int, optional) – conversion factor to convert PCR-GLOBWB units to GRACE-FO units. Defaults to 100.
- Returns
containing data of shp-file appended with columns for R and RMSE per entry.
- Return type
geo-dataframe