我们将海洋模型的每小时输出存储在一系列netcdf文件中,每个月一个。
我们将每月的第一个小时和最后一个小时存储在每个文件中。我们希望使用NcML聚合这些文件,但我们不希望在聚合中获得重复的时间值。
有没有办法做到这一点?
发布于 2013-03-05 23:45:09
在NCML中,您可以使用NCOORDS精确指定要使用的记录数。因此,为了避免重复的时间值,您可以为每个月指定NCOORDS,使其比您当前拥有的少一个。因此,对于非闰年,您的聚合可能如下所示:
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<aggregation dimName="time" type="joinExisting">
<netcdf location="/Data/wave/2010/Jan/gom01_0001.nc" ncoords="744"/>
<netcdf location="/Data/wave/2010/Feb/gom01_0001.nc" ncoords="672"/>
<netcdf location="/Data/wave/2010/Mar/gom01_0001.nc" ncoords="744"/>
<netcdf location="/Data/wave/2010/Apr/gom01_0001.nc" ncoords="720"/>
<netcdf location="/Data/wave/2010/May/gom01_0001.nc" ncoords="744"/>
<netcdf location="/Data/wave/2010/Jun/gom01_0001.nc" ncoords="720"/>
<netcdf location="/Data/wave/2010/Jul/gom01_0001.nc" ncoords="744"/>
<netcdf location="/Data/wave/2010/Aug/gom01_0001.nc" ncoords="744"/>
<netcdf location="/Data/wave/2010/Sep/gom01_0001.nc" ncoords="720"/>
<netcdf location="/Data/wave/2010/Oct/gom01_0001.nc" ncoords="744"/>
<netcdf location="/Data/wave/2010/Nov/gom01_0001.nc" ncoords="720"/>
<netcdf location="/Data/wave/2010/Dec/gom01_0001.nc" ncoords="744"/>
</aggregation>
</netcdf>在闰年,您应该为二月指定ncoords="696"。
https://stackoverflow.com/questions/15227684
复制相似问题