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

fix_coords is not fixing the bounds of the longitude coordinate #3910

Open
flicj191 opened this issue Feb 11, 2025 · 0 comments · May be fixed by #3911
Open

fix_coords is not fixing the bounds of the longitude coordinate #3910

flicj191 opened this issue Feb 11, 2025 · 0 comments · May be fixed by #3911
Assignees

Comments

@flicj191
Copy link
Contributor

flicj191 commented Feb 11, 2025

Describe the bug
When using the cmoriser data utilities fix_bounds is not fixing the bounds of the longitude coordinate.

fix_bounds(cube, cube_coord)

        # fix longitude
        if cube_coord.var_name == 'lon':
            logger.info("Fixing longitude...")
            if cube_coord.ndim == 1:
                cube = cube.intersection(longitude=(0.0, 360.0))
            if overwrite_lon_bounds or not cube_coord.has_bounds():
                fix_bounds(cube, cube_coord)  ## cube.coord('longitude')

        # fix latitude
        if cube_coord.var_name == 'lat':
            logger.info("Fixing latitude...")
            if overwrite_lat_bounds or not cube.coord('latitude').has_bounds():
                fix_bounds(cube, cube.coord('latitude'))

I will submit a PR

@flicj191 flicj191 self-assigned this Feb 11, 2025
@flicj191 flicj191 changed the title fix_bounds is not fixing the bounds of the longitude coordinate fix_coords is not fixing the bounds of the longitude coordinate Feb 11, 2025
@flicj191 flicj191 linked a pull request Feb 12, 2025 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant