Re: combining data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 05 2010 - 10:12:09 MST

If you want a single file with the "combined" seperate files
then the netCDF operator [ncrcat] is the best approach.

NCL: If the data are on separate files and you want to read
variables that span multiple files , then use "addfiles"

http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml

[let 'flnm' be the root name of your files]

    diri = "./" ; input directory
    fils = systemfunc ("ls "+diri+"flnm*.nc") ; file paths
    print(fils)

    f = addfiles (fils, "r") ; note the "s"
    T = f[:]->T ; read T from all files
    printVarSummary(T)

On 01/05/2010 01:44 AM, Andrew Mai wrote:
> On 2010-01-05 01:40, shinn wong wrote:
>
>> I would like to combine two netcdf files containing daily uwnd data
>> from NCEP (one file from year 87-96 and the other from 97-07) into
>> one. Do anyone know how to do that?
>
> ncrcat flnm_87-96.nc flnm_97-07.nc flnm_87-07.nc
>
> The three filenames in the above command could be anything you want.
> The first two are the files to be combined into the last filename.
> Read the ncrcat man page for some possibly useful options.
>
> Andy
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate&  Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 5 10:13:39 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 05 2010 - 11:04:11 MST