Project

General

Profile

rotuvb errors

Added by Mohammed Elshambakey about 3 years ago

Hi

I'm trying to use CDO to transform the attached netcdf file from rotated to un-rotated axes using the attached "rot_to_reg.txt". I used the "remapbil" option, but I learnt from a colleague that wind components should be treated differently using the "rotuvb" option. I tried, for example, command "cdo -rotuvb,U_10M,V_10M lfff00130000.nc l13t_uv.nc", I receive an error "Only rotated lon/lat grids supported!". So, I tried to use the following command "cdo rotuvb,U_10M,V_10M -uvDestag,U_10M,V_10M lfff00130000.nc l13t_uv.nc" but I receive the following error:

cdo(1) uvDestag: Process started
cdo(1) uvDestag: NOTE: We did not find any staggered U,V wind components. Performing file-copy.
[bt] Execution path:
[bt] /lib/x86_64-linux-gnu/libcdi.so.0(+0x5f6d2) [0x7ff937bc36d2]
[bt] /lib/x86_64-linux-gnu/libcdi.so.0(+0x5fa59) [0x7ff937bc3a59]
[bt] /lib/x86_64-linux-gnu/libcdi.so.0(reshGetValue+0xd) [0x7ff937bc40ed]
[bt] /lib/x86_64-linux-gnu/libcdi.so.0(gridInqXinc+0xa) [0x7ff937bb9d7a]
[bt] cdo(+0x2a4c93) [0x55d5cfb8ac93]
[bt] cdo(+0x2aca0b) [0x55d5cfb92a0b]
[bt] /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7ff935cc0609]
[bt] /lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7ff935be7293]
ERROR, reshGetElem, ../../../../libcdi/src/resource_handle.c, line 406, called from grid_to_pointer
errorString: "Error while trying to resolve the ID "gridID" in `grid_to_pointer()`: the value is CDI_UNDEFID (= -1).
This is most likely the result of a failed earlier call. Please check the IDs returned by CDI."

Regards


Replies (4)

RE: rotuvb errors - Added by Karin Meier-Fleischer almost 3 years ago

Hi Mohammed,

the coordinate variables lon and lat are the coordinates of the un-rotated grid, and rlat and rlon are the coordinates of the rotated grid. Due to the fact, that the variables U_10M and V_10M have the attribute coordinates = "lon lat" which points CDO to the un-rotated grid coordinates, CDO is telling you "Only rotated lon/lat grids supported!".

IMO, you can directly do the interpolation, e.g.

cdo -remapbil,r360x180 -selname,U_10M,V_10M lfff00130000.nc uv_r360x180.nc

-Karin

RE: rotuvb errors - Added by Mohammed Elshambakey almost 3 years ago

Thank you, Karin.

If I'm going to apply the interpolation on U,V components instead of U_10M,V_10M, is it possible to use "remapbil,<some_grid_file.txt>" instead of "rotuvb"?

NOTE: For the U,V components, I tried to do something like this "cdo -rotuvb,U,V -uvDestag,U,V -selname,U,V lfff00130000.nc l13uv_reg.nc", but it gives me the following error:
do(1) uvDestag (Abort): Destaggering supports only grid type = 'lonlat' (GRID_LONLAT).

Now, I wonder if I should temporarily modify the "coordinates" parameters as required, just to get the transformation done?

Regards

RE: rotuvb errors - Added by Karin Meier-Fleischer almost 3 years ago

With the coordinates attribute set you can directly remap the variables.

If you want to use the rlon/rlat coordinates you have to delete the coordinates attribute before you can use rotuvb.

Delete the coordinates attribute with NCO's ncatted program:

ncatted -a coordinates,U_10M,d,, -a coordinates,V_10M,d,, lfff00130000.nc tmp1.nc

Do the backward transformation with CDO's rotuvb:

cdo -rotuvb,U_10M,V_10M -selname,U_10M,V_10M tmp1.nc outfile.nc

RE: rotuvb errors - Added by Mohammed Elshambakey almost 3 years ago

Hi Karin

Thank you very much for your help. It worked for U_10M, and V_10M components.

When I tried to do the same thing (both ncatted, then rotuvb) for "U" and "V" components, I received the following error:
rotuvb (Abort): Only rotated lon/lat grids supported

So, I tried to do "uvDestag" first:

cdo -uvDestag,U,V -selname,U,V tmp1.nc outfile.nc
but I received the following error:
uvDestag (Abort): Destaggering supports only grid type = 'lonlat' (GRID_LONLAT)
Is it because "U" depends on "rlat, srlon" and V depends on "srlat, rlon"? and how can it be solved?

NOTE: The netcdf file is a COSMO data "http://www.cosmo-model.org/content/model/general/default.htm". I don't know if this is a useful info, but I thought just to mention it.

    (1-4/4)