注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿弥陀佛

街树飘影未见尘 潭月潜水了无声 般若观照心空静...

 
 
 

日志

 
 
关于我

一直从事气象预报、服务建模实践应用。 注重气象物理场、实况场、地理信息、本体知识库、分布式气象内容管理系统建立。 对Barnes客观分析, 小波,计算神经网络、信任传播、贝叶斯推理、专家系统、网络本体语言有一定体会。 一直使用Java、Delphi、Prolog、SQL编程。

网易考拉推荐

The NetCDF Markup Language  

2015-03-19 00:10:53|  分类: netcdf |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

The NetCDF Markup Language (NcML)


Overview

NcML is an XML representation of netCDF metadata, (approximately) the header information one gets from a netCDF file with the "ncdump -h" command. NcML is similar to the netCDF CDL (network Common data form Description Language), except, of course, it uses XML syntax.

NcML development is happening on two fronts:

  1. NcML-2.2 as implemented by the NetCDF-Java library.
  2. ncML-Gml is an extension of ncML core schema, based on GML grammar. It uses both NcML and GML to create a bridge to GIS Systems. This work is led by Stefano Nativi at the Università degli Studi di Firenze.

NcML 2.2

NcML as output

The simplest use of NcML is to describe the metadata and structural content of a netCDF file, like the output of ncdump -h. There are several ways to generate NcML ouput from an existing netCDF file:

  1. In the ToolsUI application, use the NcML tab to open a NetCDF dataset, and the NcML will be displayed. You can edit and then save the NcML with the "Save NcML" button.
  2. In the NetCDF-Java library, use NetcdfFile.writeNcML() or NcMLWriter().writeXML().
  3. Use the NetCDF-Java library ncdump application, eg:
     java -classpath netcdfAll.jar ucar.nc2.NCdumpW <NetCDF-3 filename> -ncml
  4. In the netCDF C library, version 3.6.1 or later , use ncdump -x<NetCDF filename>

Using NcML to create a NetCDF-3 file

Using the NetCDF-Java library, you can also use NcML to create a new netCDF-3 file, similar to the ncgen program.

  1. Using a text or XML editor, create the NcML file with an "xml" or "ncml" file extension. Open the NcML file with NetcdfDataset.open(), then call ucar.nc2.FileWriter.writeFile()
  2. In the ToolsUI application, open an existing NcML file in the NcML tab, or create a new one. You can edit and save the NcML with the "Save NcML" button. You can create the equivilent binary NetCDF file with the "Write NetCDF" button.

Using NcML to modify an existing CDM file

Using the NetCDF-Java library, you can use NcML to modify an existing CDM file, and then write a new netCDF-3 format file with those modifications in it.

  1. Using a text or XML editor, create the NcML file with an "xml" or "ncml" file extension. Reference the existing file using the location attribute, and add, change or delete metadata in the NcML as in this example.
  2. Write the new file as a netCDF-3 format file:
    1. Use the NetCDF-Java library nccopy application to write the new file, eg:
      java -Xmx1g -classpath netcdfAll-4.3.jar ucar.nc2.dataset.NetcdfDataset -in myFile.ncml -out myFile.nc
    2. (or) In the ToolsUI application, open the NcML file in the NcML tab. You can create the equivilent binary NetCDF file with the "Write NetCDF" button.

Advanced NcML

A more advanced use is to modify existing NetCDF files, as well as to create "virtual" NetCDF datasets, for example through aggregation. In that case, you'll have to read more:

Acknowledgments and History

Earlier work in defining XML representations for netCDF data included Bear Giles DTD and XML tools in March 2000, a proposed DTD by Stefano Nativi and Lorenzo Bigagli at the University of Florence in May 2000, and a version developed by John Caron in February 2001.

The original NcML working group consisted of John Caron (Unidata/UCAR), Luca Cinquini (SCD/NCAR), Ethan Davis (Unidata/UCAR), Bob Drach (PCMDI/LLNL), Stefano Nativi (University of Florence), and Russ Rew (Unidata/UCAR).

In the first implementation of NcML (version 2.1), there were three parts to NcML with separate schema documents:

  1. NcML Core Schema represented the existing netCDF-3 data model
  2. NcML Coordinate System extended NcML Core Schema and extended the netCDF data model to add explicit support for general and georeferencing coordinate systems
  3. NcML Dataset extended NcML Core Schema to use NcML to define a netCDF file, similar to the ncgen command line tool, as well as to redefine, aggregate, and subset existing netCDF files.

NcML Coordinate System is now superceded by NcML-GML. NcML Core Schema and NcML Dataset have been combined into a single NcML Schema, and some of the NcML Dataset syntax and functionality has been modified.

  评论这张
 
阅读(320)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017