Relating variables to time

From: Kyle Wilcox <Kyle.Wilcox_at_nyahnyahspammersnyahnyah>
Date: Thu, 15 Jun 2006 10:29:02 -0400

First post

I have an ascii file that I need to parse into a netCDF. This is an
example of how I define my variables:

File = asciiread(filename, -1,"string")
Data = stringtochar(File)
time = stringtodouble(charactertostring(Data(:,8:17)))
winddirection = stringtofloat(charactertostring(Data(:,26:31)))
degree = stringtofloat(charactertostring(Data(:,40:45)))

Now I write the variables like this (after all the attributes are
written with filevatattdef):

out->time=(/time/)
out->winddirection=(/winddirection/)
out->degree=(/degree/)

My questions is, how can I get the variables to recognize that they are
based on the time variable? Do I have to define the dimensions
differently? As of now all variables come up with the same size
dimension. I only ask because I see examples online
(http://ccmp.chesapeake.org/twiki/bin/view/CcmpWiki/CbosWavefile) where
a time series variable is defined as "float (time,variable)" in the
netCDF .cdl representation. For example:

double time(time) ;
                time:calendar = "standard" ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:units = "seconds since 19070-1-1 0:0:0" ;
        float degree(ncl2) ;
                degk:units = "Degrees Kelvin" ;
                degk:long_name = "Degrees Kelvin" ;
        float winddirection(ncl3) ;
                wdir:units = "degrees" ;
                wdir:standard_name = "wind_to_direction" ;
                wdir:long_name = "wind direction" ;

I guess im basically asking how to get (time,degree) and
(time,winddirection) in place of ncl2 and ncl3.

Thanks in advance for any help.

Kyle
kyle.wilcox_at_noaa.gov
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 15 2006 - 08:29:02 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 16 2006 - 13:51:09 MDT