dds协议java实现,使用Java脚本使并行服务器请求THREDDS OPeNDAP

For the following THREDDS OPeNDAP server:

http://data.nodc.noaa.gov/thredds/catalog/ghrsst/L2P/MODIS_T/JPL/2015/294/catalog.html

I would like to note four Attributes of every file in there. The attributes are:

northernmost lattitude; easternmost lattitude; westernmost lattitude; southernmost lattitude. These can be found under the Global attributes under:

http://data.nodc.noaa.gov/thredds/dodsC/ghrsst/L2P/MODIS_T/JPL/2015/294/20151021-MODIS_T-JPL-L2P-T2015294235500.L2_LAC_GHRSST_N-v01.nc.bz2.html

At first I tried this with MATLAB. Problem is: all the netcdf files on the server are compiled to .bz2 files. This makes calling for the Global attributes take around 15 seconds (the server is extracting the file). I would like javascript to run these server requests parallel to save me time. In total I need 90,000 files.

Is there a way to code this using javascript?

解决方案

You can use the THREDDS DAS service. DAS

Change the OPenDAP link you have above replacing the .html extension with .das

This is a small text file with metadata about the file which could be easily parsed with javascript and includes a section with the global attributes:

NC_GLOBAL {

. . .

Float32 northernmost_latitude 89.9942;

Float32 southernmost_latitude 66.9853;

Float32 easternmost_longitude -121.445;

Float32 westernmost_longitude 76.7485;

. . .

}

This metadata is cached by THREDDS and the above DAS link responds instantly.

Edit:

Re: the correct comments below, (cache exists only after the first request) one alternative might be to use the source data at the NASA JPL OPeNDAP Server (Hyrax): http://podaac-opendap.jpl.nasa.gov/opendap/allData/ghrsst/data/L2P/MODIS_T/JPL/

My browser only tests (i.e. subjective) seem to show that a random DAS responses are quicker, than 15 seconds.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值