rex.utilities.bc_parse_table.parse_bc_table
- parse_bc_table(bc_df, gids)[source]
Parse the bias correction table for required bc functions and kwargs
- Parameters:
bc_df (pd.DataFrame) – DataFrame with wind or solar resource bias correction table. This must have columns “gid” and “method”, where “gid” is the resource file indices, and “method” is a function name from the
rex.bias_correction
module. Only windspeed or GHI+DNI+DHI are corrected, depending on the technology. See therex.bias_correction
module for more details on available bias correction methods.gids (list | np.ndarray) – Array of integer gids (spatial indices) from the source h5 file. This is used to get the correct bias correction parameters from
bias_correct
table based on itsgid
column
- Returns:
bc_fun (function) – Function from
rex.bias_correction
to use.bc_fun_kwargs (dict) – Kwargs from
bc_df
to input tobc_fun
. This may include extra kwargs that are not required bybc_fun
and should be cleaned before passing to the function.bool_bc (np.ndarray) – 1D Boolean array with length equal to the
gids
input withTrue
where data has available bias correction inputs inbc_df
andFalse
where not