unexpected behavior with a rotated grid file and remapcon
Added by Stefan Hagemann 4 months ago
Hi
I discovered an unexpected behavior with a rotated grid file of Cosmo-CLM 6.
Example files are located on Levante in /scratch/g/g260122/tmp/pub
I wanted to apply remapcon to interpolated from the rotated to a regular regional grid:
cdo remapcon,grid_euro5min.txt test.nc out.nc
failed with
cdo remapcon (Abort): Source grid cell corner coordinates missing!
If I set the grid with
cdo setgrid,grid_cclm_ha.txt test.nc tsetgrid.nc
it works perfectly with
cdo remapcon,grid_euro5min.txt tsetgrid.nc out.nc
Both files (test.nc and tsetgrid.nc) contain the rotated longitudes/latitudes rlon/rlat and the same grid definition as in grid_cclm_ha.txt
However, the original file also includes the actual real longitudes/latitudes lon/lat of every grid box. So it seems that the setgrid command was just removing this lat/lon information. So, eben though the original files comprises more information, it does not work with remapcon, while the file tsetgrid.nc with less info does. Why?
Best regards
Stefan
Replies (2)
RE: unexpected behavior with a rotated grid file and remapcon - Added by Uwe Schulzweida 4 months ago
Hi Stephan,
During remapping, the geographical coordinates are automatically calculated from the rotated coordinates if they are not available. If the geographical coordinates, or parts of them, are available, the rotated coordinates are ignored.
That means CDO uses only one set of coordinates during interpolation. With the environment variable IGNORE_ATT_COORDINATES=1, the geographic coordinates are ignored and recalculated from the rotated coordinates if necessary.
IGNORE_ATT_COORDINATES=1 cdo setgrid,grid_cclm_ha.txt test.nc tsetgrid.nc
Best regards,
Uwe
RE: unexpected behavior with a rotated grid file and remapcon - Added by Stefan Hagemann 4 months ago
Hi Uwe,
Thanks for the good explanation!
Best regards
Stefan