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

前端 未结 3 1396
既然无缘
既然无缘 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条回答
  •  再見小時候
    2021-02-05 18:56

    You can also use CDO to extract the area from the bash command line first and then read the file in R:

    cdo sellonlatbox,-5,12,34.5,44.5 in.nc out.nc 
    

    I note in the above discussion that there was a problem concerning the order of the latitudes. You can also use the CDO command "invertlat" to sort that out for you.

提交回复
热议问题