Edited at

ncdump > 複数ファイルの処理 > ncdump [複数ファイル] はダメ / xargsもダメ > forで回す

More than 1 year has passed since last update.


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

CentOS 6.8 (64bit)
openmpi-1.8.x86_64 とその-devel
mpich.x86_64 3.1-5.el6とその-devel
gcc version 4.4.7 (とgfortran)

WRF(Weather Research and Forecasting Model)関連。


$ ncdump -h wrfout_d01_2014-11-01_00\:00\:00 | grep Time | head -n 3

Time = UNLIMITED ; // (49 currently)
char Times(Time, DateStrLen) ;
float XLAT(Time, south_north, west_east) ;



参考 http://stackoverflow.com/questions/37083194/for-loop-over-files-to-perform-ncdump

$ ncdump -h wrfout_d0*

ncdump [-c|-h] [-v ...] [[-b|-f] [c|f]] [-l len] [-n name] [-p n[,n]] [-k] [-x] [-s] [-t] [-w] file
[-c] Coordinate variable data and header information
[-h] Header information only, no data
[-v var1[,...]] Data for variable(s) <var1>,... only
[-b [c|f]] Brief annotations for C or Fortran indices in data
[-f [c|f]] Full annotations for C or Fortran indices in data
[-l len] Line length maximum in data section (default 80)
[-n name] Name for netCDF (default derived from file name)
[-p n[,n]] Display floating-point values with less precision
[-k] Output kind of netCDF file
[-x] Output XML (NcML) instead of CDL
[-s] Output special (virtual) attributes
[-t] Output time data as date-time strings
[-w] Without client-side caching of variables for DAP URLs
file Name of netCDF file
netcdf library version 4.1.1 of Jan 30 2014 05:31:22 $



$ for dd in $(ls wrfout_d0*);do ncdump -h $dd | grep Time | head -n 3;done