coecms / xmhw

Xarray version of Marine Heatwaves code by Eric Olivier
https://xmhw.readthedocs.io/en/latest/
Apache License 2.0
23 stars 10 forks source link

detect() does not seem to work when using coldSpells=True for threshold() #48

Closed hakaseh closed 2 years ago

hakaseh commented 2 years ago

Hi @paolap, I am trying out xmhw for both MHWs and marine cold spells. detect() works fine for marine heatwaves, that is, using the output of threshold() without setting coldSpells=True. When I set coldSpells=True for threshold() and use that output for detect(), it gives an output array without the events coordinate. Any idea?

paolap commented 2 years ago

Hi Hakase, thanks for letting me know.

A result without the events coordinate is not an error in itself, it might just mean that there's no cold spell detected. If you could send me the code you used, or at least this part it might help. Did you set the coldSpell=True in detect()?

Said so, I will try to add a test to make sure it is doing what is meant to. To be honest there's not much different in the code if coldSpell is True, but it is still possible I introduced some error.

hakaseh commented 2 years ago

Hi @paolap. I did not have coldSpells=True in detect() and that solved my previous issue! I don't know how I missed it. I had it for threshold() but not in detect(). Thanks for your help, closing the issue...