Edited at

NetCDF / NCL > dimsizes(smat) > smatの各次元の大きさを返す

More than 1 year has passed since last update.


動作環境

Xeon E5-2620 v4 (8コア) x 2

32GB RAM
CentOS 6.8 (64bit)
openmpi-1.8.x86_64 とその-devel
mpich.x86_64 3.1-5.el6とその-devel
gcc version 4.4.7 (とgfortran)
NCAR Command Language Version 6.3.0

NetCDFファイルを描画するためのNCLについて。

NCAR Command Language (NCL)。

http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm

N次元arrayに対してdimsizes()を使うことで、各次元の大きさが分かる。


ncl05.nc

begin

smat = (/ (/ "zun","zun" /),(/ "zun","zun" /), (/ "doko","KIYOSHI!" /) /)
print( dimsizes(smat) )
end


結果

$ ncl ncl05.nc 

Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
(0) 3
(1) 2