@@ -99,11 +99,14 @@ def get_spatial_bc_quantiles(lat_lon: np.array,
99
99
logger .error (msg )
100
100
raise RuntimeError (msg )
101
101
102
- msg = (f'Either { dset_base } or { dset_bias } or { dset_bias_fut } not found in { bias_fp } .' )
102
+ msg = (f'Either { dset_base } or { dset_bias } or { dset_bias_fut } '
103
+ 'not found in {bias_fp}.' )
103
104
dsets = [dset .lower () for dset in res .dsets ]
104
- check = dset_base .lower () in dsets \
105
- and dset_bias .lower () in dsets \
106
- and dset_bias_fut .lower () in dsets
105
+ check = (
106
+ dset_base .lower () in dsets
107
+ and dset_bias .lower () in dsets
108
+ and dset_bias_fut .lower () in dsets
109
+ )
107
110
assert check , msg
108
111
dset_base = res .dsets [dsets .index (dset_base .lower ())]
109
112
dset_bias = res .dsets [dsets .index (dset_bias .lower ())]
@@ -113,7 +116,11 @@ def get_spatial_bc_quantiles(lat_lon: np.array,
113
116
bias = res [dset_bias , slice_y , slice_x ]
114
117
bias_fut = res [dset_bias_fut , slice_y , slice_x ]
115
118
116
- cfg = {k :v for k ,v in res .h5 .attrs .items () if k in ("dist" , "sampling" , "log_base" )}
119
+ cfg = {
120
+ k : v
121
+ for k , v in res .h5 .attrs .items ()
122
+ if k in ("dist" , "sampling" , "log_base" )
123
+ }
117
124
118
125
return base , bias , bias_fut , cfg
119
126
@@ -401,7 +408,8 @@ def local_qdm_bc(data: np.array,
401
408
Notes
402
409
-----
403
410
Be careful selecting `bias_fp`. Usually, the input `data` used here would
404
- be related to the dataset used to estimate "bias_fut_{feature_name}_params".
411
+ be related to the dataset used to estimate
412
+ "bias_fut_{feature_name}_params".
405
413
406
414
Keeping arguments consistent with `local_linear_bc()`, thus a 3D data
407
415
(spatial, spatial, temporal), and lat_lon (n_lats, n_lons, [lat, lon]).
0 commit comments