converting minus longitude to 0-360 longitude
Added by Behnam Zamani over 8 years ago
Hi everyone,
I am going to multiply a scalar data on a curviliniear grid .nc file with a rotated and interpolated vector field nc file on the same curviliniear grid, so that each scalar would be multiplied by the corresponding vector on a given cell.
The problem now is that, the longitudes of the scalars are defined as -180 to 180 and the longitudes of the vectors are defined as 0-360, and once I am multiplying them using cdo mul command, I am getting the follwing warning:
cdo mul (Warning): Geographic location of some grid points differ!
how can I solve this problem? any command etc.?
Cheers,
Behnam
Replies (1)
RE: converting minus longitude to 0-360 longitude - Added by Behnam Zamani over 8 years ago
Hi again,
I just found a solution for the problem by myself that I thought it might be useful for the readers of my post with similar problem:
one of the grids should be set to the other grid definition. It doesn't matter which to which, but my preference was keeping the negative scalar locations and translating the 0-360 vectors to the -180-180 grid. Using setgrid command:
cdo setgrid,{gridfile, here the file including -180-180 grid} {ifile} {ofile}
Cheers