Re: [netcdfgroup] concatenate netcdf files

shl,

This type of concatenation is done easily and intuitively in NCL, and probably several other math and data handling languages. I would prefer to tell you about the NCL method. Do you have a working copy of NCL installed?

If not, there is an easy kludge. I do not like to recommend this because it is kludgey. However it is reliable, and frequently it gets the job done with least effort.

You can convert the latitude dimension into a record variable with a command line trick, manipulate the dimension line in the ncdump/CDL text version of the Netcdf file. In your case you can even just do it with a text editor because you have only four small files.

Then use ncrcat to concatenate the four subset files together, along the latitude dimension, as you have already surmised.

Please see my netcdfgroup post of 2007-nov-28, "Converting record dimension to non-record dimension", for an example of this method. In your case you are going the opposite way, from non-record to record, so change the control strings accordingly. HTH.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/psd1/

shl7c wrote:
So, it seems like I should be able to use the ncrcat function to concatenate
the files... but that function requires that there be a record dimension.
I'm not entirely sure what that is...

It seems that I need for the latitude dimension to be a record dimension...
is there an easy way to make it such?



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: