You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError(f'{kind} not implemented! Use "+" or "*" instead.')
481
+
raiseNotImplementedError(
482
+
f"{kind} not available for delta_method. Use '+' or '*' instead."
483
+
)
485
484
486
485
# ? -----========= Q U A N T I L E - M A P P I N G =========------
487
486
@classmethod
@@ -503,7 +502,6 @@ def quantile_mapping(
503
502
simh (xarray.core.dataarray.DataArray): simulated historical Data
504
503
simp (xarray.core.dataarray.DataArray): future simulated Data
505
504
n_quantiles (int): number of quantiles to use
506
-
group (str): [optional] Group / Period (e.g.: 'time.month')
507
505
kind (str): '+' or '*', default: '+'
508
506
detrended (bool): [optional] detrend by shifting mean on long term basis
509
507
@@ -535,20 +533,7 @@ def quantile_mapping(
535
533
Alex J. Cannon and Stephen R. Sobie and Trevor Q. Murdock Bias Correction of GCM Precipitation by Quantile Mapping: How Well Do Methods Preserve Changes in Quantiles and Extremes?
536
534
https://doi.org/10.1175/JCLI-D-14-00754.1)
537
535
"""
538
-
# distribution-based adjustment on a grouped basis lead to high deviations
539
-
# in the monthly transitions, if group = "time.month". This is also when the group is
"""Method to adjust 1 dimensional climate data by empirical quantile mapping"""
631
-
raiseValueError(
632
-
"not implemented; please have a look at: https://svn.oss.deltares.nl/repos/openearthtools/trunk/python/applications/hydrotools/hydrotools/statistics/bias_correction.py "
618
+
raiseNotImplementedError(
619
+
"Not implemented; please have a look at: https://svn.oss.deltares.nl/repos/openearthtools/trunk/python/applications/hydrotools/hydrotools/statistics/bias_correction.py "
633
620
)
634
621
635
622
# ? -----========= Q U A N T I L E - D E L T A - M A P P I N G =========------
@@ -640,7 +627,6 @@ def quantile_delta_mapping(
640
627
simh: xr.core.dataarray.DataArray,
641
628
simp: xr.core.dataarray.DataArray,
642
629
n_quantiles: int,
643
-
# group: Union[str, None] = None,
644
630
kind: str="+",
645
631
**kwargs,
646
632
) ->xr.core.dataarray.DataArray:
@@ -652,7 +638,6 @@ def quantile_delta_mapping(
652
638
simh (xarray.core.dataarray.DataArray): simulated historical Data
653
639
simp (xarray.core.dataarray.DataArray): future simulated Data
654
640
n_quantiles (int): number of quantiles to use
655
-
group (str): [optional] Group / Period (e.g.: 'time.month')
656
641
kind (str): '+' or '*', default: '+'
657
642
global_min (float): this parameter can be set when kind == '*' to define a custom lower limit. Otherwise 0.0 is used.
658
643
@@ -688,20 +673,6 @@ def quantile_delta_mapping(
688
673
689
674
"""
690
675
691
-
# distribution-based adjustment on a grouped basis lead to high deviations
692
-
# in the monthly transitions, if group = "time.month". This is also when the group is
693
-
# day of year and so on.
694
-
# if group is not None:
695
-
# return cls.grouped_correction(
696
-
# method="quantile_delta_mapping",
697
-
# obs=obs,
698
-
# simh=simh,
699
-
# simp=simp,
700
-
# group=group,
701
-
# n_quantiles=n_quantiles,
702
-
# kind=kind,
703
-
# **kwargs,
704
-
# )
705
676
ifkindincls.ADDITIVE:
706
677
res=simp.copy(deep=True)
707
678
obs, simh, simp= (
@@ -747,7 +718,9 @@ def quantile_delta_mapping(
747
718
748
719
res.values=QDM1*delta# Eq. 2.4
749
720
returnres
750
-
raiseValueError(f"Unknown kind {kind}!")
721
+
raiseNotImplementedError(
722
+
f"{kind} not available for quantile_delta_mapping. Use '+' or '*' instead."
0 commit comments