How to combine multi ascii files into one file?

From: Wen.J.Qu <wen.j.qu_at_nyahnyahspammersnyahnyah>
Date: Sun Aug 26 2012 - 16:49:24 MDT

Hi, Mary,

Thank you very much for your excellent functions to deal with my former problems (find the missing days and fill them).

As a new learner of NCL, forgive me that I must ask another preliminary question. I am dealing with this kind of ascii files for 354 stations from 1973 to 2010, and there is an ascii file for each staiton in each year; so I have total 354*38 files.

Attached is an example of the ascii files at one station for the 38 years (1973-2010).

Could you please give me some suggestion that how do deal with these data? Should I combine the data for one station into one ascii file? Or I just to find the exact asciifile for the station in the year when I need to use the data at that station in that year?

Thanks a lot for your kind help in my learning of NCL.

All my best!

Shawn





Wen.J.Qu
2012-08-26



发件人: Mary Haley
发送时间: 2012-08-24 18:30:34
收件人: Wen.J.Qu@gmail.com
抄送: ncl-talk
主题: Re: [ncl-talk] How to check and fill the missing lines with the missing values?

Shawn,


See the attached file.


I pretty much use str_get_field (and not str_get_cols) to read in all your data. I do use "str_get_cols" to parse the yyyymmdd array into yyyy and mm.


This function also creates a new yyyymmdd array that doesn't contain any missing days, and then creates 15 new arrays (for your 15 other fields) that are the same size, with the appropriate indexes filled in.

Received on Sun Aug 26 16:49:30 2012

This archive was generated by hypermail 2.1.8 : Tue Aug 28 2012 - 08:53:45 MDT