加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

NC资料中时间的转换(将朱利安时间转换成世界时)

(2015-07-18 08:56:17)
标签:

佛学

分类: NCL
朱利安日期(JD)是连续的计数几天,并且分数从同一个最初的世纪流逝了。转换成世界时(UT,universal time)也就是我们平时认可的时间。转换函数为cd_calendar等。
(1)
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
        a = addfile("./pres.mon.mean.nc","r")
        t = a->time
        ut = cd_calendar(t,-1)
print(ut)
end
输出结果为:
NC资料中时间的转换(将朱利安时间转换成世界时)

(2)
begin
        a = addfile("./pres.mon.mean.nc","r")
        t = a->time
        ut = cd_calendar(t,2)
print(ut)
end


NC资料中时间的转换(将朱利安时间转换成世界时)
(3)
begin
        a = addfile("./pres.mon.mean.nc","r")
        t = a->time
        ut = cd_calendar(t,3)
print(ut)
end
NC资料中时间的转换(将朱利安时间转换成世界时)
(4)
begin
        a = addfile("./pres.mon.mean.nc","r")
        t = a->time
        ut = cd_calendar(t,4)
print(ut)
end
NC资料中时间的转换(将朱利安时间转换成世界时)

(5)
begin
        a = addfile("./pres.mon.mean.nc","r")
        t = a->time
        ut = cd_calendar(t,0)
print(ut)
end
NC资料中时间的转换(将朱利安时间转换成世界时)

0

阅读 收藏 喜欢 打印举报/Report
前一篇:NetCDF数据
后一篇:柱状图
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有