ncdisp
コマンド ウィンドウに NetCDF データ ソースの内容を表示する
説明
例
NetCDF ファイルの内容の表示
サンプルの NetCDF ファイル example.nc
の内容を表示します。
ncdisp('example.nc')
Source: matlabroot\toolbox\matlab\demos\example.nc Format: netcdf4 Global Attributes: creation_date = '29-Mar-2010' Dimensions: x = 50 y = 50 z = 5 Variables: avagadros_number Size: 1x1 Dimensions: Datatype: double Attributes: description = 'this variable has no dimensions' temperature Size: 50x1 Dimensions: x Datatype: int16 Attributes: scale_factor = 1.8 add_offset = 32 units = 'degrees_fahrenheight' peaks Size: 50x50 Dimensions: x,y Datatype: int16 Attributes: description = 'z = peaks(50);' Groups: /grid1/ Attributes: description = 'This is a group attribute.' Dimensions: x = 360 y = 180 time = 0 (UNLIMITED) Variables: temp Size: [] Dimensions: x,y,time Datatype: int16 /grid2/ Attributes: description = 'This is another group attribute.' Dimensions: x = 360 y = 180 time = 0 (UNLIMITED) Variables: temp Size: [] Dimensions: x,y,time Datatype: int16
MATLAB® は、example.nc
のすべてのグループ、次元および変数定義を表示します。
NetCDF 変数の内容の表示
ファイル example.nc
の変数 peaks
の内容を表示します。
ncdisp('example.nc','peaks')
Source: matlabroot\toolbox\matlab\demos\example.nc Format: netcdf4 Dimensions: x = 50 y = 50 Variables: peaks Size: 50x50 Dimensions: x,y Datatype: int16 Attributes: description = 'z = peaks(50);'
NetCDF ファイルの内容の表示と属性の非表示
サンプル ファイル example.nc
のグループ階層および変数定義のみを表示します。
ncdisp('example.nc','/','min')
Source: matlabroot\toolbox\matlab\demos\example.nc Format: netcdf4 Variables: avagadros_number Size: 1x1 Dimensions: Datatype: double temperature Size: 50x1 Dimensions: x Datatype: int16 peaks Size: 50x50 Dimensions: x,y Datatype: int16 Groups: /grid1/ Variables: temp Size: [] Dimensions: x,y,time Datatype: int16 /grid2/ Variables: temp Size: [] Dimensions: x,y,time Datatype: int16
入力引数
source
— ソース名
文字ベクトル | string スカラー
ソース名。NetCDF ファイルの名前、OPeNDAP NetCDF データ ソースの URL、またはバイト範囲読み取り用のリモート netCDF ファイルの HTTP URL を含む、文字ベクトルまたは string スカラーとして指定します。リモート データセットのバイト範囲読み取りを有効にするには、HTTP URL の末尾に #mode=bytes
を追加します。バイト範囲読み取りの詳細については、NetCDF のドキュメンテーションを参照してください。
例: "myNetCDFfile.nc"
データ型: char
| string
location
— 変数またはグループの場所
'/'
(既定値) | 文字ベクトル | string スカラー
NetCDF ファイル内の変数またはグループの場所。文字ベクトルまたは string スカラーとして指定します。文字列として指定します。ファイルの内容全体を表示するには、location
を '/'
(スラッシュ) に設定します。
データ型: char
| string
dispFormat
— 表示形式
'full'
(既定値) | 'min'
表示形式。次の値のいずれかとして指定します。
'full' | グループ階層を次元、属性、および変数定義とともに表示 |
'min' | グループ階層と変数定義を表示 |
データ型: char
| string
制限
バイト範囲読み取りのパフォーマンスは、他のソースからの読み取りよりも遅くなります。
ヒント
source
が制約式をもつ OPeNDAP URL である場合は、他の入力引数を指定せずに構文ncdisp(source)
を使用します。
バージョン履歴
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)