roms netcdf结构体用法(弃用)
RNT工具包中的netcdf结构体函数,其中采用了面向对象的编程方法,递归方法,可以大大简化netcdf读写时的语法,使用不仅限于roms模式,其他netcdf的读写也比较方便,依赖库包括RNT中的netcdf包,以及mexcdf库
function self = netcdf(theFilename, thePermission)% netcdf/netcdf -- Constructor for netcdf class.
%
% netcdf (no arguments) shows extensive "help".
% netcdf('version') shows the present version number.
%
% netcdf('theFilename', 'thePermission') creates and/or
% opens 'theFilename' if 'thePermission' is one of
% {'clobber', 'noclobber', 'write', 'nowrite'} or a
% unique abbreviation thereof. The "netcdf" object
% is assigned silently to "ans" if no output argument
% is provided.
%
% netcdf('thePermission') invokes Matlab's "uiputfile"
% or "uigetfile" dialog for selecting the file to create
% or open, respectively, depending on 'thePermission'
% (default = 'nowrite' if possible, then 'noclobber').
%
% netcdf('random') creates a NetCDF file with a unique,
% random name, suitable for use as a temporary file.
%
% self = netcdf (no argument) calls "netcdf('nowrite')",
% which invokes matlab's "uigetfile" dialog. The returned
% "self" is the "netcdf" object that was opened.
%
% netcdf(theNCid) returns a "netcdf" object corresponding
% to theNCid of an open NetCDF file. This function does
% not re-open the file. TheNCid is the formal identifi
% <<<<<<<<<< Language Synopsis of the NetCDF Toolbox >>>>>>>>>>
%
% [...] denotes default value.
%
% Create or open a NetCDF file:
% f = netcdf('myNetCDF.nc', 'clobber | noclobber')
% f = netcdf('myNetCDF.nc', 'write | [nowrite]')
% where f is the returned "netcdf" object.
% f = netcdf('clobber | noclobber') for "uiputfile" dialog.
% f = netcdf('write | [nowrite]') for "uigetfile" dialog.
% f = netcdf('random') to create a randomly named file.
%
% Define a NetCDF global attribute:
% f.myGlobalAttribute = [myGlobalAttributeDoubleData]
% f.myGlobalAttribute = 'myGlobalAttributeCharData'
% f.myGlobalAttribute = nctype(myGlobalAttributeData)
% where nctype = [ncdouble] | ncfloat | nclong | ...
% ncint | ncshort | ncbyte | [ncchar]
% (N.B. default depends on context.)
% (See "NetCDF User's Guide" for datatype definitions.)
%
% f.myGlobalAttribute = [] deletes the attribute.
% g = f.myGlobalAttribute is the object.
% g(:) = [] deletes the attribute.
%
% Define a NetCDF record-dimension:
% f('myRecordDimension') = 0 defines a record-dimension.
% f('myRecordDimension') = [] deletes the dimension.
% r = f('myRecordDimension') is the object.
% f.myGlobalAttribute = [myGlobalAttributeDoubleData]
% f.myGlobalAttribute = 'myGlobalAttributeCharData'
% f.myGlobalAttribute = nctype(myGlobalAttributeData)
% where nctype = [ncdouble] | ncfloat | nclong | ...
% ncint | ncshort | ncbyte | [ncchar]
% (N.B. default depends on context.)
% (See "NetCDF User's Guide" for datatype definitions.)
%
% f.myGlobalAttribute = [] deletes the attribute.
% g = f.myGlobalAttribute is the object.
% g(:) = [] deletes the attribute.
%
% Define a NetCDF record-dimension:
% f('myRecordDimension') = 0 defines a record-dimension.
% f('myRecordDimension') = [] deletes the dimension.
% r = f('myRecordDimension') is the object.
% r(:) = [] deletes the dimension.
% r(:) = newSize resizes the dimension.
%
% Define a NetCDF dimension:
% f('myDimension') = myDimensionLength
% f('myDimension') = [] deletes the dimension.
% d = f('myDimension') is the object.
% d(:) = [] deletes the dimension.
% d(:) = newSize resizes the dimension.
% isrecdim(d) determines whether d is the record-dimension.
% iscoord(v) determines whether d is a coordinate-dimension.
%
% Define a NetCDF variable:
% f{'myVariable'} = nctype(myRecordDimension, myDimension, ...)
% f{'myVariable'} = nctype(myDimension, ...)
% f{'myVariable'} = nctype(r, d, ...)
% f{'myVariable'} = nctype(d, ...)
% f('myVariable') = [] deletes the variable.
% v = f{'myVariable'} returns the object.
% v = f{'myVariable', 1} returns the object -- auto-scaling enabled.
% v(:) = [] deletes the variable.
% iscoord(v) determines whether v is a coordinate-variable.
% isscalar(v) determines whether v is a scalar-variable.
% d(:) = newSize resizes the dimension.
% isrecdim(d) determines whether d is the record-dimension.
% iscoord(v) determines whether d is a coordinate-dimension.
%
% Define a NetCDF variable:
% f{'myVariable'} = nctype(myRecordDimension, myDimension, ...)
% f{'myVariable'} = nctype(myDimension, ...)
% f{'myVariable'} = nctype(r, d, ...)
% f{'myVariable'} = nctype(d, ...)
% f('myVariable') = [] deletes the variable.
% v = f{'myVariable'} returns the object.
% v = f{'myVariable', 1} returns the object -- auto-scaling enabled.
% v(:) = [] deletes the variable.
% iscoord(v) determines whether v is a coordinate-variable.
% isscalar(v) determines whether v is a scalar-variable.
%
% Define a NetCDF attribute:
% f{'myVariable'}.myAttribute = [myAttributeDoubleData]
% f{'myVariable'}.myAttribute = 'myAttributeCharData'
% f{'myVariable'}.myAttribute = nctype(myAttributeData)
% f{'myVariable'}.myAttribute = [] deletes the attribute.
% v.myAttribute = [myAttributeDoubleData]
% v.myAttribute = 'myAttributeCharData'
%
% Define a NetCDF attribute:
% f{'myVariable'}.myAttribute = [myAttributeDoubleData]
% f{'myVariable'}.myAttribute = 'myAttributeCharData'
% f{'myVariable'}.myAttribute = nctype(myAttributeData)
% f{'myVariable'}.myAttribute = [] deletes the attribute.
% v.myAttribute = [myAttributeDoubleData]
% v.myAttribute = 'myAttributeCharData'
% v.myAttribute = nctype(myAttributeData)
% v.myAttribute = [] deletes the attribute.
% a = f{'myVariable'}.myAttribute is the object.
% a = v.myAttribute is the object.
% a(:) = [] deletes the attribute.
%
% Store and retrieve NetCDF variable data:
% f{'myVariable'}(i, j, ...) = myVariableData
% f{'myVariable', 1}(i, j, ...) = myVariableData -- auto-scaling enabled.
% v(i, j, ...) = myVariableData
% myVariableData = f{'myVariable'}(i, j, ...)
% myVariableData = f{'myVariable', 1}(i, j, ...) -- auto-scaling enabled.
% myVariableData = v(i, j, ...)
%
% Store and retrieve NetCDF attribute data: (always a row vector)
% f.myGlobalAttribute(i) = myGlobalAttributeData
% g(i) = myGlobalAttributeData
% f{'myVariable'}.myAttribute(i) = myAttributeData
% v.myAttribute(i) = myAttributeData
% a(i) = myAttributeData
% myGlobalAttributeData = f.myGlobalAttribute(i)
% myGlobalAttributeData = g(i)
% myAttributeData = f{'myVariable'}.myAttribute(i)
% myAttributeData = v.myAttribute(i)
% myAttributeData = a(i)
% EXCEPTION: v.FillValue_ references the "_FillValue" attribute.
% Use the "fillval(v, ...)" method to avoid confusion.
%
% Store and retrieve NetCDF record data:
% s = f(0) returns the object.
% t = s(0) returns the record template as a struct.
% u = r(i) returns the i-th record data as a struct.
% d = f('myDimension') is the object.
% d(:) = [] deletes the dimension.
% d(:) = newSize resizes the dimension.
% isrecdim(d) determines whether d is the record-dimension.
% iscoord(v) determines whether d is a coordinate-dimension.
%
% Define a NetCDF variable:
% f{'myVariable'} = nctype(myRecordDimension, myDimension, ...)
% f{'myVariable'} = nctype(myDimension, ...)
% f{'myVariable'} = nctype(r, d, ...)
% f{'myVariable'} = nctype(d, ...)
% f('myVariable') = [] deletes the variable.
% v = f{'myVariable'} returns the object.
% v = f{'myVariable', 1} returns the object -- auto-scaling enabled.
% v(:) = [] deletes the variable.
% iscoord(v) determines whether v is a coordinate-variable.
% isscalar(v) determines whether v is a scalar-variable.
%
% Define a NetCDF attribute:
% f{'myVariable'}.myAttribute = [myAttributeDoubleData]
% f{'myVariable'}.myAttribute = 'myAttributeCharData'
% f{'myVariable'}.myAttribute = nctype(myAttributeData)
% f{'myVariable'}.myAttribute = [] deletes the attribute.
% v.myAttribute = [myAttributeDoubleData]
% v.myAttribute = 'myAttributeCharData'
% v.myAttribute = nctype(myAttributeData)
% v.myAttribute = [] deletes the attribute.
% a = f{'myVariable'}.myAttribute is the object.
% a = v.myAttribute is the object.
% a(:) = [] deletes the attribute.
%
% Store and retrieve NetCDF variable data:
% f{'myVariable'}(i, j, ...) = myVariableData
% f{'myVariable', 1}(i, j, ...) = myVariableData -- auto-scaling enabled.
% v(i, j, ...) = myVariableData
% myVariableData = f{'myVariable'}(i, j, ...)
% myVariableData = f{'myVariable', 1}(i, j, ...) -- auto-scaling enabled.
% myVariableData = v(i, j, ...)
%
% Store and retrieve NetCDF attribute data: (always a row vector)
% f.myGlobalAttribute(i) = myGlobalAttributeData
% g(i) = myGlobalAttributeData
% f{'myVariable'}.myAttribute(i) = myAttributeData
% v.myAttribute(i) = myAttributeData
% a(i) = myAttributeData
% myGlobalAttributeData = f.myGlobalAttribute(i)
% myGlobalAttributeData = g(i)
% netcdf(theNCid) returns a "netcdf" object corresponding
% to theNCid of an open NetCDF file. This function does
% not re-open the file. TheNCid is the formal identification
% number that would be returned ordinarily by a call to the
% NetCDF "nccreate" or "ncopen" function.
%
% Other permissions: The word 'readonly' is a synonym for 'nowrite'.
% The word 'define' can be used to open an existing file in 'define'
% mode, although this is not strictly necessary, since the "NetCDF
% Toolbox" switches context automatically, as needed.
%
% <<<<<<<<<< Language Synopsis of the NetCDF Toolbox >>>>>>>>>>
%
% [...] denotes default value.
%
% Create or open a NetCDF file:
% f = netcdf('myNetCDF.nc', 'clobber | noclobber')
% f = netcdf('myNetCDF.nc', 'write | [nowrite]')
% where f is the returned "netcdf" object.
% f = netcdf('clobber | noclobber') for "uiputfile" dialog.
% f = netcdf('write | [nowrite]') for "uigetfile" dialog.
% f = netcdf('random') to create a randomly named file.
%
% Define a NetCDF global attribute:
% f.myGlobalAttribute = [myGlobalAttributeDoubleData]
% f.myGlobalAttribute = 'myGlobalAttributeCharData'
% f.myGlobalAttribute = nctype(myGlobalAttributeData)
% where nctype = [ncdouble] | ncfloat | nclong | ...
% ncint | ncshort | ncbyte | [ncchar]
% (N.B. default depends on context.)
% (See "NetCDF User's Guide" for datatype definitions.)
%
% f.myGlobalAttribute = [] deletes the attribute.
% g = f.myGlobalAttribute is the object.
% g(:) = [] deletes the attribute.
%
% Define a NetCDF record-dimension:
% f('myRecordDimension') = 0 defines a record-dimension.
% f('myRecordDimension') = [] deletes the dimension.
% r = f('myRecordDimension') is the object.
% r(:) = [] deletes the dimension.
% r(:) = newSize resizes the dimension.
%
% Define a NetCDF dimension:
% f('myDimension') = myDimensionLength
% f('myDimension') = [] deletes the dimension.
% d = f('myDimension') is the object.
% d(:) = [] deletes the dimension.
% d(:) = newSize resizes the dimension.
% isrecdim(d) determines whether d is the record-dimension.
% iscoord(v) determines whether d is a coordinate-dimension.
%
% Define a NetCDF variable:
% f{'myVariable'} = nctype(myRecordDimension, myDimension, ...)
% f{'myVariable'} = nctype(myDimension, ...)
% f{'myVariable'} = nctype(r, d, ...)
% f{'myVariable'} = nctype(d, ...)
% f('myVariable') = [] deletes the variable.
% v = f{'myVariable'} returns the object.
% v = f{'myVariable', 1} returns the object -- auto-scaling enabled.
% v(:) = [] deletes the variable.
% iscoord(v) determines whether v is a coordinate-variable.
% isscalar(v) determines whether v is a scalar-variable.
%
% Define a NetCDF attribute:
function self = netcdf(theFilename, thePermission)% netcdf/netcdf -- Constructor for netcdf class.
%
% netcdf (no arguments) shows extensive "help".
% netcdf('version') shows the present version number.
%
% netcdf('theFilename', 'thePermission') creates and/or
% opens 'theFilename' if 'thePermission' is one of
% {'clobber', 'noclobber', 'write', 'nowrite'} or a
% unique abbreviation thereof. The "netcdf" object
% is assigned silently to "ans" if no output argument
% is provided.
%
% netcdf('thePermission') invokes Matlab's "uiputfile"
% or "uigetfile" dialog for selecting the file to create
% or open, respectively, depending on 'thePermission'
% (default = 'nowrite' if possible, then 'noclobber').
%
% netcdf('random') creates a NetCDF file with a unique,
% random name, suitable for use as a temporary file.
% Copyright (C) 1996-7 Dr. Charles R. Denham, ZYDECO.
% All Rights Reserved.
% Disclosure without explicit written consent from the
% copyright owner does not constitute publication.
注意permission中的clobber是覆盖的意思
roms netcdf结构体用法(弃用)相关推荐
- 语言取10的整数倍_C语言结构体用法很多,坑也很多
C语言可谓是编程界的传奇语言,历经几十年,依然排名前列. 前不久还写了一篇文章<2019年11月C语言接近Java>,说了C语言是比较受欢迎的一种语言,有望在年底超过JAVA,再次成为第一 ...
- C语言结构体用法很多,坑也很多
作者:strongerHuang 公众号:strongerHuang C语言可谓是编程界的传奇语言,历经几十年,依然排名前列. 本文主要说的是C语言中的结构体,结构体是C语言中重要的一部分内容,也是C ...
- c语言结构体错误,C语言结构体用法很多,但是坑也很多
C语言可谓是编程界的传奇语言,历经几十年,依然排名前列. 前不久还写了一篇文章<2019年11月C语言接近Java>,说了C语言是比较受欢迎的一种语言,有望在年底超过JAVA,再次成为第一 ...
- matlab gui更新结构体,Matlab GUI教程0x5 -handles结构体用法简介
在本节教程中,我们将讨论什么handles结构体,以及如何使用set/get命令.如果您压根没有接触过GUI编程,建议您先看下这篇文章http://www.matlabsky.com/thread-5 ...
- 二叉树链表结构表示法
二叉树链表的结构声明: struct tree { int data; struct tree *left; stryct tree *right; }; typedef struct tree t ...
- VTK:截锥体用法实战
VTK:截锥体用法实战 程序输出 程序完整源代码 程序输出 程序完整源代码 #include <vtkActor.h> #include <vtkCamera.h> #i
- VTK:绘制截锥体用法实战
VTK:绘制截锥体用法实战 程序输出 程序完整源代码 程序输出 程序完整源代码 #include <vtkClipPolyData.h> #include <vtkFrustumSo ...
- 结构之法算法之道CSDN博客-第一期全部博文集锦[CHM 文件下载]
结构之法算法之道CSDN博客- 博文集锦第一期CHM 文件 首先恭喜你,你得到了一份非常宝贵的资源. 此份文件是截止到2011年2月27日,本博客.结构之法算法之道博客内的第一期全部内容的集锦,同时, ...
- 从决策树学习谈到贝叶斯分类算法、EM、HMM - 结构之法 算法之道
转载自:http://scm.zoomquiet.io/data/20121220000040/index.html 第一篇:从决策树学习谈到贝叶斯分类算法.EM.HMM (Machine Learn ...
- 编程之美-第3章 结构之法
3.1. 字符串移位包含问题 方法1: 分别对字符串进行循环移1位,2位,3位-,来判断给定的字符串是否是其中一个字串. 复杂度是O(n^3) 方法2: 这也是一种利用空间换时间的方法. 代码如下, ...
最新文章
- Openpose+Tensorflow 这样实现人体姿态估计 | 代码干货
- XML之父从愤然亚马逊离职,放弃百万年薪,谷歌华为争抢
- 不是《归去来》是《难念的经》
- Qt中的QLineEdit、QTextEdit、QPlainTextEdit
- java用beaninfo_java 可以使用BeanInfo实现bean实体与map之间的互相转换
- 将NetBeans代码模板弯曲到我的意愿
- 力扣合并两个有序数组
- LeetCode 270. 最接近的二叉搜索树值
- python tcl smb_Python——操作smb文件服务器(上传和下载)
- linux fread 头文件,Linux文件操作
- 群晖NAS教程(十三)、利用Web Station安装wordpress博客
- 测试用例--等价类划分、边界值法
- 自动化专业向往硬件方面靠,有什么好的建议?
- 2021年社招字节跳动测试开发工程师面试题
- Scrum敏捷开发实践
- excel转置怎么操作_收藏!Excel表格常见问题,超详细的解决方案
- 有刷电机与无刷电机的接线方法(淘宝一卖家写的很好,厚实的实践经验)
- 【软件相关】win10自带软件“画图”的妙用
- Golang的基础数据类型
- 朋友圈宣传文案 朋友圈产品推广文案模板怎么写?
热门文章
- 人脸识别+表情识别系统
- java版精简搜狗皮肤
- 用Python完成毫秒级抢单,助你秒杀淘宝大单
- 入侵WIN2003 PHP服务器的另类技术
- 与计算机博弈相关的学术论文,爱恩斯坦棋计算机博弈系统的研究与实现计算机应用技术专业论文.docx...
- 哇!家居环境居然能“可视化”?这守护真的牛
- Ubuntu 分卷压缩
- repo命令无法从gooole的网站下载问题解决办法
- centos7 开机自动启动程序
- pytorch的两个函数 .detach() .detach_() 的作用和区别