[Thread Prev][Thread Next][Index]

Re: Concatenating netcdf files along time dim



Hi Kek,
Another method is to use a multi-file cdf data set with a descriptor file,
see "descriptor file" in the Users Guide.  This way you do not need to
create a new NetCDF file, but only the descriptor.  The files can be
associated into a multi-file dataset regardless of how their internal time
dimensions are defined (if you are running Ferret v5.33 or later).  An
example is given in the responses to this question from the Ferret email list archives:
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2002/msg00010.html

Or, to write a new NetCDF file, please see "append, time step to
NetCDF file" in the Ferret Users Guide for an example of how to do
this in Ferret.  When your input files are NetCDF files themselves, you
would define the time axes as in the example and regrid in time to the
new time axis using the @ASN regridding transformation, then append
the time step to your output NetCDF file.

Ansley Manke

hengkek@nus.edu.sg wrote:

> Hello people
>
> I'm trying my luck here to see if anyone has successfully used ferret to
> concatenate a series of netcdf files with the following properties:
>
> 1- Record variable is 'time'
> 2- One record per file
> 3- Value of "time" variable is '0.0' for each file.
> 4- Each file's origin for the time variable is different.
>
> I'd be most grateful for some tips or pointers to docs.  I was getting
> the error below.  I was hoping Ferret would magically recalculate all
> the time values to values relative to one single arbitrary origin.
>
> Thanks.
>
> -Kek
> Physical Oceanography
> Singapore
>
> -------------
> use x1.nc
> save/file=z.nc/append eee
>  LISTing to file z.nc
> use x2.nc
> save/file=z.nc/append eee
>  LISTing to file z.nc
>  **TMAP ERR: error in line definition
>              disordered output coordinate value: 2.08333E-03 Axis: TIME
> LIST/FORMAT=CDF/file=z.nc/append eee
> Command file, command group, or REPEAT execution aborted
> -------------
>
> x1.nc and x2.nc have different time origins.
>
> The netcdf file structure is as follows:
>
> dimensions:
>         z = 20 ;
>         lat = 199 ;
>         lon = 133 ;
>         time = UNLIMITED ; // (1 currently)
> ...
>         float time(time) ;
>                 time:long_name = "time" ;
>                 time:units = "days since 2003-01-01 00:00:00 +00:00" ;

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement