I have spatially merged 4 tif tiles using gdal_merge. then converted the merged file to netcdf using gdal_translate. Now I want to regrid the netcdf file for specific lat lon and resolution. But when i use remapbil in cdo I get the error "Segmentation fault (core dumped)". As the file is more than 1.5 GB I am attaching a google drive link. text The grid data (gridfile.txt) for the command "cdo remapbil,gridfile.txt out.nc out_1.nc" is attached here.text Please help me resolve this problem.
I have spatially merged 4 tif tiles using gdal_merge. then converted the merged file to netcdf using gdal_translate. Now I want to regrid the netcdf file for specific lat lon and resolution. But when i use remapbil in cdo I get the error "Segmentation fault (core dumped)". What should I do to resolve this problem
CodePudding user response:
You are almost certainly running out of RAM. This is what is happening to me on my 32 GB machine. A critical thing to know is that, at a minimum, CDO has to take an entire horizontal layer into memory, so regridding this file is going to be very RAM heavy.
The solution is to first resample the grid, and then regrid it.
Your horizontal resolution in the raw file is roughly 0.001 by 0.001. However, the target grid resolution is 0.25 by 0.25. My recommendation is to resample the original grid so that it is 0.01 by 0.01, and then regrid to 0.25. The following will work:
cdo samplegrid,10 out.nc out1.nc
cdo remapbil,grid out1.nc out2.nc