爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4033|回复: 7

[分享资料] 《求助》写了一个描述文件ctl,运行gs后出现以下问题

[复制链接]
发表于 2018-1-14 20:24:39 | 显示全部楼层 |阅读模式

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

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

x
出现下面问题,是我ctl文件编写错了吗?向老师请教
gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds dimension bound
Data Request Error:  Error for variable 'z'
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = z/9.8

nc文件的内容

nc文件的内容

ctl文件

ctl文件
360截图20180114201600643.jpg

gs文件

gs文件
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-1-14 20:26:31 | 显示全部楼层
@言深深 @清风,向老师们请教,很急
密码修改失败请联系微信:mofangbao
发表于 2018-1-15 08:50:43 | 显示全部楼层
NC数据读不了吗?要自己配CTL
密码修改失败请联系微信:mofangbao
发表于 2018-1-15 10:10:00 | 显示全部楼层
我觉得你要把解包用的影响因子写上去,比如 unpack scale_factor add_offset 1 32066
密码修改失败请联系微信:mofangbao
发表于 2018-1-15 10:13:05 | 显示全部楼层
UNDEF value <undef_attribute_name> <secondar_undef_attribute_name>        back to top
This entry specifies the undefined or missing data value. UNDEF is a required entry even if there are no undefined data. GrADS operations and graphics routines will ignore data with this value from this data set.
(GrADS version 1.9b4) An optional second argument has been added for data sets of DTYPE netcdf or hdfsds -- it is the name of the attribute that contains the undefined value. This should be used when individual variables in the data file have different undefined values. After data I/O, the missing values in the grid are converted from the variable undef to the file-wide undef (the numerical value in the first argument of the UNDEF record). Then it appears to GrADS that all variables have the same undef value, even if they don't in the original data file. If the data require a transformation using the attributes named in the UNPACK entry, GrADS assumes the variable undef value corresponds to the data values as they appear in the file, i.e., before they are transformed using a scale factor and offset. Missing packed data values are thus assigned the file-wide undef value and are never unpacked. Attribute names are case sensitive, and it is assumed that the name is identical for all variables in the netcdf or hdfsds data file. If the name given does not match any attributes, or if no name is given, the file-wide undef value will be used.
(GrADS version 2.1.0) An optional third argument has been added for data sets of DTYPE netcdf or hdfsds -- it is the name of a secondary attribute that contains another undefined value.
Example: UNDEF 1e+33 missing_value _FillValue

UNPACK scale_factor_attribute_name <add_offset_attribute_name>        back to top
(GrADS version 1.9) This entry is used with DTYPE netcdf, hdfsds, or hdf5_grid (GrADS version 2.0.a7+) for data variables that are 'packed' -- i.e. non-float data that need to be converted to float by applying the following formula:
     y = x * scale_factor + add_offset
If your self-describing file does not have an offset attribute, the 2nd argument may be omitted, and the offset will be assigned the default value of 0.0. If your self-describing file has an offset attribute, but not a scale factor, use "NULL" for the scale_factor_attribute_name. (This "NULL" option is in GrADS version 2.0.0+). Attribute names are case sensitive, and it is assumed that the names are identical for all variables in the netcdf or hdfsds data file. If the names given do not match any attributes, the scale factor will be assigned a value of 1.0 and the offset will be assigned a value of 0.0. The transformation of packed data is done after the undef test has been applied.
Examples:
UNPACK scale_factor add_offset
UNPACK NULL add_offset
UNPACK Slope Intercept
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-1-15 19:19:18 | 显示全部楼层
尽头的尽头 发表于 2018-1-15 08:50
NC数据读不了吗?要自己配CTL

已经写了,但是还读不出爱,我已经附图了
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2018-1-15 19:27:02 | 显示全部楼层
river 发表于 2018-1-15 10:13
UNDEF value          back to top
This entry specifies the undefined or missing data value. UNDEF is a requ ...

非常感谢,但是看不懂呀,能不能帮我看看我的ctl文件错在哪了呢
密码修改失败请联系微信:mofangbao
发表于 2018-1-17 20:07:09 | 显示全部楼层
字俣丞 发表于 2018-1-15 19:27
非常感谢,但是看不懂呀,能不能帮我看看我的ctl文件错在哪了呢

我也没有仔细研究过你的这种资料,每个变量的影响因子和偏移量都不同······我只写过这两个都一样的nc资料的描述文件·····
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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