Re: limit for addfiles function ?

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 05 2010 - 12:57:02 MST

Hi Eric,
The limit on the number of open files is imposed by your operating
system. However, there is a file option to work around this, use:

setfileoption("nc","SuppressClose",False)

See the explanation at
http://www.ncl.ucar.edu/Document/Functions/Built-in/setfileoption.shtml#SuppressClose

  -dave

On Mar 5, 2010, at 12:31 PM, Erik Noble wrote:

> Hi I tried using the ncl addfiles fuction. The files I am trying to
> extract data from are wrf files, but that shouldn't matter. Of
> course there are many wrfout files because the model spits out a
> file every hour or every 3 hours..
> When I try to use the addfiles function, NCL gives back the error
> that there are "too many files."
>
> So the addfiles function has a limit? Is there a way around this?
> Kind of a show stopper for this function...
> -Erik
>
> noble:August_September_Full eunoble$ ncl
> Copyright (C) 1995-2009 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.1.1
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> ncl 0> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> ncl 1> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ncl 2> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ncl 3> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
> ncl 4> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
> ncl 5> diri = "./" ; input directory
> ncl 6> fils = systemfunc ("ls ./wrfout*") ; file paths
> ncl 7> printVarSummary(fils)
>
>
> Variable: fils
> Type: string
> Total Size: 5860 bytes
> 1465 values
> Number of Dimensions: 1
> Dimensions and sizes: [1465]
> Coordinates:
> ncl 8> ncl 8> f = addfiles (fils+".nc", "r")
> fatal:Too many open files
> .
> .
> .
> _______________________________________________
> 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 Fri Mar 5 12:57:07 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 08 2010 - 12:07:42 MST