modelskill icon indicating copy to clipboard operation
modelskill copied to clipboard

Problem with bin size in spatial_skill

Open daniel-caichac-DHI opened this issue 2 years ago • 4 comments

Hi,

I think that there is some problem with bin selection in the spatial plots when the bins are not fully defined by the user as (min,max,delta). To exemplify this. I got track observations between Lat=[+31.4 , +65.62] deg image

then if I define my bin spacing as 0.25deg and make a spatial skill starting from +32deg to +66deg I get data as expected between 32 and 66deg image image

but if instead I just go with binsize=0.25 and let fmskill define the min and max Latitude I get image image ie, I see that my data now starts a roughly Latitude=+36deg even though the bin size is still 0.25deg. I am somehow losing 4deg of data (~400 km of satellite data). Not ideal. Most likely a bug.

cc: @Hendrik1987

daniel-caichac-DHI avatar Jan 10 '23 13:01 daniel-caichac-DHI

I can confirm this after discussion with @daniel-caichac-DHI . I do further remember that the 'auto binning' when the user provide binsize was a challenge when implementing the spatial skill in the first place. Then I looked mainly at a global data set and likely have not tested all special cases sufficiently. We need to review after else: https://github.com/DHI/fmskill/blob/e17d88db6bb473e48ddede4c6d7dbd267cce04f9/fmskill/comparison.py#L681 Quick fix is to not allow binsize argument.

Hendrik1987 avatar Jan 10 '23 15:01 Hendrik1987