我想聚合远程THREDDS目录中特定目录中的所有文件。这些是用于nam预测的grib2文件。这是每个月目录的主要列表。下面是我的ncml文件,用于文件的这个目录聚合:
<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" >
<aggregation dimName="time" type="joinExisting">
<scan location="http://www.ncei.noaa.gov/thredds/dodsC/nam218/201807/20180723/" regExp="^.*\.grb2$" subdirs="false"/>
<dimension name="time" orgName="t" />
</aggregation>
</netcdf>另外,我最感兴趣的是在文件中包含这两个变量:u-component_of_wind_height_above_ground和v-component_of_wind_height_above_ground。
在远程目录中,我不确定上面的聚合是否正确。我从上面的ncml文件中得到了这个错误:
There are no datasets in the aggregation DatasetCollectionManager{ collectionName='http://www.ncei.noaa.gov/thredds/dodsC/nam218/201807/20180723/^.*\.grb2$' recheck=null dir=http://www.ncei.noaa.gov/thredds/dodsC/nam218/201807/20180723/ filter=^.*\.grb2$
如何编写这个ncml文件?
谢谢。
发布于 2018-07-28 12:55:12
您不能覆盖远程URL,因此需要为聚合提供这些OPeNDAP端点的列表,例如:
<dataset name="Nam218" urlPath="nam218">
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<aggregation dimName="time" type="joinExisting">
<netcdf location="http://www.ncei.noaa.gov/thredds/dodsC/nam218/201807/20180723/<file01>.grb2"/>
<netcdf location="http://www.ncei.noaa.gov/thredds/dodsC/nam218/201807/20180723/<file02>.grb2"/>
<netcdf location="http://www.ncei.noaa.gov/thredds/dodsC/nam218/201807/20180723/<file03>.grb2"/>
</aggregation>
</netcdf>
</dataset>发布于 2018-08-15 14:09:11
您可以编写一个简单的程序(我使用了c++),以便在命令提示符中使用。(我使用Windows。)它启动一个BAT文件,启动wget并下载最新的THREDDS目录,然后以纯文本保存它,然后c++程序将整个文件加载到一个字符串中,在字符串中解析它并对数据执行我想做的事情。
https://stackoverflow.com/questions/51567423
复制相似问题