Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Elizabeth: I am not certain what tools you have access to, so this may not help you. If you have ncdump and ncgen, do an ncdump -h on your three files, and redirect the the output to files. Choose anyone of the files, and edit in the missing latitudes from the other files, making sure they are in order. call that say combine.cdl. Now use ncgen to create a new netcdf file from the combined cdl file, and then any of the steps you described should work. If this isn't making sense, if you cna at least get the header info from the 3 files and send them to me, i will send you an empty (except for dimensions) netcdf file that you can then populate with data. -Roy On Dec 18, 2011, at 2:39 PM, Elizabeth Crisfield wrote: > I have three files with the same variables, same longitudinal dimension, and > same time dimension, but different latitudinal dimensions. (Basically, I > chopped the eastern U.S. data into three rectangles North, Central, and > South.) > > I want to merge these back together for graphics purposes. > > I tried copying file1 to testmerge.nc, and then using ncks file2 testmerge.nc > and choosing to append... but the result has the same lat lon dimensions as > file1. (It also has the same time dimension, so I'm not really sure how it > appended it, maybe added the variables separately instead of matching them > up.) > > I also tried to write a python script to read the netcdf data, a single > variable at a time, and then write it out to a new netcdf file after it was > merged, but I had a hard time keeping track of the dimensions in my arrays > and when I tried to write it back out it said they didn't match up with the > netcdf file I defined using createDimension and createVariable. > > Can someone make a recommendation for me? > > Elizabeth Crisfield > ____________________ > Elizabeth Crisfield > Research Assistant > Geography Department > Penn State University > phone 814-777-3395 > eac16@xxxxxxx > www.elizabethcrisfield.com > _______________________________________________ > netcdfgroup mailing list > netcdfgroup@xxxxxxxxxxxxxxxx > For list information or to unsubscribe, visit: > http://www.unidata.ucar.edu/mailing_lists/ ********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center 1352 Lighthouse Avenue Pacific Grove, CA 93950-2097 e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address) voice: (831)-648-9029 fax: (831)-648-8440 www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
netcdfgroup
archives: