NCfileからデータを読み取る方法
조회 수: 2 (최근 30일)
이전 댓글 표시
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'
채택된 답변
KSSV
2016년 11월 30일
편집: KSSV
2016년 11월 30일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NetCDF에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!