Re: AMSR-E Swath attributes reading problem

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 15 2011 - 08:19:33 MST

Read the file without the he2 extension:

eos_file=addfile("AMSR_E_L2A_BrightnessTemperatures_V10_200501180027_D.hdf","r")
print(eos_file)

===
 From the coammand line:
%> ncl_filedump AMSR_E_L2A_BrightnessTemperatures_V10_200501180027_D.hdf
| less

Good luck

On 2/15/11 7:40 AM, H. Joe Lee wrote:
> Hi,
>
> I found a problem in reading attributes from AMSR-E HDF-EOS2 swath
> data file with NCL.
>
> Here's the detail.
>
> [Environment]
> NCL Version: 5.2.1
> OS: CentOS Linux 32-bit
> Input file: NSIDC AMSR_E Swath. See [1] below for URL.
>
> [Code]
> begin
> eos_file=addfile("AMSR_E_L2A_BrightnessTemperatures_V10_200501180027_D.hdf.he2",
> "r") data_unscaled=eos_file->89_0V_Res_5B_TB__not_resampled__High_Res_B_Swath
> ; read specific subset of data field
> ; print(eos_file);
> printVarSummary(data_unscaled)
> print(data_unscaled@UNIT)
> end
>
> [Output of the above code]
> Variable: data_unscaled
> Type: short
> Total Size: 1941084 bytes
> 970542 values
> Number of Dimensions: 2
> Dimensions and sizes: [DataTrack_lo_High_Res_B_Swath | 1997] x
> [DataXTrack_hi_High_Res_B_Swath | 486]
> Coordinates:
> Number Of Attributes: 2
> coordinates : Latitude_High_Res_B_Swath, Longitude_High_Res_B_Swath
> hdfeos_name : 89.0V_Res.5B_TB_(not-resampled)]
> warning:Attempt to reference attribute (UNIT) which is undefined
> (0) -999
>
> [Problem]
> If you look at the input file with HDFView as shown in [2], you will
> see "UNIT", "OFFSET", and "SCALE_FACTOR" attributes associated with
> the swath dataset. However, NCL doesn't read them properly. Thus, I
> cannot apply the "short2flt_hdf()" function to the swath datatset.
>
> [Discussion]
> I know I can assign attributes manually and apply scale factor and
> offset but I think it would be great if NCL can read those attributes
> automatically.
>
>
> [References]
> [1] ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/NASAHDF/AMSR_E_L2A_BrightnessTemperatures_V10_200501180027_D.hdf
> [2] ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/joe/ncl/AMSR_E_L2A_BrightnessTemperatures_V10_200501180027_D.hdf.89.0V_Res.5B_TB_%28not-resampled%29.attributes.jpg
> --
> 1.217.531.6125
> Docs into PDF, Data into HDF.
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 15 08:19:40 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 09:43:19 MST