numpy - How to read/extract climate model data in .asc file format by using Python? -


i have downloaded global climate model data opensource website. but, these data in .asc file format. how read/extract these data using python? in numpy?

.asc means chose ascii grid download option ccafs. these simple text files 6 line header containing geographic information.

if want load data numpy array can use loadtxt function. have skip first 6 rows contain header.

import numpy np ascii_grid = np.loadtxt("bio_1.asc", skiprows=6) 

if want preserve geographic information in ascii grid while working in python there tutorial joel lawhead on @ geospatial python.


Comments