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_fahrenheit' 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
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);'
表示内容での属性の非表示化
ファイル 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"
例: "http://
host_name
/netcdf_filename
#mode=bytes"
location
— 変数またはグループの場所
"/"
(既定値) | string スカラー | 文字ベクトル
netCDF データ ソース内の変数またはグループの場所。string スカラーまたは文字ベクトルとして指定します。ソース全体の内容を表示するには、location
を "/"
(スラッシュ) に設定します。
例: "myVar"
例: "/myGrp/mySubGrp/myNestedVar"
例: "myGrp"
例: "/myGrp/mySubGrp"
dispFormat
— 表示形式
"full"
(既定値) | "min"
表示形式。"full"
または "min"
のいずれかとして指定します。属性を表示するには dispFormat
を "full"
に設定し、属性を非表示にするには dispFormat
を "min"
に設定します。
データ型: string
| char
ヒント
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)