Re: addfiles function

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 18 Jul 2007 13:59:16 -0600

The way you are using it ... yes.

However, I see no advantage over using addfile

    data = new((/nstations, ntime/), "float") ; nstations=number_of_files

    do ns=0,nstations-1
       f = addfile (fils(ns), "r")

      ;calculate start/end indices for input file start/end dates
       data(n,st:en) = (/ f->x /)
    end do

Will Hobbs wrote:
> Hi
>
> Can the 'addfiles' function be used for multiple input files with
> different dimension lengths?
>
> Specifically, I am reading in data for a number of met stations, with a
> netCDF file for each station. Because of changes in data coverage over
> the period of interest, the input files cover slightly different periods.
> I want to place them all a single array, dimensioned (station, time),
> such that periods not covered will be set to FillValue.
>
> Can I read in the data using addfiles, in a manner like this....
>
>
> f = addfiles(fils, "r")
> ListSetType(f, "join")
>
> data = new((/nstations, ntime/), "float")
>
> do i = 0, nstations-1
>
> ;calculate start/end indices for input file start/end dates
>
> data(n,st:en) = f[n]->x
>
> end do
>
> Or, will I need to run the function 'addfile' for each station's ncl file.
>
> Many thanks
>
> Will
>
>
>
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 18 2007 - 13:59:16 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 18 2007 - 17:38:11 MDT