[Thread Prev][Thread Next][Index]

Re: export time series from netCDF file



Title: Message

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement
Dear Yun,
 
Doesn't the method in the user's manual work?
 
If you want to save as a ASCII file in table format, please try as:
 
list/format=tab/file=1.dat ...
 
If you want to read from a ASCII file, please try as:
 
 
Example 4—1 variable, 2 dimensions

4a) Consider a different situation: a greenhouse with three rows of four plants and a file with a single column of data representing the height of each plant at a single time (successive values represent plants in a row of the greenhouse):
3.1
2.6
5.4
4.6
3.5
6.1
. . .

If we want to produce a contour plot of height as a function of position in the greenhouse, axes will have to be defined:

yes? DEFINE AXIS/X=1:4:1 xplants
yes? DEFINE AXIS/Y=1:3:1 yplants
yes? DEFINE GRID/X=xplants/Y=yplants gplants
yes? FILE/VAR=height/GRID=gplants greenhouse_plants.dat
yes? CONTOUR height
When reading data the first index, x, varies fastest. Schematically, the data will be assigned as follows:
x=1 x=2 x=3 x=4
y=1 3.1 2.6 5.4 4.6
y=2 3.5 6.1 . . .
y=3 . . .
4b) If the file in the above example has, instead, 4 values per record:
3.1 2.6 5.4 4.6
3.5 6.1 . . .

then add /COLUMNS=4 to the FILE command:
yes? FILE/VAR=height/COLUMNS=4/GRID=gplants greenhouse_plants.dat
 
 
Hope these can help you some.
 
Regards,
Jian
 
****************************************
Jian Ma
 
M. S. in Physical Oceanography
The First Institute of Oceanography
State Oceanic Administration
P. R. China
 
No. 6 Xian-Xia-Ling Road, Qingdao 266061
Tel: 86-532-8967401
Fax: 86-532-8967400
URL: www.fio.org.cn
****************************************
 
 
 
----- Original Message -----
Sent: Thursday, June 02, 2005 1:46 PM
Subject: export time series from netCDF file

Dear All,
 
Is there a way to extract all time series in ASCII format (file.txt) at each grid point, and form them into a table with each column corresponding to a time series of a grid?  For example, let X1, X2, ...., Xn be the time series (e.g. MSLP) of n grid points over the study area, and xi,j are jth sample value of Xi.  The new data structure is as follows
 
____________________________________________
Date                       X1              X2        ...          Xn

____________________________________________

1948                     x1,1           x2,1        ...        xn,1

1949                     x1,2            x2,2       ....       xn,2

1950                     x1,3            x2,3       ....       xn,3

.....                        ....            ....        ....        ....

2004                    x1,57           ...        ....         xn,57

_____________________________________________

I would be most grateful if you can provide a help here.

Regards,

Yun

 

 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement