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

2 visualizzazioni (ultimi 30 giorni)
Naoki Ishibashi
Naoki Ishibashi il 29 Nov 2016
Commentato: Naoki Ishibashi il 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 Commento
michio
michio il 30 Nov 2016
Modificato: michio il 30 Nov 2016
NCfile というのは NetCDFファイルのことでしょうか。対応するドキュメンテーションページはこちら( NetCDF ファイル )になりますが、どういったところでうまくいきませんでしょうか。

Accedi per commentare.

Risposta accettata

KSSV
KSSV il 30 Nov 2016
Modificato: KSSV il 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 Commento
Naoki Ishibashi
Naoki Ishibashi il 30 Nov 2016
Thank you so much. I can read the data sets.

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by