How to take a subset from a netCDF file using latitude/longitude boundaries in R

前端 未结 3 1399
既然无缘
既然无缘 2021-02-05 18:28

I have a netCDF file that I wish to extract a subset from defined by latitude/longitude boundaries (i.e. a lat/long defined box), using the ‘ncdf’ package in R.

A summa

3条回答
  •  猫巷女王i
    2021-02-05 19:11

    If you are using Linux this can be achieved easily using nctoolkit (https://nctoolkit.readthedocs.io/en/latest/):

    import nctoolkit as nc
    data = nc.open_data("example.nc")    
    data.clip(lon = [-12, -5], lat = [35.4, 44.5])
    

提交回复
热议问题