Bias-adjustment when the trend goes to zero #1585
Replies: 2 comments
-
I tested the following edits to the def get_correction(x: xr.DataArray, y: xr.DataArray, kind: str) -> xr.DataArray:
"""Return the additive or multiplicative correction/adjustment factors."""
with xr.set_options(keep_attrs=True):
if kind == ADDITIVE:
out = y - x
elif kind == MULTIPLICATIVE:
out = y / x
out = xr.where(out>9, 0.0, out)
else:
raise ValueError("kind must be + or *.")
if isinstance(out, xr.DataArray):
out.attrs["kind"] = kind
return out |
Beta Was this translation helpful? Give feedback.
-
Hi @trondactea ! We have not yet thought of this problem, but we need to. I need to work on bias-adjusting snow amounts in the next months, so clearly I'll have to manage the same kind of problems you are getting with sea ice. Thanks for the reference to ISIMIP, I didn't know they did that and this mixed method is quite interesting. I think it could be feasible to implement it, but I'm not sure on how QDM (for example) would behave... I still have to do my literature review on this problem.
Well, there's not precise explicit rule that I know, but I always think of bias-adjustment as a mysterious machine. Even if you understand the maths behind each machine, having two of them simply increases the mysteriousness index. And as always : garbage in, garbage out. |
Beta Was this translation helpful? Give feedback.
-
Setup Information
Context
I am testing the use of
xclim
for downscaling sea-ice for the future oceans under various CMIP6 models. I train my data on the GLORYS global reanalysis (1993-2019). I have a few issues I am hoping you would help me resolve.My historical time series of sea-ice for the Labrador Sea has periods where there is no sea-ice for a given month (all NaN). In addition, the future projections of sea-ice under climate scenario SSP585 tend to move towards zero on average over the year by 2050. Using the multiplicative QDM adjustment this means I get very small values divided by very small values sometimes which leads to very large and incorrect correction factors. I would assume this problem of having very small values in the future occurs for precipitation in some regions too and I wonder what the best approach to resolving this would be? Is there a way I can adjust my input data so that even if I have very small values and small changes, they don't cause extremely large values? Or is there a function that corrects anomalous large correction values? It would be great if you would be able to point to an example. (I have not found it in the
xclim
docs).I have previously used the ISIMIPI3BASD successfully to do the same downscaling. That library has in addition to the additive and multiplicative adjustment options also the mixed option which accounts for cases where you have values that tend to move towards zero (page 3059 in www.geosci-model-dev.net/12/3055/2019/, see image). Is this approach something you have considered to include in
xclim
or is there a way to combine functionality withinxclim
to achieve the same result? I realize that to achieve an implementation of the mixed approach it would require considerable rewriting of the functions, so perhaps there is an easier way?Finally, I see that in an example (PCA+EQM) you perform adjustment of data twice, first using PCA followed by EQM. Is there a rule to follow when it comes to adjusting and readjusting values?
Thanks for providing this great package!
Cheers,
Trond
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions