【发布时间】:2017-04-20 08:49:19
【问题描述】:
我有一个这样的 netcdf 文件:
dimensions:
time = 8760 ;
lon_lat = 35047 ;
temperature = 8760 ;
variables:
float temp(temperature, lon_lat) ;
temp:units = "C" ;
float time(time) ;
float longitude(lon_lat) ;
longitude:units = "degrees east" ;
float latitude(lon_lat) ;
latitude:units = "degrees north" ;
netcdf 覆盖了整个美国。我想用 nco 做的是删除一个特定的区域,比如一个正方形。
因此,通过为某个区域提供某些坐标,我将删除“切出”该区域。
然后我会得到一个带有三个变量但没有该特定区域数据的州的 netcdf。假设我会让美国有一个洞。
我已经用 Hyperslabs (http://nco.sourceforge.net/nco.html#hyp) 进行了尝试:
ncks -d lon,-106.,-102. -d lat, 20.,30. in.nc out.nc
但是,它说:
ncks: ERROR dimension longitude is not in input file
对,因为维度是 (lon_lat)。有没有办法通过变量来削减它?
【问题讨论】:
-
这个文件看起来不对,为什么
temperature是一个维度?为什么会有一个空间维度lat_lon?该文件可能应该是 3D,timexlatxlon,并且将temperature作为变量,而不是维度。整理好文件后,您可以使用 hyperslabs 在lat和lon之间提取一个矩形。