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

Reproject aifs to a regular lat/lon grid #36

Open
sailgrib opened this issue Mar 1, 2024 · 3 comments
Open

Reproject aifs to a regular lat/lon grid #36

sailgrib opened this issue Mar 1, 2024 · 3 comments

Comments

@sailgrib
Copy link

sailgrib commented Mar 1, 2024

I am trying to reproject the reduced-gaussian aifs grib file to a regulat 0.25° lat/lon grid.
I have tried 3 approaches, one using nearest neighbor and 2 others that should be better but both failed.

The first one using nearest neighbor :
cdo remapnn,target_grid_world_025 input_file output_file
That works but is it really appropriate?

The second one with bilenear interpolation:
cdo remapbil,target_grid_world_025.txt input_file output_file
=> cdo remapbil: Bilinear weights from gaussian_reduced (542080) to lonlat (1440x721) grid
=> cdo remapbil (Abort): Can't do bilinear interpolation if the source grid is not a regular 2D grid!

The third one using first-order conservative remapping:
cdo remapycon,target_grid_world_025.txt input_file output_file
=> cdo remapcon (Abort): Source grid cell corner coordinates missing!

Any idea as to how I should correctly reproject the aifs to a regular lat/lon grid?

@igorROIK
Copy link

igorROIK commented Mar 2, 2024

I've tried several ways to plot ECMWF AIFS data in Python, but without success. Could you help me or provide a script using this data? Thanks.

@sailgrib
Copy link
Author

sailgrib commented Mar 4, 2024

Sorry, I cannot help with this. I have not tried to plot ECMWF AIFS. i am using the data as lat/lon grib files.

@sol1105
Copy link

sol1105 commented Aug 21, 2024

I had the same problem and found this issue. Meanwhile I have found the solution, so adding it here:

cdo -f nc4 remapbil,global_0.25 -setgridtype,regular in.grib out.nc

The explanation can be found here: https://code.mpimet.mpg.de/boards/1/topics/11546
In short: cdo only supports remapnn (nearest neighbour) and remapdis (inverse distance weighting) for unstructured grids, so the data must first be transformed to a regular grid. remapcon generally needs the grid cell boundaries / vertices defined to be able to calculate the area of the grid cells.

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

No branches or pull requests

3 participants