parse_bc_table(bc_df, gids)[source]

Parse the bias correction table for required bc functions and kwargs

  • 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 the rex.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 its gid column


  • bc_fun (function) – Function from rex.bias_correction to use.

  • bc_fun_kwargs (dict) – Kwargs from bc_df to input to bc_fun. This may include extra kwargs that are not required by bc_fun and should be cleaned before passing to the function.

  • bool_bc (np.ndarray) – 1D Boolean array with length equal to the gids input with True where data has available bias correction inputs in bc_df and False where not