Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of z-coord in multimodel is dodgy #687

Closed
valeriupredoi opened this issue Jun 29, 2020 · 1 comment
Closed

Handling of z-coord in multimodel is dodgy #687

valeriupredoi opened this issue Jun 29, 2020 · 1 comment
Assignees
Labels
bug Something isn't working preprocessor Related to the preprocessor

Comments

@valeriupredoi
Copy link
Contributor

This block in func:_put_in_cube()

    # no plevs
    if len(template_cube.shape) == 3:
        cspec = [(times, 0), (lats, 1), (lons, 2)]
    # plevs
    elif len(template_cube.shape) == 4:
        plev = template_cube.coord('air_pressure')
        cspec = [(times, 0), (plev, 1), (lats, 2), (lons, 3)]
    elif len(template_cube.shape) == 1:
        cspec = [
            (times, 0),
        ]
    elif len(template_cube.shape) == 2:
        # If you're going to hardwire air_pressure into this,
        # might as well have depth here too.
        plev = template_cube.coord('depth')
        cspec = [
            (times, 0),
            (plev, 1),
        ]

is dodgy as a dodgy plumber.

@valeriupredoi
Copy link
Contributor Author

'tis mucho better now, after @Peter9192 refactored it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preprocessor Related to the preprocessor
Projects
None yet
Development

No branches or pull requests

2 participants