Netcdf 平均多个 .nc 文件时的时间变量

标签 netcdf netcdf4 nco cdo-climate

我对一堆每小时的 netCDF 文件(一年)进行平均,以创建一个包含平均每日值的大型 netCDF 文件。时间变量表示自 2005-1-1 00:00:00 以来的小时数,如下所示:

time = 11.5, 35.5, 59.5, 83.5, 107.5, 131.5, 155.5, 179.5, 203.5, 227.5...;

但是,我希望时间变量代表一天的开始,这样它看起来像这样:

time = 0, 24, 48...;

有没有办法操纵时间变量,使其代表一天的开始而不是一天的中间?

谢谢!

最佳答案

似乎这个命令可能已经解决了我的问题:

ncap2 -s "time=time-11.5" infile.nc -o outfile.nc

关于Netcdf 平均多个 .nc 文件时的时间变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66144882/

相关文章:

Java GRIB 解码器 : Extract data from GRIB2 files

netcdf - nco 将每日 netcdf 文件剪切为 10 分钟文件

访问 Xarray 数据集时出现 HDF5 警告

python - 从域 ncfile 中提取数据

python - 将多个NetCDF文件组合成timeseries多维数组python

python - 由于比例因子和偏移量,导入 Python 时 NetCDF 数据精度下降

r - 在 R 中合并 netCDF 文件

python - 使用 Python 将 NetCDF 文件转换为 CSV 或文本

r - 在 R 中绘制具有级别的 netcdf 文件

python : Replacing Values in netcdf file using netCDF4