[Thread Prev][Thread Next][Index]

Re: how to add the many netcdf files



Hi Ansley,

Many thanks for the helping hand,

It works now after doing :

cancel data input_file.cdf
cancel memory

After each input file.

Also I made descriptor file with the help of Steve, and this too works.

Thanks Ansley,

Thanks Steve,

Cheers,
Yogesh


 Manke wrote:
Hi Yogesh,
Let's see if we can work out a solution and then post it back to the Users
List.

There should not be a problem appending 50 files of this size.  While there
is an upper limit on NetCDF file sizes of 2GB (which we are working
to overcome), 32*762K does not bring us anywhere near that limit.

Try closing the input files after you read each one; that is:

 use input_file.cdf
 LIST/FORMAT=CDF/file=concat.cdf NBOX,CO2,STD_CO2
 cancel data input_file.cdf
 cancel memory   ! (I don't know whether this makes a difference)
  ...

Or, exit Ferret and restart a new session, continuing to open
files and append their data to your concat.cdf.

Does the file that you're able to write, with 32 of your time steps,
seem to be correct, with the correct time axis?

Ansley


Yogesh K. Tiwari wrote:

Hello Ansley,

I used the second option, as you suggested, SAVE/APPEND command to add 50 netcdf files in to a single 'concat.cdf' file.

My each file size is 762K.

After adding only first 32 files ferret crashes on the following error:

!--------------------------------------------------------------
add_connect: too many connects, cannot add another
** netCDF error: Attribute not found
could not open CDF output file:
concat.cdf
LIST/FORMAT=CDF/file=concat.cdf NBOX,CO2,STD_CO2
Command file, command group, or REPEAT execution aborted
!-----------------------------------------------------------


Please help,

Thanks,

Yogesh


Hello Yogesh,
This FAQ addresses a very similar question, and gives two different
options; one is the descriptor file suggested by Steve Cousins in his
earlier reply, and the other is to use Ferret's SAVE/APPEND command
to make a single NetCDF file.

http://www.ferret.noaa.gov/Ferret/FAQ/data_management/multi_dataset.html

Ansley Manke

Yogesh K. Tiwari wrote:

Hello Dear Friends,

I want to add many netcdf files in a one file inside ferret.

My data files looks like :

1>./Data_Jan_1987.nc

name title I J K L
CO2 CO2 concentration 1:360 1:180 ... 1:1


2>./Data_Feb_1987.nc

name title I J K L
CO2 CO2 concentration 1:360 1:180 ... 1:1



3>./Data_March_1987.nc

name title I J K L
CO2 CO2 concentration 1:360 1:180 ... 1:1


-------------------------
-----------------
-------------

There are many months for many years, total 50 files ----------------
--------------------------------------
--------------



I want to add all the files in a single file so it should look like :

>./Data_added.nc

name title I J K L
CO2 CO2 concentration 1:360 1:180 ... 1:50

Is it possible ??

Or is there any other way that I can use all the files and plot timeseries - seasonal cycle and other features.

Thanks for your help,

Regards,
Yogesh








--

=================================================================
Yogesh K. Tiwari,
Max-Planck Institute for Biogeochemistry,
Hans-Knoell-Strasse 10, D-07745 Jena,         Postal Address:
Germany                                       Postfach 10 01 64
                                              D-07701 Jena,
Office   : +49 3641 576376                    Germany
Fax      : +49 3641 577300
Home     : +49 3641 672232
Mobile   : +49 1736988789
e-mail   : yogesh.tiwari@bgc-jena.mpg.de
          __0                __0
         -\<,               -\<,
        (_)/(_)            (-)/(_)
=================================================================



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement