Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

Re: Add variable in a NetCDF file. Variable POSITION



Simone Marras a écrit :
> ...
> Is there a way to control the position inside the file where the variable 
> value is added?
> I need to put it in a certain position because when I use CDO to merge several 
> files, the output merged file does not have a date anymore.
> ...
No there is no way to control the position: they are in
the order they have been created (with a little exception
for 'record' vars).
Anyway no program should take into account the position
of the variable (in fact linked to the var Id) but only
the names.

For CDO (I don't know it except its name), it is a bit
strange that a "generic" program throw away a variable
due to its position.
It may be related to some CDO options usage or the way
it is working (I did have some problems like this
with the NCO programs): check all options.

To see if it is related to the position, you can try
to export your NetCDF file with ncdump, then with a
text editor move the variable (in the header only, it
is sufficient) where your think it should be and then
regenerate the file with ncgen. Rerun CDO with this
new file and it is probable that you will have the
same result (and normally it should be the same).

If it is not the same result (except, maybe for
variable positions if the resulting file), it may
be a CDO bug.


-- 
Ph. Poilbarbe
CLS - Space Oceanography Division


===============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690