Binary(이진) data#
- 텍스트 파일: 인간 친화적 데이터
- 이진 파일: 컴퓨터 친화적 데이터
- NetCDF, Grib, HDF5 등 :
이진 파일의 일종으로 컴퓨터 친화적이지만, 인간 친화적이기도 함
Binary format data 읽고 쓰기#
Fortran: binary data 읽고 쓰기

C: binary data 읽고 쓰기

Python: binary data 읽고 쓰기

NetCDF 란?#
NetCDF 응용 프로그램들#
- CDAT (Climate Data Analysis Tool)
- CDO (Climate Data Operators)
- CSIRO MATLAB/netCDF interface
- FERRET
- GDAL (Geospatial Data Abstraction Library)
- GMT (Generic Mapping Tools)
- GrADS (Grid Analysis and Display System)
- HDF (Hierarchical Data Format) interface
- JSON format with the ncdump-json utility
- NCL (NCAR Command Language)
- NCO (NetCDF Operators)
- ncview
- OPeNDAP (formerly DODS)
- OpenDX (formerly IBM Data Explorer)
- Weather and Climate Toolkit (WCT)
- AVS
- IDL Interface
- MATLAB
- …, …, …
Sample NetCDF example#
netcdf simple_xy {
dimensions:
x = 6 ;
y = 12 ;
variables:
int data(x, y) ;
data:
data =
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ;
}Fortran: Simple NetCDF example

C: Simple NetCDF example

from netCDF4 import Dataset NX = 6; NY = 12 file_name = 'simple_xy.nc' with Dataset(file_name, 'w') as fout: fout.createDimension('x', NX) fout.createDimension('y', NY) data = fout.createVariable('data','f',('x','y')) for i in range(NX): for j in range(NY): data[i,j] = i * NY + j print("*** SUCCESS writing : %s"%file_name)- END -


