Issues with clipping using a shapefile
Added by Walid Moulahoum over 5 years ago
I'm running cdo-1.8.2 on ubuntu 16.04 machine on Windows 10
I had a global netCDF file of Groundwater heads. I managed to clip it to a box using cdo -sellonlatbox,-64.17,-62.60,-34.64,-33.52 groundwaterHeadLayer2_monthEnd_output.nc output.nc
output.nc is successfully generated. Now I want to use a shapefile to clipe the netCDF according to the shapefile.
I followed the instructions on https://code.mpimet.mpg.de/boards/2/topics/6693. I rasterized my shapefile while making sure that the cell size in the rasterized shp is identical to the netCDF. Then I saved the rasterized shp to a maskfile.nc.
I applied cdo div output.nc maskfile.nc clipped_file.nc
The process runs, but resulting clipped clipped_file.nc looks inversed or mirrored geometrically only. Which means that the values of the pixels in the clipped file are not mirrored.
What kind of information should I inspect further to solver this?
Thanks in advance
clipped_file.png (100 KB) clipped_file.png | clipped_file.nc | ||
maskfile.png (113 KB) maskfile.png | maskfile.nc | ||
output.png (176 KB) output.png | output.nc |
Replies (2)
RE: Issues with clipping using a shapefile - Added by Karin Meier-Fleischer over 5 years ago
Hi Walid,
could you upload the data files.
-Karin
RE: Issues with clipping using a shapefile - Added by Walid Moulahoum over 5 years ago
Of course! Apologies for not doing so already.
I attach only the first clipped file because the raw data exceed 4Go.
If anything is missing, don't hesitate to ask back!
Thanks