Skip to content

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

@flicj191

Description

@flicj191

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions