xml - 未使用 tomcat 和 opendap thredds 服务器更新文件

标签 xml tomcat

我正在运行可操作的海洋模型,所以我每天都会将新的 netCDF 文件放入通过 opendap TDS 和 tomcat 提供的文件夹中。 模型完成后,旧文件被新文件覆盖它们具有相同的名称(!),但服务器似乎没有更新/提供新数据。如果我在系统磁盘文件上执行 ncdump,我会得到一个值;与通过 opendap 相同的 ncdump 使用访问相比,我得到了不同,在我看来它被缓存并保持并且没有像我想要的那样刷新。 有没有办法通过 TDS opendap tomcat 禁用 netCDF 文件的缓存? 谢谢, 干杯 伊维察

最佳答案

要确保 THREDDS 数据服务器 (TDS) 不缓存您的数据,您可以设置一个不缓存的数据集根。这是我们用于海洋预报模型的实际示例,其中每天使用相同的名称(此处为 NECOFS_GOM2_FORECAST.nc、NECOFS_GOM3_FORECAST.nc 等)将新的预报 NetCDF 文件简单地上传到服务器:

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
  xmlns:xlink="http://www.w3.org/1999/xlink" name="THREDDS Catalog for NetCDF Files" version="1.0.1">

  <service name="allServices" serviceType="Compound" base="">
    <service name="ncdods" serviceType="OpenDAP" base="/thredds/dodsC/"/>
    <service name="HTTPServer" serviceType="HTTPServer" base="/thredds/fileServer/"/>
  </service>

  <datasetRoot path="FVCOM" location="/http/www/CODFISH/Data/FVCOM/" cache="false"/>

  <dataset name="NECOFS GOM2 Forecast" ID="gom2_nocache" serviceName="allServices"
    urlPath="FVCOM/NECOFS/Forecasts/NECOFS_GOM2_FORECAST.nc" dataType="Grid"/>

  <dataset name="NECOFS GOM3 Forecast" ID="gom3_nocache" serviceName="allServices"
    urlPath="FVCOM/NECOFS/Forecasts/NECOFS_GOM3_FORECAST.nc" dataType="Grid"/>

  <dataset name="NECOFS MET Forecast" ID="necofs_met" serviceName="allServices"
    urlPath="FVCOM/NECOFS/Forecasts/NECOFS_MET_FORECAST.nc" dataType="Grid"/>

  <dataset name="NECOFS GOM3 Wave Forecast" ID="necofs_gom3_wave" serviceName="allServices"
    urlPath="FVCOM/NECOFS/Forecasts/NECOFS_WAVE_FORECAST.nc" dataType="Grid"/>

  <dataset name="NECOFS MASSBAY Forecast" ID="massbay_nocache" serviceName="allServices"
    urlPath="FVCOM/NECOFS/Forecasts/NECOFS_FVCOM_OCEAN_MASSBAY_FORECAST.nc" dataType="Grid"/>

</catalog>

关于 https://www.unidata.ucar.edu/projects/THREDDS/tech/reference/ThreddsConfigXMLFile.html 有更多信息,它还说“看下面可能不起作用”但肯定它在 TDS 4.2.9 上工作,因为我们在这里使用它:http://www.smast.umassd.edu:8080/thredds/forecasts.html

关于xml - 未使用 tomcat 和 opendap thredds 服务器更新文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14621041/

相关文章:

java - 就模式类型“DateTimeType”而言,构面无效

c# - 如何构建自定义 AngleSharp 元素并将 HTML 部分插入/转换到元素中

xml - XSL - 恒等变换 - 改变元素的值

java - 这个 java 应用程序可以在 Heroku 上运行吗?

android - 自定义方形线性布局。如何?

jquery - 使用 jQuery 查找 XML 节点并将其放入现有的 HTML 表中

tomcat - 使用 EclipseLink 配置连接池

multithreading - 如何找出哪个tomcat webapp有线程泄漏?

java - 在 NAS 上移动文件时出现 AccessDeniedException

java - 404 请求的资源在非常简单的 servlet 上不可用