How to convert multiple text files to netCDF
Added by qikai sun almost 2 years ago
Hello, everyone. I have multiple text files, The file name contains longitude and latitude information, and each file contains daily precipitation from 1961 to 2018. How to convert multiple text files to netCDF? Thanks all.
data_32.2500_95.2500 (145 KB) data_32.2500_95.2500 | |||
data_32.2500_95.5000 (145 KB) data_32.2500_95.5000 | |||
data_32.2500_95.7500 (145 KB) data_32.2500_95.7500 | |||
data_32.2500_96.0000 (145 KB) data_32.2500_96.0000 | |||
data_32.2500_96.2500 (145 KB) data_32.2500_96.2500 | |||
data_32.2500_96.5000 (145 KB) data_32.2500_96.5000 |
Replies (2)
RE: How to convert multiple text files to netCDF - Added by Karin Meier-Fleischer almost 2 years ago
Hi,
CDO can't do it. I recommend to write a Python script to read the ASCII files, get the lon/lat coordinate values, create a time array and combine these into an xarray Dataset that can be written to netCDF.