[ncl-talk] bifurcation of multiple files

Rashed Mahmood rashidcomsis at gmail.com
Sat Jul 25 16:00:42 MDT 2020


Hi Geeta,
I think the error in your writing table line is because you wrote  (test)
which should be inside double quotes "test" for a string, unless you have
defined test as variable name somewhere before that line.

However, I am not sure if that would solve your issue of separating files.
The easiest solution is that you remove the write_table line and add the
following line:

                     system("cp "+flnm(II)+ "
*/mnt/c/work/raf_figs/new_data/*")

This would copy the files for which your if statement is true to an output
directory. You would need to change the output path in the above line shown
in red.

HTH,

Rashed



On Wed, Jul 22, 2020 at 6:56 PM Geeta Geeta via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hi
> I have data of thunderstorm days (TS) (5000) for a station for example
> 1983 05 26
> 1985 05 14
> 1985 05 15
> 1985 05 27
> 1985 05 30
> 1985 05 31
> 1986 05 01
> Pls note that there are about 5-6 days of thunderstorm in a month but
> upper air data is for the entire month
>
> I also have the radio-sonde data for the entire month into separate files
> (jul95_10.out). which look like
> -rw-rw-r-- 1 aditya aditya 1235 Jul 21 23:21 jun85_4.out
> -rw-rw-r-- 1 aditya aditya 2687 Jul 21 23:21 jun85_5.out
> -rw-rw-r-- 1 aditya aditya 2324 Jul 21 23:21 jun85_6.out
> -rw-rw-r-- 1 aditya aditya 2566 Jul 21 23:21 jun85_7.out
> -rw-rw-r-- 1 aditya aditya 1961 Jul 21 23:21 jun85_8.out
> -rw-rw-r-- 1 aditya aditya 2445 Jul 21 23:21 jun85_9.out
> -rw-rw-r-- 1 aditya aditya 3655 Jul  6 20:27 sep95_10.out
> -rw-rw-r-- 1 aditya aditya 3171 Jul  6 20:27 sep95_11.out
> -rw-rw-r-- 1 aditya aditya 3534 Jul  6 20:27 sep95_12.out
>
> Now I have to separate the ?????_*.out into two separate files one
> corresponding to Thunderstorm (TS) day and into Non TS day depending on the
> file filelist.ts.txt (which contains days of thunderstorm).
>
> the code compares the dates of two files, if two files have same date then
> I want to write the entire file either into another directory or give it a
> different extension.  basically problem is coming in line 87.
>
> I am unable to do this part. can someone provide the hints.
>
> thank you for this
> Geeta._______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200726/13feb497/attachment.html>


More information about the ncl-talk mailing list