concatenate pairs of files

From: Jiaxin Zhang <jiaxinzhang3_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 31 2014 - 20:13:03 MDT

Dear NCL users,

I have one question about concatenate pairs of netcdf files.

I need to concatenate two netcdf files and create a new netcdf file
including information of both netcdf files. Attached is a code that works
for the two attached netcdf files. The problem is that the code has to be
modified to work for all the netcdf files.

I have the following netcdf files (the file name means
site1_tair_year1980_month01.nc):

site1_tair_1980_01.nc, site1_tair_1980_02.nc, site1_tair_1980_03.nc,
site1_tair_1980_04.nc, ..., site1_tair_1980_10.nc, site1_tair_1980_11.nc,
site1_tair_1980_12.nc, site1_tair_1981_01.nc, site1_tair_1981_02.nc, ...,
site1_tair_1981_12.nc, site1_tair_1982_01.nc, ..., and so on until
site1_tair_2012_12.nc.

What I would need to do is to concatenate pairs of files (the file of one
month, with the file of the following month). For instance concatenate file
site1_tair_1980_01.nc with file site1_tair_1980_02.nc and create a new
netcdf including information of both files; also concatenate file
site1_tair_1980_02.nc with site1_tair_1980_03.nc and create a new
netcdf;... and so on. Also at the end of the year concatenate the December
netcdf with the January netcdf of the following year (for instance
concatenate site1_tair_1980_12.nc with site1_tair_1981_01.nc). The last
netcdf file that I have is December 2012 (no netcdf file for January 2013
to concatenate with December 2012).

Could someone please let me know what has to be modified in the attached
NCL code to concatenate pairs of files (consecutive months) for all the
netcdf files (starting in January 1980 until December 2012)?

Thank you in advance.

Jiaxin

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon Mar 31 20:13:18 2014

This archive was generated by hypermail 2.1.8 : Thu Apr 03 2014 - 13:36:27 MDT