Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Naoki Ishibashi
Naoki Ishibashi le 29 Nov 2016
Commenté : Naoki Ishibashi le 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 commentaire
michio
michio le 30 Nov 2016
Modifié(e) : michio le 30 Nov 2016
NCfile というのは NetCDFファイルのことでしょうか。対応するドキュメンテーションページはこちら( NetCDF ファイル )になりますが、どういったところでうまくいきませんでしょうか。

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 30 Nov 2016
Modifié(e) : KSSV le 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 commentaire
Naoki Ishibashi
Naoki Ishibashi le 30 Nov 2016
Thank you so much. I can read the data sets.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by