Skip to content

Commit

Permalink
Merge pull request #209 from NREL/fix/QDM_lint
Browse files Browse the repository at this point in the history
Fixing minor issues left from PR #200
  • Loading branch information
castelao authored Apr 18, 2024
2 parents b74d837 + 3c35869 commit f36cc10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion sup3r/bias/bias_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ def local_qdm_bc(data: np.array,
base_dset: str,
feature_name: str,
bias_fp,
threshold=0.1,
relative=True,
no_trend=False):
"""Bias correction using QDM
Expand Down Expand Up @@ -482,7 +483,8 @@ def local_qdm_bc(data: np.array,
base, bias, bias_fut, cfg = get_spatial_bc_quantiles(lat_lon,
base_dset,
feature_name,
bias_fp)
bias_fp,
threshold)

if no_trend:
mf = None
Expand Down
15 changes: 8 additions & 7 deletions sup3r/preprocessing/data_handling/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,11 @@ def lin_bc(self, bc_files, threshold=0.1):
self.data[..., idf] += adder
completed.append(feature)


def qdm_bc(self, bc_files, reference_feature, relative=True, threshold=0.1):
def qdm_bc(self,
bc_files,
reference_feature,
relative=True,
threshold=0.1):
"""Bias Correction using Quantile Delta Mapping
Bias correct this DataHandler's data with Quantile Delta Mapping. The
Expand Down Expand Up @@ -1373,14 +1376,12 @@ def qdm_bc(self, bc_files, reference_feature, relative=True, threshold=0.1):
self.lat_lon,
reference_feature,
feature,
fp,
relative)
bias_fp=fp,
threshold=threshold,
relative=relative)
completed.append(feature)





# pylint: disable=W0223
class DataHandlerDC(DataHandler):
"""Data-centric data handler"""
Expand Down

0 comments on commit f36cc10

Please sign in to comment.