GithubHelp home page GithubHelp logo

Comments (3)

valeriupredoi avatar valeriupredoi commented on July 24, 2024

@ledm _get_overlap() is your enemy here:

    all_times = []
    for cube in cubes:
        span = _datetime_to_int_days(cube)
        start, stop = span[0], span[-1]
        all_times.append([start, stop])
    bounds = [range(b[0], b[-1] + 1) for b in all_times]
    time_pts = reduce(np.intersect1d, bounds)
    if len(time_pts) > 1:

if the cube has a single time point then start = stop = single_cube_time_point and if single_cube_time_point is different from cube to cube by more than 1 then bounds will have no overlapping interval. You have two options: either make the cubes' single time points the same or introduce a condition in this function alike if start == stop: time_pts = range(start - 1, stop + 1), return time_pts - the second option will work fine but may introduce significant errors if the time points of the cubes are far apart in time eg you compute a multimodel between say, two models that one has its time point in 1971 and the second has its time point in 2019 which works functionally but has no statistical meaning

from esmvalcore.

valeriupredoi avatar valeriupredoi commented on July 24, 2024

so a minimal temporal check has to be done, but that one is up to you ie how far part in time you can still compute the multimodel stats

from esmvalcore.

ledm avatar ledm commented on July 24, 2024

I found a bug related to this today. The multi_model fails when the template_cube has no latitude or longitude component. The solution is to move the lines:

        lats = template_cube.coord('latitude')
        lons = template_cube.coord('longitude')

inside the shape statements:

    if len(template_cube.shape) == 3:
        lats = template_cube.coord('latitude')
        lons = template_cube.coord('longitude')
        ...

The problem with this whole part of multimodel is that it relies on an arbitrary set of coordinates - it should be generalised.

For instance, this line

plev = template_cube.coord('depth')
)
has depth hardwired into it! Not useful for atmospheric people!.

from esmvalcore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.