NCfileからデータを読み取る方法

1 Ansicht (letzte 30 Tage)
Naoki Ishibashi
Naoki Ishibashi am 29 Nov. 2016
Kommentiert: Naoki Ishibashi am 30 Nov. 2016
NCfileからデータ(144×73)を取り出したいのですがうまくいかず、ご存知の方いらしましたら教えて頂きたいです。 以下ファイルの内容です
Format:
64bit
Global Attributes:
Conventions = 'CF-1.6'
history = '2016-11-29 01:21:46 GMT by grib_to_netcdf-1.18.0: grib_to_netcdf /data/data01/scratch/_mars-atls12-95e2cf679cd58ee9b4db4dd119a05a8d-_AeKWY.grib -o /data/data01/scratch/_grib2netcdf-atls05-95e2cf679cd58ee9b4db4dd119a05a8d-P98U21.nc -utime'
Dimensions:
longitude = 144
latitude = 73
time = 1 (UNLIMITED)
Variables:
longitude
Size: 144x1
Dimensions: longitude
Datatype: single
Attributes:
units = 'degrees_east'
long_name = 'longitude'
latitude
Size: 73x1
Dimensions: latitude
Datatype: single
Attributes:
units = 'degrees_north'
long_name = 'latitude'
time
Size: 1x1
Dimensions: time
Datatype: int32
Attributes:
units = 'hours since 1900-01-01 00:00:0.0'
long_name = 'time'
calendar = 'gregorian'
u10
Size: 144x73x1
Dimensions: longitude,latitude,time
Datatype: int16
Attributes:
scale_factor = 0.00028942
add_offset = 0.63856
_FillValue = -32767
missing_value = -32767
units = 'm s**-1'
long_name = '10 metre U wind component'
  1 Kommentar
michio
michio am 30 Nov. 2016
Bearbeitet: michio am 30 Nov. 2016
NCfile というのは NetCDFファイルのことでしょうか。対応するドキュメンテーションページはこちら( NetCDF ファイル )になりますが、どういったところでうまくいきませんでしょうか。

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 30 Nov. 2016
Bearbeitet: KSSV am 30 Nov. 2016
myncfile = 'yourncfile' ; % your nc file with extension .nc
lon = ncread(myncfile,'longitude') ; % read longiutde
lat = ncread(myncfile,'latitude') ; % rea dlatitude
time = ncread(myncfile,'time') ; % get time
u10 = ncread(myncfile,'u10') ; % get variable u10
  1 Kommentar
Naoki Ishibashi
Naoki Ishibashi am 30 Nov. 2016
Thank you so much. I can read the data sets.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by