dealing with the headers in ascii file

From: ahmed lasheen <ahmed4kernel_at_nyahnyahspammersnyahnyah>
Date: Sat Feb 12 2011 - 08:07:17 MST

Hello
I have a ascii file , my problem that i have alot of headers in the file for
each block data in the file
 this is the 1 iteration
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 10.1723 17.2428 22.8950 27.3796 30.6252 32.5209
32.9915 32.0184 29.6447 25.9743 21.1677 15.4353 9.0278
 0.0000
 20.3445 40.6891 58.7990 74.3370 86.6236 95.1213 99.4583
99.4451 95.0822 86.5604 74.2524 58.6966 40.5735 20.6757
10.3379
 this is the 2 iteration
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 2.5431 4.9465 6.9604 8.5850 9.8026 10.5809
10.8931 10.7279 10.0931 9.0169 7.5461 5.7454 3.6933
 0.0000
  0.0000 15.1187 25.4398 33.5292 39.8408 44.3214 46.8380
47.2987 45.6884 42.0790 36.6290 29.5768 21.2309 11.4000
 0.0000
 20.3445 40.6891 58.7990 74.3370 86.6236 95.1213 99.4583
99.4451 95.0822 86.5604 74.2524 58.6966 40.5735 20.6757
10.3379
 this is the 3 iteration
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
 0.0000
  0.0000 0.6358 1.3956 2.0890 2.6685 3.1178 3.4247
 3.5794 3.5768 3.4175 3.1086 2.6637 2.1023 1.4489
 0.0000
  0.0000 5.1752 9.7427 13.4865 16.4496 18.6174 19.9433
20.3873 19.9364 18.6124 16.4740 13.6150 10.1603 5.7523
 0.0000
  0.0000 17.8260 29.9742 39.4096 46.7010 51.8194 54.6299
55.0377 53.0338 48.7089 42.2530 33.9489 24.0207 12.6122
 0.0000
 20.3445 40.6891 58.7990 74.3370 86.6236 95.1213 99.4583
99.4451 95.0822 86.5604 74.2524 58.6966 40.5735 20.6757
10.3379

how can i read the file with ignoring the headers , i have about 100
iteration
i write this code which read only one block without the existance of header
and i wish to enhance it so
that it could read the whole file which include the headers.

* nrows = 15*
* ncols = 15*
*data = asciiread("gauss_1iteration.dat",(/nrows,ncols/),"float")*
*
*
*write_matrix(data,ncols + "f9.4",False) ; Formatted output*
*print(data(14,14))*

-- 
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt
===============

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Feb 12 08:08:05 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 09:43:19 MST