1.时间转换
用matlab从jason-2的nc文件中读出的时间(time_20hz
)单位,从数据说明中可以看出是以秒为单位,从2000-01-01 00:00:00.0开始:
time_20hz:
---------------------------
time field
[tai_utc_difference] is the difference between TAI and UTC reference time (seconds) for the first measurement of the data set. [leap_second] is the UTC time at which a leap second occurs in the data set, if any. After this UTC time, the [tai_utc_difference] is increased by 1 second
Dimensions: time=3204 meas_ind=20
- _FillValue: 18446744073709552000.000000
- calendar: gregorian
- leap_second: 0000-00-00 00:00:00
- standard_name: time
- tai_utc_difference: -33.000000
- units: seconds since 2000-01-01 00:00:00.0
如果要还原成日期怎么办?
简单的做法是,直接在excel中处理一下就可以了。
time_20hz (列号:L) | 天 (列号:M) | (列号:N) | (列号:O) |
---|---|---|---|
269091209.6 | =L2/3600/24=3114.481592 | 2000/1/1 | =M2+N2=2008/7/11 11:33 |
2.作图时横坐标时间刻度问题
先看看这个:matlab作时间相关的图
以jason2为例,jason读取的时间是从2000-01-01 00:00:00.0
开始的秒数,所以不能直接将其转换为天数,需要将2000-01-01 00:00:00.0
转换为天数后与其相加,再作相应的图,大概用法如下:
time1 = datenum('2000/1/1') + time0;