[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #QAK-764753]: Variables with different dimensions



I am afraid I do not understand your explanation.
Can you give me several concrete examples of what you
want to represent?

In any case, since you are using netcdf-4, you can declare
x,y, and time to all be unlimited. Would that solve your problem?

> 
> 
> I am using netcdf-4.
> 
> The problem if i have 5variables all defined on x,y and time, which is
> the unlimited axes. If one of them has a different dimension on the time
> axis (say 365 as daily data) all the other variables also have a length
> of 365 in the time dimension (which takes a lot of storage, despite no
> real values written in all except the first one)
> 
> What I would really want is to save data that is either 2 or 3D with
> different time resolutions. So depending on the end-user choice all
> variables can either be x,y,(z) with annual, daily or monthly
> resolution. So the length of the time dimension is varying. Either save
> all 3D values with different time resolutions in one file or all with
> the same temporal resolution, allowing for different dimensions of the
> variables 2+time or 3+time.
> 
> using fortran
> 
> regards
> 
> tobias
> 
> 
> Am 23.03.2018 um 19:40 schrieb Unidata netCDF Support:
> > Using time as an unlimited dimension seems the correct approach.
> > If you plan to use netcdf-3, then the time dimension needs to be
> > the first dimension. So something like this.
> >
> > netcdf example {
> > dimensions:
> >      time = unlimited;
> >      x = ...;
> >      y = ...;
> >
> > variables:
> >      float v1(time,x,y);
> >      float v2(time,x,y)
> > }
> >
> > If you instead plan to use netcdf-4, then the unlimited time
> > dimension does not need to be the first; it can be in any position.
> >
> >
> >> I would like to create a netcdf file with multiple variables which use
> >> different dimensions:
> >>
> >> 6 variables all defined with x,y and time, but for one the length of the
> >> time dimension should be 365 and once 1 (annual and daily data). I
> >> thought about defining 4 variables with
> >>
> >> x,y, time and time2
> >>
> >> How do you do this i seem to fail all the time with it?
> >>
> >> (the main errros:  Error: NetCDF: Invalid dimension ID or name  / Error:
> >> NetCDF: NC_UNLIMITED in the wrong index   / Error: NetCDF: One or more
> >> variable sizes violate format constraints  )
> >>
> >> another example: I want to have 3 variables which are defined on the x,y
> >> and time dimension and a 4th one which also has a x,y,z and time
> >>
> >> time is the unlimited dimension. I can define those for separate files
> >> and save them but are there any example scripts available for variables
> >> in a single file which have different dimensions?
> >>
> >>
> >> regards
> >>
> >>
> >> tobias zolles
> >>
> >>
> > =Dennis Heimbigner
> >    Unidata
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: QAK-764753
> > Department: Support netCDF
> > Priority: Normal
> > Status: Open
> > ===================
> > NOTE: All email exchanges with Unidata User Support are recorded in the 
> > Unidata inquiry tracking system and then made publicly available through 
> > the web.  If you do not want to have your interactions made available in 
> > this way, you must let us know in each email you send to us.
> >
> >
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: QAK-764753
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.