[ncl-talk] Joing two uneven files.

Geeta Geeta geetag54 at yahoo.com
Sat Sep 24 09:06:16 MDT 2016


Hi all. I request for some help. 
I have two files which look like this. 
aditya at agniilap:~/geeta/ncl/ReadHDF-2A25$ ls -lrt 11n67* Z.txt.20080324.70-rw-rw-r-- 1 aditya aditya  760240 Sep 16 21:57 Z.txt.20080324.70   (17680 Lines)-rw-rw-r-- 1 aditya aditya 5430095 Sep 24 01:17 11n67                     (18326 Lines)
File 11n67 is like this...Line No  NS  NPix  ZLev11   .......................Zlev67 1 2915    0       0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00      2 2915    1       0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00      3 2915    2       0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00      4 2915    3       0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00                        




18326 3288    48      0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

 Z.txt.20080324.70 Looks like this. Line No      NS            NPix     Lev    Z17659        3288         27         70     0.00  17660        3288         28         70     0.00  17661        3288         29         70     0.00  17662        3288         30         70     0.00  17663        3288         31         70     0.00  17664        3288         32         70     0.00  17665        3288         33         70     0.00  17666        3288         34         70     0.00  17667        3288         35         70     0.00  17668        3288         36         70     0.00  17669        3288         37

I have to append the value of Z from the 2nd file at one point (say 3288/35) to the same point in the first file. I used if statement, but I am not able to get what I desired (Code attached). 
I want the file 11n67 to be appended with value of Z from 2nd file at the common points. 
ThanksGeeta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160924/44cb78a3/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Z.txt.20080324.70
Type: application/octet-stream
Size: 760240 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160924/44cb78a3/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: join.ncl
Type: application/octet-stream
Size: 1900 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160924/44cb78a3/attachment-0003.obj 


More information about the ncl-talk mailing list