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
— NetCDF データ ソースの名前
string スカラー | 文字ベクトル
NetCDF データ ソースの名前。string スカラーまたは文字ベクトルとして指定します。引数 source
には、次の値のいずれかを指定できます。
ローカルの NetCDF ソースのパス
リモートの OPeNDAP NetCDF データ ソースの OPeNDAP URL
リモートの NetCDF ソースの HTTP URL。その URL の末尾に
#mode=bytes
を付け加えてバイト範囲読み取りを有効にするメモ
バイト範囲読み取りは、他のソースからの読み取りよりも遅くなります。バイト範囲読み取りの詳細については、NetCDF のドキュメンテーションを参照してください。
例: "myNetCDFfile.nc"
location
— 変数またはグループの場所
'/'
(既定値) | 文字ベクトル | string スカラー
NetCDF ファイル内の変数またはグループの場所。文字ベクトルまたは string スカラーとして指定します。文字列として指定します。ファイルの内容全体を表示するには、location
を '/'
(スラッシュ) に設定します。
データ型: char
| string
dispFormat
— 表示形式
'full'
(既定値) | 'min'
表示形式。次の値のいずれかとして指定します。
'full' | グループ階層を次元、属性、および変数定義とともに表示 |
'min' | グループ階層と変数定義を表示 |
データ型: char
| string
制限
バイト範囲読み取りのパフォーマンスは、他のソースからの読み取りよりも遅くなります。
ヒント
source
が制約式をもつ OPeNDAP URL である場合は、他の入力引数を指定せずに構文ncdisp(source)
を使用します。
バージョン履歴
R2011a で導入R2022a: リモート データセットのバイト範囲読み取り
リモート サーバーがバイト範囲アクセスをサポートしている場合、リモート データセットへの読み取り専用のアクセスに ncdisp
を使用して、HTTP バイト範囲機能を使用できます。
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)