- 积分
- 45254
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-8-28
- 最后登录
- 1970-1-1
|
发表于 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 |
|