[Thread Prev][Thread Next][Index]

Re: [ferret_users] data from netcdf file automatically reversed



Much thanks to Patrick and Hein! Yes, the bad time axis of the file caused this problem.

It seems that replacing the broken time_counter axis by doing "
define axis /t=1:389:1 time_counter" in ferret didn't change the sequence.
I used ncks as suggested by Patrick to remove the time axis before reading it into ferret, and define other time axis as I want, then it's OK.

Again thanks for the help,

Chao

2011/5/3 Brockmann Patrick <Patrick.Brockmann@xxxxxx>
Hi,
I think you should correct the time axis of your file.


time_counter = 15768000, -78926400, 15768000, 15768000, -78926400,
  -15854400, -47390400, -15854400, -110462400, -78926400, -78926400,
  -47390400, -78926400, -15854400, -110462400, 15768000, 15768000,
  -47390400, -110462400, -47390400, ...

is not a correct axis (whatever the reason) because it is neither increasing or decreasing.

You could remove this wrong axis by using ncks (from nco commands)

ncks -Oh -C -x -v time_counter file1.nc file2.nc

ferret will then open your file in the right order and presents it as indices.
Then, define a new axis if needed.

Patrick

--
LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
Data Analysis and Visualization Engineer
ICMC - IPSL Climate Modelling Centre
--




--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 77 30
Portable Phone (Mobil phone) : (33) 07 60 54  23 71
************************************************************************************


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement