I have a gridded dataset (NetCDF format) covering Pakistan and its surrounding areas, but I am only interested in the region of Pakistan itself. I am wondering if there is a way to extract only the specific region of Pakistan from the entire dataset using a shapefile and CDO.
raza@raza-HP-ProBook-440-G5:~/1month_pres$ cdo selname,precipitation gpm_monthmerge.nc temp.nc
cdo selname: Processed 9186354 values from 1 variable over 279 timesteps [0.12s 80MB].
raza@raza-HP-ProBook-440-G5:~/1month_pres$ cdo setmisstoc,0 -remap,pakistan.shp temp.nc masked_pak.nc
cdo(1) remap: Process started
cdo(1) remap (Abort): Too few arguments! Need 2 found 1.
terminate called without an active exception
Aborted (core dumped)
raza@raza-HP-ProBook-440-G5:~/1month_pres$ cdo setmisstoc,0 -remap,pakistan.shp,temp.nc masked_pak.nc
cdo (Abort): Too few streams specified! Operator remap needs 1 input stream and 1 output stream!
raza@raza-HP-ProBook-440-G5:~/1month_pres$ cdo setmisstoc,0 -remap,pakistan.shp temp.nc masked_pak.nc
cdo(1) remap: Process started
cdo(1) remap (Abort): Too few arguments! Need 2 found 1.
terminate called without an active exception
Aborted (core dumped)
I have try these commands, but it is not working.