NCO works fine, but just to list an alternative, you can also do this with cdo (climate data operators), which I think is easier to remember. You can directly specify longitude and latitude values ββas follows:
cdo sellonlatbox,lon1,lon2,lat1,lat2 infile.nc outfile.nc
where lon1, lon2, lat1, lat2 define the boundaries of the area you need. If it is not already installed, you can get it in Ubuntu with
sudo apt-get install cdo
Cdo has many other functions for processing, combining and splitting files, and excellent online documentation.
Please note that for CDO to work, you need to determine the coordinate variables (latitude / longitude) in accordance with the CDF conventions, so the NCO solution is more reliable (see comments).
source share