Project

General

Profile

Remapping grib file from reduced gaussian to regular latlon longitudes shifts

Added by Davide Ori 1 day ago

Good day,
I am trying to remap from a reduced gaussian O1280 grid to a regular latlon. Here is the original file

I first tried to simply do
cdo remapnn,global_0.07 lsm.grb lsm_ll.grb
The output of this command results shifted in longitude by 180 as visibile in figure

After many attempts, I found that if I first set the grid to regular and do the remap afterwards, the shift seems to go away, however a slight shift is still present that is most noticeable around the coastlines. Here is an example around Sicily

while in the original O1280 it looked like this

I think this problem might be related to this one https://code.mpimet.mpg.de/boards/1/topics/10988
so, something related to grib being unable to store projection parameters.
I think that because if I do a grib_to_netcdf before remapping and I apply the remap function to the .nc there is no shift.

Unfortunately, at the moment I need to work with grib files, netCDF is not an option.
Is there anyone that has an idea on how to solve this problem? Is there something basic about grib files that I am missing?


Replies (4)

RE: Remapping grib file from reduced gaussian to regular latlon longitudes shifts - Added by Davide Ori 1 day ago

I just noticed I forgot to mention the current sequence of commands I am using:
cdo setgrdtype,regular lsm.grb lsm_reg.grb
cdo remapnn,global_0.07 lsm_reg.grb lsm_ll.grb

RE: Remapping grib file from reduced gaussian to regular latlon longitudes shifts - Added by Ralf Mueller 1 day ago

hi Davide!
with respect to the slight shift: have u tried conservative or bilinear remapping or different target resolitions?

RE: Remapping grib file from reduced gaussian to regular latlon longitudes shifts - Added by Ralf Mueller 1 day ago

if you inputs are grid and the final output must be grib, couldn't u work with temporary netcdf files?

it would be awesome do understand the shift. maybe you can measure it

    (1-4/4)