(Tips) NetCDFのGlobal Attributeの値を取得する
作成者:山本 博基
概要
NetCDFファイルに格納されたGlobal Attributeの値を取得する。
サンプルコード
Global Attribute の planetary_rotation_rate の値を取得して定数 Omega に格納する。
require "numru/netcdf"
include NumRu
nc = NetCDF.open(ARGV[0])  #NetCDFファイルのオープン 
Omega = nc.att("planetary_rotation_rate").get  #Global Attributeの値の取得 
puts Omega[0]
- Omega は要素数 1 の NArray オブジェクトになる。
 
キーワード:[NetCDF] [Global Attribute]
参照: