NCLのncl_convert2ncコマンドにより、Grib, Grib2, HDF, HDF-EOSファイルをNetCDFに変換することができる。
>ncl_convert2nc <入力ファイル>
ファイル名は、ファイル形式を識別するsuffixを持っていなければならない。NetCDFなら'.nc'、GRIBなら '.grb'や'.grib'、GRIB2なら '.grb2'や'.grib2'、HDFのSDSデータなら'.hdf'、HDF-EOSなら'.hdfeos'、CCM History Typeなら'.ccm'をsuffixとして持つようにする。 つまり、suffixが書かれていないならばファイル名を変更して追加する。
このコマンドにより変換できたデータ
JRA-25/JCDAS: anl_p
>ncl_convert2nc anl_p.2009071000.grb~
TRMM: 2A12
>ncl_convert2nc 2A12.20100702.71931.7.HDF -v surfaceRain,Longitude,Latitude
以下、英語マニュアルの日本語訳
ncl_convert2nc入力オプション
inputFile(s) 入力データファイルの名前[必須] [ファイル形式: GRIB1 GRIB2 HDF HDF-EOS netCDF shapefile] [-i input_directory] 入力ファイルの場所 [default:カレントディレクトリ] [-o output_directory] 出力ファイルの場所 [default: カレントディレクトリ] [-e extension] extensionで定義されるファイル形式 [example: grb] [-u time_name] NCL-named time dimensionの名前をUNLIMITEDにする [-U new_time_name] -uが指定されると: 新たな変数や次元をUNLIMITEDを指定する [-sed sed1[,...]] GRIBファイルのみ; set single element dimensions [default: none] choices are initial_time, forecast_time, level, ensemble, probability, all, none [-itime] GRIBファイルのみ; set initial time as a single element dimension (same as -sed initial_time) [-ftime] GRIBファイルのみ; set forecast time as a single element dimension (same as -sed forecast_time) [-tps] GRIBファイルのみ; remove suffix representing a time period (e.g. 2h) from statistically processed variables, leaving only type of processing as a suffix (e.g. _acc, _avg) [-v var1[,...]] ユーザー指定の変数subset[default: すべての変数] ncl_filedumpにより変数名を取得できる [-L] 大きなファイルサイズ(>2Gb)の netCDFを許可 [default:大きなファイル不可] [-nc4c] netCDF 4 classic形式ファイルで出力 [-cl compression_level] 圧縮レベル0 - 9 [ default 0 - only meaningful for netCDF 4 output] [-th size_in_megabytes] theshold size: variables larger than specified size will be written incrementally in order to limit in-core memory requirements; 0 (the default) means no threshold [-c comment] netCDF file attributeに含めるtextを追加する [default: コメントなし] [-l] コピーされたそれぞれの変数の情報を画面に表示する [-d] upon exit: print contents of each netCDF file [like ncdump -h] [-B] <file> suppress informational messages; redirect messages to <file> if present [default: /dev/null] [-h] ヘルプメッセージ
Description
ncl_convert2ncは、1つもしくは複数のGRIB1, GRIB2, HDF 4, HDF-EOS 2, HDF-EOS 5, netCDF, and/or shapefile ファイルをnetCDF形式ファイルに変換する. 入力ファイルは、GRIB, HDF, HDF-EOS, HDF-EOS5, shapefile,もしくはnetCDFファイルでなければならない。出力ファイルは、'.nc'extension ('.nc4' if the output file is NetCDF 4)を持たない限り入力ファイルと同じ名前を持たなければならない。それぞれの有効な入力ファイルにより、対応するnetCDF 出力ファイルを作成される。