爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3698|回复: 3

[分享资料] ctl高分辨率y值映射关系

[复制链接]

新浪微博达人勋

发表于 2013-8-29 19:26:11 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
各位大神,我今天在画一个海平面气温的距平图,其中在写CTL的时候,遇到一个从未看到过的错误。
我的资料是分辨率为0.333*1.0的nc数据,用grads查看其ctl信息如下:
ga->sdfopen D:\ls\pottmp.1980.nc
Scanning self-describing file:  D:\ls\pottmp.1980.nc
SDF file D:\ls\pottmp.1980.nc is open as file 1
LON set to 0 360
LAT set to -74.5 64.499
LEV set to 4478 4478
Time values set: 1980:1:1:0 1980:1:1:0
E set to 1 1
ga-> q ctlinfo
dset D:\ls\pottmp.1980.nc
title GODAS: Global Ocean Data Assimilation System
undef -9.99e+33
dtypenetcdf
xdef 360 linear 0.5 1
ydef 418 levels -74.5 -74.1667 -73.8333 -73.5 -73.1667 -72.8333 -72.5 -72.1667
-71.8334 -71.5 -71.1667 -70.8334 -70.5 -70.1667 -69.8334 -69.5 -69.1667 -68.833
4
-68.5001 -68.1667 -67.8334 -67.5001 -67.1667 -66.8334 -66.5001 -66.1667 -65.833
4 -65.5001
-65.1667 -64.8334 -64.5001 -64.1667 -63.8334 -63.5001 -63.1668 -62.8334 -62.500
1 -62.1668
-61.8334 -61.5001 -61.1668 -60.8334 -60.5001 -60.1668 -59.8334 -59.5001 -59.166
8 -58.8335
-58.5001 -58.1668 -57.8335 -57.5001 -57.1668 -56.8335 -56.5001 -56.1668 -55.833
5 -55.5001
-55.1668 -54.8335 -54.5001 -54.1668 -53.8335 -53.5001 -53.1668 -52.8335 -52.500
2 -52.1668
-51.8335 -51.5002 -51.1668 -50.8335 -50.5002 -50.1668 -49.8335 -49.5002 -49.166
9 -48.8335
-48.5002 -48.1669 -47.8335 -47.5002 -47.1669 -46.8335 -46.5002 -46.1669 -45.833
5 -45.5002
-45.1669 -44.8335 -44.5002 -44.1669 -43.8335 -43.5002 -43.1669 -42.8336 -42.500
2 -42.1669
-41.8336 -41.5002 -41.1669 -40.8336 -40.5003 -40.1669 -39.8336 -39.5003 -39.166
9 -38.8336
-38.5003 -38.1669 -37.8336 -37.5003 -37.1669 -36.8336 -36.5003 -36.1669 -35.833
6 -35.5003
-35.167 -34.8336 -34.5003 -34.167 -33.8336 -33.5003 -33.167 -32.8336 -32.5003 -
32.167
-31.8336 -31.5003 -31.167 -30.8337 -30.5003 -30.167 -29.8337 -29.5003 -29.167 -
28.8337
-28.5003 -28.167 -27.8337 -27.5003 -27.167 -26.8337 -26.5004 -26.167 -25.8337 -
25.5004
-25.167 -24.8337 -24.5004 -24.167 -23.8337 -23.5004 -23.167 -22.8337 -22.5004 -
22.167
-21.8337 -21.5004 -21.167 -20.8337 -20.5004 -20.1671 -19.8337 -19.5004 -19.1671
-18.8337
-18.5004 -18.1671 -17.8337 -17.5004 -17.1671 -16.8337 -16.5004 -16.1671 -15.833
8 -15.5004
-15.1671 -14.8338 -14.5004 -14.1671 -13.8338 -13.5004 -13.1671 -12.8338 -12.500
5 -12.1671
-11.8338 -11.5005 -11.1671 -10.8338 -10.5005 -10.1671 -9.8338 -9.50047 -9.16714
-8.83381
-8.50047 -8.16714 -7.83381 -7.50048 -7.16715 -6.83382 -6.50049 -6.16716 -5.8338
3 -5.5005
-5.16717 -4.83384 -4.5005 -4.16717 -3.83384 -3.50051 -3.16718 -2.83385 -2.50052
-2.16719
-1.83386 -1.50052 -1.16719 -0.833863 -0.500532 -0.167201 0.166129 0.49946 0.832
791 1.16612
1.49945 1.83278 2.16612 2.49945 2.83278 3.16611 3.49944 3.83277 4.1661 4.49943
4.83276 5.16609 5.49942 5.83276 6.16609 6.49942 6.83275 7.16608 7.49941 7.83274
8.16607 8.4994 8.83273 9.16606 9.4994 9.83273 10.1661 10.4994 10.8327 11.166
11.4994 11.8327 12.166 12.4994 12.8327 13.166 13.4994 13.8327 14.166 14.4994
14.8327 15.166 15.4993 15.8327 16.166 16.4993 16.8327 17.166 17.4993 17.8327
18.166 18.4993 18.8327 19.166 19.4993 19.8326 20.166 20.4993 20.8326 21.166
21.4993 21.8326 22.166 22.4993 22.8326 23.166 23.4993 23.8326 24.166 24.4993
24.8326 25.166 25.4993 25.8326 26.1659 26.4993 26.8326 27.1659 27.4993 27.8326
28.1659 28.4993 28.8326 29.1659 29.4993 29.8326 30.1659 30.4992 30.8326 31.1659
31.4992 31.8326 32.1659 32.4992 32.8326 33.1659 33.4992 33.8326 34.1659 34.4992
34.8326 35.1659 35.4992 35.8325 36.1659 36.4992 36.8325 37.1659 37.4992 37.8325
38.1659 38.4992 38.8325 39.1659 39.4992 39.8325 40.1658 40.4992 40.8325 41.1658
41.4992 41.8325 42.1658 42.4992 42.8325 43.1658 43.4991 43.8325 44.1658 44.4991
44.8325 45.1658 45.4991 45.8325 46.1658 46.4991 46.8325 47.1658 47.4991 47.8325
48.1658 48.4991 48.8325 49.1658 49.4991 49.8324 50.1658 50.4991 50.8324 51.1658
51.4991 51.8324 52.1657 52.4991 52.8324 53.1657 53.4991 53.8324 54.1657 54.4991
54.8324 55.1657 55.4991 55.8324 56.1657 56.4991 56.8324 57.1657 57.4991 57.8324
58.1657 58.499 58.8324 59.1657 59.499 59.8324 60.1657 60.499 60.8324 61.1657
61.499 61.8324 62.1657 62.499 62.8323 63.1657 63.499 63.8323 64.1657 64.499
zdef 40 levels 4478 3972 3483 3016 2579 2174 1807 1479
1193 949 747 584 459 366 303 262 238 225
215 205 195 185 175 165 155 145 135 125
115 105 95 85 75 65 55 45 35 25
15 5
tdef 12 linear 00Z01JAN1980 1mo
vars 3
date=>date  0  t  date
timePlot=>timeplot  0  t  timePlot
pottmp=>pottmp  40  t,z,y,x  Potential temperature
endvars
ga->
因为要做一些距平计算的处理,所以我就先将nc转为dat格式,然后在fortran中做各种计算。之后我就把处理好的数据写到新的一个dat文件中,fortran程序完全正确,没有错误和警告。最后我就写ctl,当我在写ydef的时候我就纳闷了,我如果写成ydef 418 linear -74.5 0.333时,用grads可以打开这个ctl,但是这种线性格点和上面的离散格点不能完全对应,所以我就把ydef改成上面离散的形式,于是就出现了下面的错误:
ga-> open D:\ls\result.ctl
Scanning description file:  D:\ls\result.ctl
Open Error:  Invalid value in LEVELS data
  --> The invalid description file record is:
  --> ydef 418 levels -74.5 -74.1667 -73.8333 -73.5 -73.1667 -72.8333 -72.5 -72.
1667 -71.8334 -71.5 -71.1667 -70.8334 -70.5 -70.1667 -69.8334 -69.5 -69.1667 -68
.8334 -68.5001 -68.1667 -67.8334 -67.5001 -67.1667 -66.8334 -66.5001 -66.1667 -6
5.8334 -65.5001
  The data file was not opened.
ga->
从错误中可以看到,出错的地方就是ydef这里,而且不管我怎么修正,都是这个错误,而且屏幕上也只显示到-65.5001这里,我怀疑会不会是写ydef的时候,后面有字符大小的限制,恳请遇到过相同问题的大神,帮忙答疑解惑,谢谢!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-8-30 09:29:31 | 显示全部楼层
在ctl中xdef ,ydef ,zdef 这些说明后面的记录不能查过255个字符。建议你用linear表示吧,相差应该不大。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-8-30 12:36:20 | 显示全部楼层
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-1-9 15:03:14 | 显示全部楼层
楼上说得有道理
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表