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

Review lat/lon iterator for rotated reduced Gaussian grids #63

Open
sandorkertesz opened this issue May 24, 2024 · 0 comments
Open

Review lat/lon iterator for rotated reduced Gaussian grids #63

sandorkertesz opened this issue May 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sandorkertesz
Copy link

What happened?

Getting the lat/lons for a reduced_rotated_gg grid has been fixed in ecCodes 2.35.0. See ECC-1781 on https://confluence.ecmwf.int/display/ECC/ecCodes+version+2.35.0+released

This means that the code providing a workaround in GribField.grid_points() and GribField.grid_points_raw() should be reviewed.

Let's use the following example, retrieved from MARS with:

class=od,
stream=oper,
expver=1,
type=an,
date=20220101,
time=0,
area=28/0/-14/40,
grid=N320,
levtype=sfc,
param=167,
rotation=-22/-40,
target='rotated_N320.grib'

With ecCodes 2.35.0 I get the correct lat/lons:

grib_get_data rotated_N320.grib | more
Latitude Longitude Value
   84.037  140.000 2.4506007385e+02
   84.031  137.345 2.4494288635e+02
   84.011  134.702 2.4485694885e+02
   83.977  132.083 2.4484132385e+02
   83.931  129.500 2.4473585510e+02

but the key iteratorDisableUnrotate is still not available. So grid_points incorrectly calls unrotate:

def grid_points(self):
        import numpy as np

        if self.rotated and not self.rotated_iterator:
            warnings.warn(f"ecCodes does not support rotated iterator for {self.grid_type}")
            return self.grid_points_unrotated()

What are the steps to reproduce the bug?

See above

Version

latest

Platform (OS and architecture)

all

Relevant log output

No response

Accompanying data

No response

Organisation

ECMWF

@sandorkertesz sandorkertesz added the bug Something isn't working label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant