Project

General

Profile

cdo remapbil from polar_stereographic to lonlat grid, longitude shifted

Added by Ligang Chen about 2 years ago

I'm trying to regrid NSIDC sea ice concentration (variable "cdr_seaice_conc") with polar_stereographic grid to a 0.25x0.25 lonlat grid which is the NOAA/OISST grid, and it seems in the result the longitude is always shifted, see below, where the left figure is the original sea ice concentration data, and the right figure is the regrided result, and it seems that the greenland and Hudson Bay has been shifted. I tried different scenarios, which all had the same result. The command I used is like below, where only the variable "cdr_seaice_conc" is needed. What might be wrong? Thanks,

cdo remapbil,oigrid.txt -setgrid,nh_griddes.txt seaice_conc_daily_nh_19810101_n07_v04r00.nc 19810101_sic_nh.nc

original and regrided data

SIC_01.png (142 KB) SIC_01.png original and regrided data
seaice_conc_daily_nh_19810101_n07_v04r00.nc (251 KB) seaice_conc_daily_nh_19810101_n07_v04r00.nc Original Sea Ice Concentration data
nh_griddes.txt (661 Bytes) nh_griddes.txt grid description for original data
oigrid.txt (311 Bytes) oigrid.txt Target OISST lonlat grid description
oigrid_fromOfficialOISST.txt (311 Bytes) oigrid_fromOfficialOISST.txt Target OISST lonlat grid description 2

Replies (3)

RE: cdo remapbil from polar_stereographic to lonlat grid, longitude shifted - Added by Ligang Chen about 2 years ago

The original sea ice concentration data also have longitude and latitude information, how can we use them for regriding? Thanks,

G02202-cdr-ancillary-nh.nc (676 KB) G02202-cdr-ancillary-nh.nc Grid info with 2D lon/lat values.

RE: cdo remapbil from polar_stereographic to lonlat grid, longitude shifted - Added by Uwe Schulzweida about 2 years ago

CDO uses the PROJ libraray (https://proj.org/) for coordinate transformation. For this the projections parameters are assembled from the attributes. If the attributes contain wrong values or if necessary attributes are missing, errors will happen in the coordinate transformation. To avoid this it is better to specify the projections parameters directly in the proj_params attribute. The data file contains the attribute proj4text, this must be simply renamed. All other attributes can be removed from
the grid description file nh_griddes.txt:

gridtype  = projection
xsize     = 304
ysize     = 448
xname     = x
xunits    = "meters" 
yname     = y
yunits    = "meters" 
xfirst    = -3837500
xinc      = 25000
yfirst    = 5837500
yinc      = -25000
grid_mapping = crs
grid_mapping_name = polar_stereographic
proj_params = "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs" 
This way the interpolation result looks much better.
cdo remapbil,oigrid.txt -setgrid,nh_griddes.txt seaice_conc_daily_nh_19810101_n07_v04r00.nc 19810101_sic_nh.nc

    (1-3/3)