Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time variable data type #7

Open
andvigna opened this issue May 3, 2019 · 2 comments
Open

Time variable data type #7

andvigna opened this issue May 3, 2019 · 2 comments

Comments

@andvigna
Copy link

andvigna commented May 3, 2019

Hi,
I succesfully converted a coupl eof months of windscanner data to NetCDF using the Lidaco tool in Python. Hurra'! :)
Now i'm trying to read them in Matlab because the the guys that will perform the analysis of the data are using Matlab. Matlab is able to read a NetCDF file created by Lidaco almost entirely with the exeption of the "time" variable. I'm using realease 2018b.
The time variable seems to be stored in data tyep n. 12 "NC_STRING" which is unsupported by Matlab. Then i checked on the internet for possible solutions and it seems the only way to maintain compatibility with Matlab is using "NC_CHAR" data type instead.
What do you think?

@robmenke
Copy link

robmenke commented May 7, 2019

Hi,
I noticed the same issues with the time format in Matlab and found this workaround which reads in the time vector as a cell array:

time = h5read('path/filename.nc','/time');

Another problem with the time format which I see is the limited accuracy to seconds. It would be great to keep a millisecond accuracy during the conversion process.

@kalophain
Copy link

Hi,
I've also wondered about that. In the documentation of the lidaco format it says something like the time vector should be stored as seconds since the campaign start in double format. But the given format definition from ISO... as YYYY-MM-DDThh:mm:ss.ffffZ does not work with that. My solution was to store the time vector as seconds from campaign start as float/double (first entry is 0.0) and the campaign start time stamp is noted in the comment. This gives a nice look when plotting with NetCDF/HDF viewers (ie. 0 to 2000 instead of 1.9E+6 to 1.9E+6 on the time axis)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants