首页 > 解决方案 > 使用 ncks 将时间设置为记录维度的内存错误

问题描述

我正在尝试使用 ncks 将时间设置为大型(14 GB)文件中的记录维度并收到以下错误

$ ncks -O --mk_rec_dmn time vorticity_1979_1.40625deg.nc test.nc
nco_def_var_chunking(): ERROR Total requested chunk size = 14926479360 exceeds netCDF 
maximium-supported chunk size = 4294967295
nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered 
error): nco_def_var_chunking()
nco_err_exit(): ERROR Error code is -127. Translation into English with nc_strerror(-127) is 
"NetCDF: Bad chunk sizes."
nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

标签: netcdfnco

解决方案


不知道为什么它会自动选择太大的块大小。将格式更改为 netCDF-64 位是可行的,因为这样分块就不是问题了。我认为,您还可以通过将块大小显式设置为例如单个时间步长来保持格式为 netCDF4

ncks -O --cnk_dmn time,1 --mk_rec_dmn time vorticity_1979_1.40625deg.nc test.nc

推荐阅读