from curvilinear grid to curvilinear grid
Added by Estanislao Gavilan over 2 years ago
Dear community,
I would like to interpolate from a curvilinear grid to a curvilinear grid. I know I can interpolate using the next command
cdo remapbil,grid.txt input.nc output.nc
The main issue is that the grid is too big (510*3060). I tried to make the grid.txt file using dataframe in python but I cannot export the file without losing format. I have also tried to use the next command
cdo remapbil,grid.nc input.nc output.nc
where the nc file has the variables xvals(510*3060), yvals (510*3060), x_bounds(4*510*3060) and y_bounds(4*510*3060). However, I get the error
cdo remapbil (Abort): Unsupported target grid type (generic)!
I am bit stuck on this. What am I doing wrong?
Thanks in advance for your help
Kind regards,
Estanislao
Kind regards,
Estanislao
Replies (2)
RE: from curvilinear grid to curvilinear grid - Added by Ralf Mueller over 2 years ago
hi! Estanislao!
can you upload the file somewhere (a single timestep is enought (cdo -seltimestep,1), incase of netcdf you can compress it further with gzip --best
if it is too big for the upload here? and the grid.txt can be uploaded here I think.
'too big' means you get memory problems on your target machine?
Unsupported target grid type (generic)!
these warnings usually indicate that the grid description provided is not consistent. Therefore I need the input and grid.txt
cheers
ralf
RE: from curvilinear grid to curvilinear grid - Added by Estanislao Gavilan over 2 years ago
Hi Ralf,
At the end, I was able to write the grid.txt data. It turns out that I was correctly making the file. The format appeared totally messed up because notepad does not handle well big csv text files. I downloaded notepad++ which can open heavy text files without problems. I think the problems that I had with the ncfiles were about the grid attributes as you mentioned. After running cdo with the griddata.txt, I got similar errors because I did not specify the coordiantes attribute for the input variables. I found a lovely post here with an netcdf attributes template. After adding those lines, cdo was extremly happy. Nevertheless, thank you for your interest and help.
Kind regards,
Estanislao