附件文档:
4 NetCDF Java
4.1 概述(Overview)
参考网址:http://www.unidata.ucar.edu/software/netcdf-java/documentation.htm
The NetCDF-Java library implements a Common Data Model (CDM), a generalization of the NetCDF, OpenDAP and HDF5 data models. The library is a prototype for the NetCDF-4 project, which provides a C language API for the "data access layer" of the CDM, on top of the HDF5 file format. The NetCDF-Java library is a 100% Java framework for reading netCDF and other file formats into the CDM, as well as writing to the netCDF-3 file format. The NetCDF-Java library also implements NcML, which allows you to add metadata to CDM datasets, as well as to create virtual datasets through aggregation.
NetCDF-Java库实现了CDM(通用数据模型),CDM包括NetCDF,OpenDAP,HDF5数据模型,它是NetCDF-4项目的一个原型,NetCDF-4项目是紧跟HDF5文件格式后采用C语言作为CDM的的数据访问层API。在CDM中NetCDF-Java包是完全用Java架构来读取NetCDF和其他格式文件,和写netCDF-3格式文件一样。它还实现了NCML,允许你为CDM数据集添加元数据,和通过运算生成实际数据一样。
4.2 CDM(通用数据模型)
参考网址:http://www.unidata.ucar.edu/software/netcdf-java/CDM/index.html
Unidata’s Common Data Model (CDM) is an abstract data model for scientific datasets. It merges the netCDF, OPeNDAP, and HDF5 data models to create a common API for many types of scientific data. The NetCDF Java library is an implementation of the CDM which can read many file formats besides netCDF. We call these CDM files, a shorthand for files that can be read by the NetCDF Java library and accessed through the CDM data model.
Unidata社区的CDM(通用数据模型)是一个科学数据的抽象数据模型,它包括了NetCDF, OPeNDAP, HDF5数据模型并为不同类型的科学数据创建了一个通用的API。NetCDF Java库实现了CDM,CDM除了能读取NetCDF格式外还有其他类型文件,我们把这些CDM文件作为那些能被NetCDF Java库读取和访问的的文件的简称。
4.3 NetCDF-Java/CDM Architecture
4.4 CDM-FILES
General: NetCDF, OPeNDAP, HDF5, NetCDF4, HDF4, HDF-EOS
Gridded: GRIB-1, GRIB-2, GEMPAK
Radar: NEXRAD 2&3, DORADE, CINRAD, Universal Format, TDWR
Point: BUFR, ASCII
Satellite: DMSP, GINI, McIDAS AREA
Misc: GTOPO, Lightning, etc
Others in development (partial):
AVHRR, GPCP, GACP, SRB, SSMI, HIRS (NCDC)
4.5 Data Access Layer Object Model
4.6 NetCDF举例
4.6.1 下载
下载地址: http://www.unidata.ucar.edu/software/netcdf-java/documentation.htm
在线API: http://www.unidata.ucar.edu/software/netcdf-java/v4.2/javadoc/index.html
目前最新版本为4.2.20
最新版本需要JDK6
4.6.2 生成NC文件
package my.demo;
import java.io.IOException;
import java.util.ArrayList;
import ucar.ma2.Array;
import ucar.ma2.DataType;
import ucar.nc2.Dimension;
import ucar.nc2.NetcdfFileWriteable;
public class CreateNetcdf {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception {
String filename = "testWrite.nc";
NetcdfFileWriteable ncfile = NetcdfFileWriteable.createNew(filename,true); // add
// dimensions
Dimension latDim = ncfile.addDimension("lat", 3);
Dimension lonDim = ncfile.addDimension("lon", 3); // define
// Variable
ArrayList dims = new ArrayList();
dims.add(latDim);
dims.add(lonDim);
ncfile.addVariable("temperature", DataType.DOUBLE, dims);
ncfile.addVariableAttribute("temperature", "units", "K"); // add a
// 1D
// attribute
// of
// length
// 3
Array data = Array.factory(int.class, new int[] { 3 }, new int[] { 1,2,3 });
ncfile.addVariableAttribute("temperature", "scale", data);
// add a string-valued variable: char svar(80)
Dimension svar_len = ncfile.addDimension("svar_len", 80);
dims = new ArrayList();
dims.add(svar_len);
ncfile.addVariable("svar", DataType.CHAR, dims);
// string array: char names(3, 80)
Dimension names = ncfile.addDimension("names", 3);
ArrayList dima = new ArrayList();
dima.add(names);
dima.add(svar_len);
ncfile.addVariable("names", DataType.CHAR, dima);
// how about a scalar variable?
ncfile.addVariable("scalar", DataType.DOUBLE, new ArrayList()); // add
// global
// attributes
ncfile.addGlobalAttribute("yo", "face");
ncfile.addGlobalAttribute("versionD", new Double(1.2));
ncfile.addGlobalAttribute("versionF", new Float(1.2));
ncfile.addGlobalAttribute("versionI", new Integer(1));
ncfile.addGlobalAttribute("versionS", new Short((short) 2));
ncfile.addGlobalAttribute("versionB", new Byte((byte) 3)); // create
// the
// file
try {
ncfile.create();
} catch (IOException e) {
System.err.println("ERROR creating file " + ncfile.getLocation()+ "\n" + e);
}
}
}
会生成一个testWrite.nc文件,该文件不能直接打开,可以通过下载的包中netcdfUI-4.2.jar打开:
4.6.3 读取NC文件
package my.demo;
import java.io.IOException;
import java.util.List;
import ucar.nc2.Dimension;
import ucar.nc2.NetcdfFile;
import ucar.nc2.Variable;
public class ReadNetcdf {
public static void main(String[] args) {
String filename = "D:\\work\\netcdf\\testWrite.nc";
NetcdfFile ncfile = null;
try {
ncfile = NetcdfFile.open(filename);
//read dimensions
List<Dimension> list = ncfile.getDimensions();
for(Dimension d : list){
System.out.println("name="+d.getName()+" length="+d.getLength());
}
//read variables
List<Variable> variables = ncfile.getVariables();
System.out.println();
for(Variable v : variables){
System.out.println("name="+v.getName()+" NameAndDimension="+v.getNameAndDimensions()+" ElementSize="+v.getElementSize());
}
} catch (IOException ioe) {
} finally {
if (null != ncfile)
try {
ncfile.close();
} catch (IOException ioe) {
}
}
}
}
运行打印如下:
name=lat length=3
name=lon length=3
name=svar_len length=80
name=names length=3
name=temperature NameAndDimension=temperature(lat=3, lon=3) ElementSize=8
name=svar NameAndDimension=svar(svar_len=80) ElementSize=1
name=names NameAndDimension=names(names=3, svar_len=80) ElementSize=1
name=scalar NameAndDimension=scalar ElementSize=8
4.6.4 读写文件
package my.demo;
import java.io.IOException;
import ucar.ma2.ArrayDouble;
import ucar.ma2.Index;
import ucar.ma2.InvalidRangeException;
import ucar.nc2.Dimension;
import ucar.nc2.NetcdfFileWriteable;
public class WriteDataToNetcdf {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
NetcdfFileWriteable ncfile = NetcdfFileWriteable.openExisting("D:\\work\\netcdf\\testWrite.nc", true);
Dimension latDim = ncfile.getDimensions().get(0);
Dimension lonDim = ncfile.getDimensions().get(1);
ArrayDouble A = new ArrayDouble.D2(latDim.getLength(), lonDim.getLength());
int i, j;
Index ima = A.getIndex();
for (i = 0; i < latDim.getLength(); i++) {
for (j = 0; j < lonDim.getLength(); j++) {
A.setDouble(ima.set(i, j), (double) (2));
}
}
int[] origin = new int[2];
try {
ncfile.write("temperature", origin, A);
ncfile.close();
} catch (IOException e) {
System.err.println("ERROR writing file");
} catch (InvalidRangeException e) {
e.printStackTrace();
}
}
}
该方法为Variable temperature进行赋值,可以将修改后的testWrite.nc在netcdfUI-4.2.jar中查看:
double temperature(lat=3, lon=3);
:units = "K";
:scale = 1, 2, 3; // int
data:
{
{2.0, 2.0, 2.0},
{2.0, 2.0, 2.0},
{2.0, 2.0, 2.0}
}
4.6.5 读取二维数据
通过v.read()可以读取数据:
Variable v = ncfile.findVariable(varName);
Variable v = ncfile.findVariable(varName);
Array data = v.read("0:2:1, 0:19:1");
package my.demo;
import java.io.IOException;
import ucar.ma2.Array;
import ucar.nc2.NCdumpW;
import ucar.nc2.NetcdfFile;
import ucar.nc2.Variable;
public class ReadData {
public static void main(String[] args) {
String filename = "D:\\work\\netcdf\\testWrite.nc";
NetcdfFile ncfile = null;
try {
ncfile = NetcdfFile.open(filename);
//find variable
String variable = "temperature";
Variable varBean = ncfile.findVariable(variable);
//Reading data from a Variable
if(null != varBean) {
Array all = varBean.read();
Array data = varBean.read("0:2:1, 0:2:1");
Array data1 = varBean.read("0:2:2, 0:2:2");
System.out.println("读取所有:\n"+NCdumpW.printArray(all, variable, null));
System.out.println("x轴从0到2 跨度为1 y轴从0到2 跨度为1:\n"+NCdumpW.printArray(data, variable, null));
System.out.println("x轴从0到2 跨度为2 y轴从0到2 跨度为2:\n"+NCdumpW.printArray(data1, variable, null));
}
if(null != varBean) {
int[] origin = new int[] { 0 , 0};
int[] size = new int[] { 3,3};
Array data2D = varBean.read(origin, size);
System.out.println("读取所有:\n"+NCdumpW.printArray(data2D, variable, null));
}
if(null != varBean) {
int[] origin = new int[] { 1 , 1};
int[] size = new int[] { 2,1};
Array data2D = varBean.read(origin, size);
System.out.println("读取从第二行第二列开始为起点x数量为1,y数量为2:\n"+NCdumpW.printArray(data2D, variable, null));
}
System.out.println("由此可得结论:维上的起点都以数组0开始,且阵列顺序在坐标中是从右至左\n如:int[] size = new int[] { 2,1},1代表x轴,2代表的是y轴....");
} catch (Exception ioe) {
ioe.printStackTrace();
} finally {
if (null != ncfile)
try {
ncfile.close();
} catch (IOException ioe) {
}
}
}
}
打印结果如下:根据结果可以知道read("0:2:2, 0:2:2")和read(origin, size)的差别
读取所有:
temperature =
{
{0.0, 1.0, 2.0},
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0}
}
x轴从0到2 跨度为1 y轴从0到2 跨度为1:
temperature =
{
{0.0, 1.0, 2.0},
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0}
}
x轴从0到2 跨度为2 y轴从0到2 跨度为2:
temperature =
{
{0.0, 2.0},
{2.0, 4.0}
}
读取所有:
temperature =
{
{0.0, 1.0, 2.0},
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0}
}
读取从第二行第二列开始为起点x数量为1,y数量为2:
temperature =
{
{2.0},
{3.0}
}
由此可得结论:维上的起点都以数组0开始,且阵列顺序在坐标中是从右至左
如:int[] size = new int[] { 2,1},1代表x轴,2代表的是y轴....
4.6.6 多维NetCDF(三维)
4.6.6.1 创建
创建三维NetCDF文件:
package my.demo;
import java.io.IOException;
import java.util.ArrayList;
import ucar.ma2.Array;
import ucar.ma2.DataType;
import ucar.nc2.Dimension;
import ucar.nc2.NetcdfFileWriteable;
public class Create3DNetCDF {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception {
String filename = "test3D.nc";
NetcdfFileWriteable ncfile = NetcdfFileWriteable.createNew(filename,true); // add
Dimension timeDim = ncfile.addDimension("time",2);
Dimension latDim = ncfile.addDimension("lat", 3);
Dimension lonDim = ncfile.addDimension("lon", 3); // define
ArrayList dims = new ArrayList();
dims.add(timeDim);
dims.add(latDim);
dims.add(lonDim);
ncfile.addVariable("temperature", DataType.DOUBLE, dims);
ncfile.addVariableAttribute("temperature", "units", "K"); // add a
Array data = Array.factory(int.class, new int[] { 3 }, new int[] { 1,2,3 });
ncfile.addVariableAttribute("temperature", "scale", data);
try {
ncfile.create();
} catch (IOException e) {
System.err.println("ERROR creating file " + ncfile.getLocation()+ "\n" + e);
}
}
}
4.6.6.2 写数据
package my.demo;
import java.io.IOException;
import ucar.ma2.ArrayDouble;
import ucar.ma2.Index;
import ucar.ma2.InvalidRangeException;
import ucar.nc2.Dimension;
import ucar.nc2.NetcdfFileWriteable;
public class Write3DNetCDF {
public static void main(String[] args) throws IOException {
NetcdfFileWriteable ncfile = NetcdfFileWriteable.openExisting("D:\\work\\netcdf\\test3D.nc", true);
Dimension timeDim = ncfile.getDimensions().get(0);
Dimension latDim = ncfile.getDimensions().get(1);
Dimension lonDim = ncfile.getDimensions().get(2);
ArrayDouble A = new ArrayDouble.D3(timeDim.getLength(),latDim.getLength(), lonDim.getLength());
int k,i, j;
Index ima = A.getIndex();
for(k = 0; k < timeDim.getLength(); k++){
for (i = 0; i < latDim.getLength(); i++) {
for (j = 0; j < lonDim.getLength(); j++) {
A.setDouble(ima.set(k,i,j), (double) (k+i+j));
}
}
}
int[] origin = new int[3];
try {
ncfile.write("temperature", origin, A);
ncfile.close();
} catch (IOException e) {
System.err.println("ERROR writing file");
} catch (InvalidRangeException e) {
e.printStackTrace();
}
}
}
对应的CDL格式如下:
double temperature(time=2, lat=3, lon=3);
:units = "K";
:scale = 1, 2, 3; // int
data:
{
{
{0.0, 1.0, 2.0},
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0}
},
{
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0},
{3.0, 4.0, 5.0}
}
}
4.6.6.3 读数据
package my.demo;
import java.io.IOException;
import ucar.ma2.Array;
import ucar.nc2.NCdumpW;
import ucar.nc2.NetcdfFile;
import ucar.nc2.Variable;
public class Read3DNetCDF {
public static void main(String[] args) {
String filename = "D:\\work\\netcdf\\test3D.nc";
NetcdfFile ncfile = null;
try {
ncfile = NetcdfFile.open(filename);
String variable = "temperature";
Variable varBean = ncfile.findVariable(variable);
//read all data
if(null != varBean) {
Array all = varBean.read();
System.out.println("读取所有:\n"+NCdumpW.printArray(all, variable, null));
}
if(null != varBean) {
int[] origin = new int[] { 0,1,1};
int[] size = new int[] { 2,2,2};
Array data2D = varBean.read(origin, size);
System.out.println("读取从第一维的0开始,第二维从1开始,第三维从1开始,数量分别为2,2,2:\n"+NCdumpW.printArray(data2D, variable, null));
}
// invoke reduce trans 3D to 2D
if(null != varBean) {
int[] origin = new int[] { 0,1,1};
int[] size = new int[] { 1,2,2};
Array data2D = varBean.read(origin, size).reduce().reduce();
System.out.println("读取从第一维的0开始,第二维从1开始,第三维从1开始,数量分别为1,2,2并转为二维:\n"+NCdumpW.printArray(data2D, variable, null));
}
} catch (Exception ioe) {
ioe.printStackTrace();
} finally {
if (null != ncfile)
try {
ncfile.close();
} catch (IOException ioe) {
}
}
}
}
打印:
读取所有:
temperature =
{
{
{0.0, 1.0, 2.0},
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0}
},
{
{1.0, 2.0, 3.0},
{2.0, 3.0, 4.0},
{3.0, 4.0, 5.0}
}
}
读取从第一维的0开始,第二维从1开始,第三维从1开始,数量分别为2,2,2:
temperature =
{
{
{2.0, 3.0},
{3.0, 4.0}
},
{
{3.0, 4.0},
{4.0, 5.0}
}
}
读取从第一维的0开始,第二维从1开始,第三维从1开始,数量分别为1,2,2并转为二维:
temperature =
{
{2.0, 3.0},
{3.0, 4.0}
}
4.7 NetCDF-NCML(Modifying existing files)
通过NCML标记语言可以对NetCDF文件修改
参考网址:http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Tutorial.html
4.8 NCML- Aggregation
通过NCML合并存在的多个NetCDF文件
参考网站:http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Aggregation.html
4.9 NetCDF-IOSP(I/O Service Provide)
参考网址:http://www.unidata.ucar.edu/software/netcdf-java/tutorial/IOSPoverview.html
4.9.1 Overview
A client uses the NetcdfFile, NetcdfDataset, or one of the Scientific Feature Type APIs to read data from a CDM file. These provide a rich and sometimes complicated API to the client. Behind the scenes, when any of these APIs actually read from a dataset, however, they use a very much simpler interface, the I/O Service Provider or IOSP for short. The Netcdf Java library has many implementations of this interface, one for each different file format that it knows how to read. This design pattern is called a Service Provider.
IOSPs are managed by the NetcdfFile class. When a client requests a dataset (by calling NetcdfFile.open), the file is opened as a ucar.unidata.io.RandomAccessFile (an improved version of java.io.RandomAccessFile). Each registered IOSP is then asked "is this your file?" by calling isValidFile( ucar.unidata.io.RandomAccessFile). The first one that returns true claims it. When you implement isValidFile() in your IOSP, it must be very fast and accurate.
4.9.2 IOServiceProvider
package ucar.nc2.iosp;
import ucar.ma2.Section;
import ucar.ma2.InvalidRangeException;
import ucar.ma2.StructureDataIterator;
import ucar.nc2.ParsedSectionSpec;
import ucar.nc2.Structure;
import java.io.IOException;
import java.nio.channels.WritableByteChannel;
/**
* This is the service provider interface for the low-level I/O access classes (read only).
* This is only used by service implementors.
*
* The NetcdfFile class manages all registered IOServiceProvider classes.
* When NetcdfFile.open() is called:
* <ol>
* <li> the file is opened as a ucar.unidata.io.RandomAccessFile;</li>
* <li> the file is handed to the isValidFile() method of each registered
* IOServiceProvider class (until one returns true, which means it can read the file).</li>
* <li> the open() method on the resulting IOServiceProvider class is handed the file.</li>
*
* @see ucar.nc2.NetcdfFile#registerIOProvider(Class) ;
*
* @author caron
*/
public interface IOServiceProvider {
/**
* Check if this is a valid file for this IOServiceProvider.
* You must make this method thread safe, ie dont keep any state.
*
* @param raf RandomAccessFile
* @return true if valid.
* @throws java.io.IOException if read error
*/
public boolean isValidFile( ucar.unidata.io.RandomAccessFile raf) throws IOException;
}
其他方法见官网介绍或API文档。
4.9.3 AbstractIOServiceProvider
Your implementataion class should extend ucar.nc2.iosp.AbstractIOServiceProvider. This provides default implementation of some of the methods, so minimally, you only have to implement 4 methods:
public class MyIosp extends ucar.nc2.iosp.AbstractIOServiceProvider {
1) public boolean isValidFile(RandomAccessFile raf) throws IOException {}
2) public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException {}
3) public Array readData(Variable v2, Section wantSection) throws IOException, InvalidRangeException {}
4) public void close() throws IOException {}
5) public String getFileTypeId() {}
5) public String getFileTypeVersion() {}
5) public String getFileTypeDescription();
}
4.9.4 IOSP-Example
通过IOSP对数据处理生成NetCDF文件已经读取NetCDF数据例子:
参考网址:
http://www.unidata.ucar.edu/software/netcdf-java/tutorial/index.html
图中的例子为雷电数据,卫星数据,雷达数据相关
分享到:
相关推荐
包括netCDF4.dll 以及.net环境下的C#调用demo,一维数据和二维数据的读写类库。
既可以支撑QGIS的跨平台编译工作,也可以进行netcdf的二次研发。 四、其他说明 基于Qt Creator进行跨平台编译的netcdf工程源码。包含有各类源码,以及配置好的Qt工程文件。 只需用Qt Creator程序打开pro文件,即可...
本文件是针对window 64位操作系统的处理方式,步骤一、安装好netCDF4.8.1-NC4-64.exe,步骤二、运行cmd。找到安装文件ncdump.exe的目录。比如:C:\netCDF 4.8.1\bin\ncdump.exe。步骤三:在cmd中运行: .\ncdump .\...
一、NetCDF文件介绍 2 ...二、NetCDF文件结构 3 1、结构描述 3 2、结构之间的内在联系 3 三、NetCDF 接口函数库 4 1、NetCDF 接口函数库 4 2、C版本的NetCDF 数据的接口函数库简介 5 四、总结 5 五、附录: 6
Qt 解析 NC 文件,读取一维、二维、三维、四维数据
自己编译好的NET下支持netCDF读写的GDAL-1.9.2库,解决了安全透明代码无法调用本机C++代码的问题,C#下测试可用,GDAL-1.9.2 AND netCDF-4.3.0二进制发行包,vs2010+SWIG编译。
既可以支撑QGIS在Linux环境下的编译工作,也可以进行netcdf的二次研发。 四、其他说明 在Linux环境下,基于Qt Creator进行编译的netcdf开源库。包含有头文件include、库文件so等,提供了Debug、Release版本。 当前...
既可以支撑QGIS在Windows环境下的编译工作,也可以进行netcdf的二次研发。 四、其他说明 在Windows环境下,基于Qt Creator进行编译的netcdf开源库。包含有头文件include、库文件lib、动态库dll等,提供了Debug、...
既可以支撑QGIS在MacOS环境下的编译工作,也可以进行netcdf的二次研发。 四、其他说明 在MacOS环境下,基于Qt Creator进行编译的netcdf开源库。包含有头文件include、库文件dylib等,提供了Debug、Release版本。 ...
更新了OSX和linux的二进制轮子,它们链接了最新的netcdf-c和hdf5库。 2020年12月1日:发布了版本。 更新许可证文字以与MIT许可证一致。 2020年7月23日:发布了版。 现在需要numpy> = 1.9。 10/27/2019:版本1.5.3已...
将Dinkum Binary数据文件转换为netCDF数据文件。
netCDF运算符(NCO)包含十二个独立的命令行程序,这些程序将 , HDF和/或DAP文件作为输入,然后进行操作(例如,获取新数据,计算统计信息,打印,超图,操纵元数据)和输出以文本,二进制或netCDF格式将结果显示...
用法二进制convert-littler需要一个Fortran名称列表作为参数,例如: netcdf2littler --namelist netcdf2littler.namelist 如果未提供任何参数, netcdf2littler尝试使用当前工作目录中的文件netcdf2littler....
此函数使用 MATLAB netCDF 例程将 netCDF ... READ_NETCDF(filename,'flipdim') 翻转二维数组的维度。 READ_NETCDF(filename,'strip') 从元素名称中去除非字母数字字符,以便它们与 MATLAB 结构体元素命名约定兼容。
第一个函数将数据 (NetCDFreader) 导入 matlab,第二个函数 (NetCDF2ASCII) 将这些变量转换为 ASCII。 这两种功能都已使用 WMO SDS-WAS 产品进行了测试,但是它们可以与任何 NetCDF 文件一起使用。 如何使用: 1. ...
对于此软件包,请下载预测的二进制非netcdf版本。 该软件基于对这些文件进行解码的软件链。 这些文件本身很简单,但是要获得准确的潮汐预测,必须通过取决于时间的天文潮汐常数来校正它们提供的振幅和相位。 因此,...
目前包含的插件可以读取HDF-5,NetCDF-4,WAV,Exdir,numpy二进制文件和各种图像格式,但是可以为可以表示为Numpy数组的任何数据编写插件。 安装Argos Argos可与Python 2.7或Python 3.4及更高版本一起使用。 如果您...
X 和 Y 应该是维度与 Z 大小匹配的向量或包含最大值的二分量向量和每个的最小值。 该文件将是符合 COARDS 的 NetCDF 文件,这是 GMT 版本 4 及更高版本的标准格式。 基于已编译的基于 mexfile 的函数 grdwrite,GMT...
数据格式可以是二进制,也可以是GRIB码,还可以是NetCDF,从而具有操作简单、功能强大、显示快速、出图类型多样化、图形美观等特点。正因为如此,GRADS已迅速成为国内外气象界通用的标准图形环境之一。
IDL语言读取科学数据格式:netCDF , HDF, GriB 格式的数据, IDL plot函数绘制统计图表