[ncl-talk] Skip files

Dennis Shea shea at ucar.edu
Mon Nov 2 08:01:18 MST 2015


Try the following.

Use the reassignment operator:     :=

http://www.ncl.ucar.edu/prev_releases.shtml#NewOperator6.1.1

============

do dd=datei,datef
  files := systemfunc (" ls  /folder/files_v2.1.0_"+ dd +"*.nc")
  if (.not.ismissing(files(0))) then
      numfiles = dimsizes(files)
      if (numfiles.eq.30) then
          print("Going to work on " + numfiles + " CLOUDS ")
          :
      else
          print("Only " + numfiles + " CLOUDS : fatal")
          exit
      end if
   end if
 end do

On Mon, Nov 2, 2015 at 4:38 AM, Stavros Dafis <sdafis at cc.uoi.gr> wrote:
> Hello, I am facing a problem with opening multiple netCDF files. I want to open
> 30 files, each for one day of a month but one day is missing. I do the
> following because the files are listed according to Julian days:
>
> datei=2006276  ;first day
> datef=2006304  ;last day
>
> do dd=datei,datef
>   files = systemfunc (" ls  /folder/files_v2.1.0_"+ dd +"*.nc")
>   numfiles = dimsizes(files)
>   if (numfiles.gt.0) then
>   print("Going to work on " + numfiles + " CLOUDS ")
>
>   if(.not.any(ismissing(files))) then
>
>
> I just inserted the last if statement but is not working. Do I have to make a
> loop to overcome this problem or is there a ready command for opening multiple
> files and skip some of them?
>
>
> regards,
>
> --
> Stavros Dafis
> MSc student Atmospheric Sciences and Environment
> University of Ioannina
> LATMOS Laboratoire Atmosph&#232;res, Milieux,Observations Spatiales; Versailles,
> France.
> Tel: +30 2651008499,  Mobile: +30 6970420242
> e-mails: sdafis at noa.gr or dafis91 at yahoo.gr or sdafis at cc.uoi.gr
> Weather charts: http://www.metar.gr
> http://www.meteovolos.gr
>
>
>
> _______________________________________________
> 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