Re: sorting out the files

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 27 2010 - 16:06:54 MDT

Hi Prabhakar,

One solution would be to create a file with just the names of the HDF
files arranged in the order you want:

3B42.090609.0.6A.HDF
3B42.090609.3.6A.HDF
3B42.090609.6.6A.HDF
3B42.090609.12.6A.HDF
3B42.090609.15.6A.HDF
3B42.090609.18.6A.HDF
3B42.090609.21.6A.HDF

You could use
ls -1 *.HDF > input_hdf_files

to get the initial list, and then rearrange it manually into the
correct order. Then instead of doing "ls" as the systemfunc command,
you could say:

infiles = systemfunc("cat input_hdf_files")

Hope this helps,
  -dave

On Apr 27, 2010, at 3:26 PM, p s wrote:

> Hi,
> I am trying to read multipled 3B42 hdf 3hourly files and write it
> out as a single netcdf file. The problem I am coming across is due
> to the way the HDF filenames are:
>
>
> 3B42.090609.0.6A.HDF
> 3B42.090609.12.6A.HDF
> 3B42.090609.15.6A.HDF
> 3B42.090609.18.6A.HDF
> 3B42.090609.21.6A.HDF
> 3B42.090609.3.6A.HDF
> 3B42.090609.6.6A.HDF
>
>
>
> When I use systemfunc to list the files and read in, they do not
> appear in sequential time order, like 0, 3, 6, 15, 18, 21 because of
> the size of hr array in filename
> so the data is stored in netcdf in different time order (0, 12, 15,
> 18, 21, 3, 6), which I want to correct.
>
> Could you please kindly help me to sort out this issue.
>
> Regards,
> Prabhakar
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 27 16:06:59 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT