[ncl-talk] unable to open multiple files

Dennis Shea shea at ucar.edu
Mon Nov 23 12:01:38 MST 2015


Please do not start a new thread. Use the 'reply all' to keep all
emails together

====

[1]
Note what I suggested

      trmm_files    = systemfunc("ls 3B42_daily.20*.nc")

I did *not* use

     trmm_files    = systemfunc("ls -l 3B42_daily.20*.nc")

the '-l' returns much more information than just the file names.

===

[2]
Had you informed ncl-talk that you wanted data for 2011 and the file names are

3B42_daily.2011.04.22.7.nc  3B42_daily.2014.06.05.7.nc
3B42_daily.2013.05.22.7.nc  3B42_daily.2015.04.23.7.nc
3B42_daily.2014.06.02.7.nc

Then

    trmm_files    = systemfunc("ls 3B42_daily.2011*.nc")

 would have been suggested. Note: no  '-l'

[3]
I did *not* use
     nfiles        = ListCount(trmm)
but this should return the same as
     nfiles = dimsizes(trmm_files)

[4]

re:  "In the printVarSummary, I dont get the time info of each file...."

trmm_rf2011   = trmm[0]->r
                  printVarSummary(trmm_rf2011)
  trmm_rf2013   = trmm[1]->r
                  printVarSummary(trmm_rf2013)
  trmm_rf2014a  = trmm[2]->r
                  printVarSummary(trmm_rf2014a)
  trmm_rf2014b  = trmm[3]->r
                  printVarSummary(trmm_rf2014b)
  trmm_rf2015   = trmm[4]->r
                  printVarSummary(trmm_rf2015)


Since you did not include any output from 'printVarSummary', how is
ncl-talk supposed to answer the question.

On Sun, Nov 22, 2015 at 10:46 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:
> thanks Dennis.
> I want to know if "join" will add the data???.
> Now I have kept the default option as "cat" only.
> But I am facing small problem.
> when I use "ls -l" below
>
> trmm_files    = systemfunc("ls -l 3B42_daily.20*.nc")    ; with ls -l
> printVarSummary is not shown.
>                   printVarSummary(trmm_files)
>
> I dont get the output.
>
> Following are the data files.
> aditya at agniilap:~/geeta/ncl/TS_rain$ ls 3B42*
> 3B42_daily.2011.04.22.7.nc  3B42_daily.2014.06.05.7.nc
> 3B42_daily.2013.05.22.7.nc  3B42_daily.2015.04.23.7.nc
> 3B42_daily.2014.06.02.7.nc
>
>
> Can I also get the time info for each file printed for me so that I know
> that the variable trmm_rf2011 has ONLY 2011 data???
>
>   trmm_files    = systemfunc("ls 3B42_daily.20*.nc")
>   date_files    = systemfunc("ncdump -h 3B42_daily.20*.nc")
>                   printVarSummary(trmm_files)
>                   printVarSummary(date_files)
>
>   trmm          = addfiles(trmm_files,"r")
>                   printVarSummary(trmm)
>
>   nfiles        = ListCount(trmm)
>                   print(nfiles)
>       ListSetType(trmm,"cat")
>
>   trmm_rf2011   = trmm[0]->r
>                   printVarSummary(trmm_rf2011)
>   trmm_rf2013   = trmm[1]->r
>                   printVarSummary(trmm_rf2013)
>   trmm_rf2014a  = trmm[2]->r
>                   printVarSummary(trmm_rf2014a)
>   trmm_rf2014b  = trmm[3]->r
>                   printVarSummary(trmm_rf2014b)
>   trmm_rf2015   = trmm[4]->r
>                   printVarSummary(trmm_rf2015)
>
>
> In the printVarSummary, I dont get the time info of each file....
>
>
> Geeta.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list