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_correctionmodule. Only windspeed or GHI+DNI+DHI are corrected, depending on the technology. See therex.bias_correctionmodule 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_correcttable based on itsgidcolumn
- Returns:
bc_fun (function) – Function from
rex.bias_correctionto use.bc_fun_kwargs (dict) – Kwargs from
bc_dfto input tobc_fun. This may include extra kwargs that are not required bybc_funand should be cleaned before passing to the function.bool_bc (np.ndarray) – 1D Boolean array with length equal to the
gidsinput withTruewhere data has available bias correction inputs inbc_dfandFalsewhere not