begin ; ; Read an ASCII file. The file "oceanland30e.asc" contains a single ; column of integers, 16471 of them. The function "asciiread" allows ; you to specify the dimensionality of the data, and in this case we ; are passing dimensions (/91,181/), so "ocean1" will be a 2-dimensional ; array dimensioned 91 x 181, which can be verified by printing the ; dimsizes of "ocean1." ; filedir = ncargpath("data") ocean1 = asciiread(filedir + "/asc/oceanland30e.asc",(/91,181/),"integer") print(dimsizes(ocean1)) ; ; Write out part of "ocean1" to a new ASCII file. "data.asc" will contain ; 15 integers, since (7:3:2,0:4) is a 3 x 5 array. ; asciiwrite("data.asc",ocean1(7:3:2,0:4)) end