Skip to content

🐛[BUG]: Incorrect shift parameter in torch.roll inside forward() #1399

@mhr123456789

Description

@mhr123456789

Version

1.3.0

On which installation method(s) does this occur?

No response

Describe the issue

Hi, I found a bug in the forward method.

In line 299, the code currently uses:

shifted_x = torch.roll(x, shifts=(-shift_lat, -shift_lat), dims=(1, 2))
It seems the second shift argument should be shift_lon instead of shift_lat:shifted_x = torch.roll(x, shifts=(-shift_lat, -shift_lon), dims=(1, 2))
This will cause issues when shift_lat != shift_lon (e.g. non-square windows).


### Minimum reproducible example

```shell

Relevant log output

Environment details

Metadata

Metadata

Assignees

No one assigned

    Labels

    ? - Needs TriageNeed team to review and classifybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions