[ncl-talk] hdf file to netcdf
Vanúcia Schumacher
vanucia-schumacher at hotmail.com
Wed Feb 13 13:19:29 MST 2019
Hi NCL team
I would like to convert data in hdf to netcdf.
I tried to use ncl_convert2nc, but it did not work:
Classic mode NetCDf does not support unsigned integer types: LST will be written as type short
Classic mode NetCDf does not support unsigned integer types: QC will be written as type short
Classic mode NetCDf does not support unsigned integer types: Error_LST will be written as type byte
Classic mode NetCDf does not support unsigned integer types: Emis_31 will be written as type byte
Classic mode NetCDf does not support unsigned integer types: Emis_32 will be written as type byte
Classic mode NetCDf does not support unsigned integer types: View_angle will be written as type byte
Classic mode NetCDf does not support unsigned integer types: View_time will be written as type byte
I also tried this and it did not work (data attached):
fils = ("MOD11_L2.hdf")
f = addfile(fils, "r")
var = short2flt_hdf(f->LST)
printVarSummary(var)
var!0 = "lat"
var!1 = "lon"
...
var original:
Type: float
Total Size: 11102800 bytes
2775700 values
Number of Dimensions: 2
Dimensions and sizes: [Along_swath_lines_1km_MOD_Swath_LST | 2050] x [Cross_swath_pixels_1km_MOD_Swath_LST | 1354]
Coordinates:
Number Of Attributes: 11
long_name : Land-surface Temperature
units : K
Number_Type : uint16
valid_range : ( 7500, 65535 )
LST : LST data * scale_factor
scale_factor_err : 0
add_offset_err : 0
calibrated_nt : 5
hdf_name : LST
_FillValue_original : 0
_FillValue : 0
Variable: new_var
Type: float
Total Size: 11102800 bytes
2775700 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 2050] x [lon | 1354]
Coordinates:
Number Of Attributes: 11
long_name : Land-surface Temperature
units : K
Number_Type : uint16
valid_range : ( 7500, 65535 )
LST : LST data * scale_factor
scale_factor_err : 0
add_offset_err : 0
calibrated_nt : 5
hdf_name : LST
_FillValue_original : 0
_FillValue : 0
Variable: new_var
Type: float
Total Size: 11102800 bytes
2775700 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 2050] x [lon | 1354]
Coordinates:
Number Of Attributes: 11
_FillValue : 0
_FillValue_original : 0
hdf_name : LST
calibrated_nt : 5
add_offset_err : 0
scale_factor_err : 0
LST : LST data * scale_factor
valid_range : ( 7500, 65535 )
Number_Type : uint16
units : K
long_name : Land-surface Temperature
warning:Argument 0 of the current function or procedure was coerced to the appropriate type and thus will not change if the function or procedure modifies its value
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190213/d4da03ab/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MOD11_L2.hdf
Type: application/x-hdf
Size: 1540967 bytes
Desc: MOD11_L2.hdf
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190213/d4da03ab/attachment-0001.hdf>
More information about the ncl-talk
mailing list