NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] concatenate netcdf files

Okay. I see that while I was typing, Charlie also suggested the non-record/record conversion.

If you wish to try NCL anyway, I think you will find it a valuable tool for other things. I like NCO but there still a few things it doesn't do. ;-)

Have you used NCL before? Here are introductory docs that may answer initial questions:

  http://www.ncl.ucar.edu/get_started.shtml

NCL is usually best used with small scripts, rather than command line. Enter this (untested) test program first, to validate your NCL installation. In a text file, e.g. concat.ncl:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

begin
   print ("Start program.")

; Substitute your Netcdf file name and data var name
; in the following 2 lines.  Paths allowed:

   infile1 = "file_1.nc"   ; name of first file
   var = "value"           ; name of common data variable

   f1 = addfile (infile1, "r")
   printVarSummary (f1)

   print ("--------------")

   v1 = f1->$var$          ; read section 1 data
   printVarSummary (v1)
   print ("Done.")
end

Run from the command line as follows:

ncl concat.ncl

Debug as needed. Common install problems are path to NCL command, and value for $NCARG_ROOT. See docs. Get that working, and check displayed summaries for consistency with the contents of file_1. They should be similar to what you get from ncdump -h.

Feel free to ask (on-list please) if you run into problems. I will send the concatenation steps later; above is the hard part!

--Dave

shl7c wrote:
Alright, I've just installed NCL... would you mind walking me through this
method?

Thanks much for your help :)



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