[Thread Prev][Thread Next][Index]

Re: "Irregular T axis box limits cannot be saved"



Hi Kek,
You can't append irregular time steps to a NetCDF file,
because time is the "record dimension", meaning it is of
unlimited length and can be increased by appending.
For the time axis to be used this way, the axis intervals
must be of equal size.

However, you can set up the output time axis in advance and
save that to your output file, and then you can fill in the
time steps by writing successive times to the file.  This is
along the lines of what's in the Users Guide, in the index
under "append, slab to NetCDF file".

For example,

! Write time steps to a file, with a non-uniform time axis.

! Define the output time axis - I've made an axis with
! the grid points at the center of each month.

def axis/t/units=days/t0=1-jan-2001 t_out = {15,45,73,104,134,165,195,226,257,287,318,348}

list t[gt=t_out], tbox[gt=t_out]

! We will add this to the variables, to put them on the
! output time axis.

LET  timestamp = T[gt=t_out] * 0              !always 0

! Use one of your files with timestamp to define the output grid
! I have L=@AVE to make sure the variable varx does not have
! its own time dependence.

use jan.nc
let v = varx[l=@ave] + timestamp

! Create the file with the output time axis
save/clobber/file=outfile.nc/rigid/heading=enhanced/llimits=1:12 v

! Now save each time step using the APPEND qualifier and
! /L= for desired time step.  Here L is along our time axis t_out.

use jan.nc
let v = varx[l=@ave] + timestamp
save/append/file=outfile.nc/L=1 v

use feb.nc
let v = varx[l=@ave] + timestamp
save/append/file=outfile.nc/L=2 v

use mar.nc
let v = varx[l=@ave] + timestamp
save/append/file=outfile.nc/L=3 v

...

hengkek@nus.edu.sg wrote:

> Hi
>
> I'm trying to group several netCDF files into one.  Each of the netCDF
> files have identical spatial grids.  But the Time grid is different --
> the time intervals may not be constant.  So, I'm getting the
> error/warning as per the log below.
>
> The final "2001SST50.nc" appears to be created okay, but trying to
> generate the vis5d file from it gives a vis5d file which is totally
> wrong.  If I omit the "SSTmonth.nc" files which cause the warning, the
> vis5d file produced is good.
>
> What are my options for using netCDF files with irregular time axis to
> generate sane vis5d files?
>
> Thanks for any hints or pointers
>
> -Kek
> Physical Oceanography
> Singapore
>
> -----start error log----------------
>  ! NOAA/PMEL TMAP
>  ! FERRET v5.40
>  ! Solaris 5.6 - 02/15/02
>  ! 11-Feb-03 13:51
>
> yes? use "Jan/SSTmonth.nc"
> yes? save /clobber/file=2001SST50.nc varx
>  LISTing to file 2001SST50.nc
> yes? use "Feb/SSTmonth.nc"
> yes? save /append/file=2001SST50.nc varx
>  LISTing to file 2001SST50.nc
> yes? use "Mar/SSTmonth.nc"
> yes? save /append/file=2001SST50.nc varx
>  LISTing to file 2001SST50.nc
>  *** NOTE: Irregular T axis box limits cannot be saved
>  *** NOTE: in NetCDF files created by this means.
>  *** NOTE: To avoid this create the file using the qualifiers
>  *** NOTE:     /RIGID/HEADING=ENHANCED/LLIMITS=lo:hi
>  *** NOTE: This warning will not be repeated.
> ...[deleted]...
> yes? use 2001SST50.nc
> yes? go vis5d_write 2001SST50.v5d varx
> To view the file with Vis5D say:   GO vis5d_start 2001SST50.v5d
> -----start error log----------------

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement