Re: NCL Debugging and HDF-EOS Support for AMSR-E LAMAZ Projection?

From: Stewart Dickson <s-dickson_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 12 2011 - 07:32:53 MDT

On 4/11/2011 5:50 PM, Dennis Shea wrote:
> NCL 6.0.0-beta has different "literal suffix" for the differnt types
> EK ubyte has "B"
>
> 0B
>
> See:
> http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclDataTypes.shtml
>
The NCL HDF4 interface says that SWE_NorthernPentad has type 'ubyte'
_FillValue : 255
The HDF-EOS interface says that SWE_NorthernPentad has type signed byte
_FillValue :-1 unsigned : True
(NCL is contradicting itself, I think)
I am using the HDF-EOS interface:
addfile("AMSR_E_L3_5DaySnow_V09_20050126.hdf*.he2*", "r")

If I use data@_FillValue=0B, then I encounter:
> fatal:Type Mismatch: The type of missing value could not be converted
> to type of variable (data)
> fatal:Execute: Error occurred at or near line 44 in file
> AMSR_E_L3_5DaySnow_NH_SWE.ncl
line 44: data@_FillValue=0B

Thanks,

-Stewart
>
> On 04/11/2011 04:41 PM, Stewart Dickson wrote:
>> Thank you, Wei,
>>
>> Yes, I was previously using: ncl_ncarg-5.2.1.Linux_RedHat_i686_gcc412
>> I have just now downloaded and installed:
>> ncl_ncarg-6.0.0-beta.Linux_RedHat_i686_gcc412
>> I find the results from the on-line example script:
>> http://www.hdfeos.org/zoo/index_openNSIDC_Examples.php ->
>> AMSR_E_L3_SeaIce6km_V11_20050118_SI_06km_NH_89V_DAY.ncl
>> <http://www.hdfeos.org/zoo/NSIDC/AMSR_E_L3_SeaIce6km_V11_20050118_SI_06km_NH_89V_DAY.ncl>
>>
>> To be the same as what I obtained previously (the control case) ;)
>> I see the same results in ncl_ncarg-6.0.0-beta.Linux_RedHat_i686_gcc412
>> as you report for
>> ncl_filedump AMSR_E_L3_5DaySnow_V09_20050126.hdf
>> and
>> ncl_filedump AMSR_E_L3_5DaySnow_V09_20050126.hdf.he2
>>
>> I note the difference in data field type and _FillValue as reported by
>> the NCL HDF4 interface vs. the NCL HDF-EOS interface:
>> ncl_filedump AMSR_E_L3_5DaySnow_V09_20050126.hdf
>> variables:
>> ubyte SWE_NorthernPentad ( YDim_Northern_Hemisphere,
>> XDim_Northern_Hemisphere )
>> _FillValue : 255
>> hdf_name : SWE_NorthernPentad
>> ncl_filedump AMSR_E_L3_5DaySnow_V09_20050126.hdf.he2
>> (signed)byte SWE_NorthernPentad_Northern_Hemisphere
>> _FillValue :-1
>>
>> I am using:
>> eos_file=addfile("AMSR_E_L3_5DaySnow_V09_20050126.hdf.he2", "r") ; The
>> HDF-EOS2 Interface
>> and
>> data=eos_file->SWE_NorthernPentad_Northern_Hemisphere ; read data
>> field(:,:)
>>
>> Do I also see correctly from ncl_filedump
>> AMSR_E_L3_5DaySnow_V09_20050126.hdf.he2
>> that
>> data@lon2d=eos_file->GridLon_Northern_Hemisphere
>> and
>> data@lat2d=eos_file->GridLat_Northern_Hemisphere
>> Should be well-defined?
>>
>> I am using the following:
>> data@_FillValue=0b ; Making this double assignment allows the _FillValue
>> of 0
>> ; to be properly represented.
>> data@_FillValue=-1b
>> xwks=gsn_open_wks("pdf","AMSR_E_L3_5DaySnow_V09_20050126_SWE_NH")
>> res=True ; plot mods desired
>> res@... ; Options
>> plot=gsn_csm_contour_map(xwks,data,res) ; create plot
>>
>> I am (still) seeing:
>> fatal:NhlCvtStringToEnum: Unable to convert string "missing" to
>> requested type
>> warning:Error retrieving resource amJust from args - Ignoring Arg
>> fatal:NhlCvtStringToEnum: Unable to convert string "missing" to
>> requested type
>> warning:Error retrieving resource amSide from args - Ignoring Arg
>> ...
>> (Repeated 12 times)
>> ERROR 2 IN MAPPOS/MDPPOS - ARGUMENTS ARE INCORRECT
>> ERROR 1 IN MAPSTI - UNCLEARED PRIOR ERROR
>> ERROR 1 IN MAPROJ - UNCLEARED PRIOR ERROR
>> ERROR 2 IN MAPSET/MDPSET - UNCLEARED PRIOR ERROR
>> fatal:MapSetTrans: error initializing map: MAPINT - UNCLEARED PRIOR
>> ERROR
>> warning:PDFWorkstationInitialize:Device X Coordinates invalid,
>> defaulting
>> warning:PDFWorkstationInitialize:Device Y Coordinates invalid,
>> defaulting
>>
>> This time, in ncl_ncarg-6.0.0-beta.Linux_RedHat_i686_gcc412, NCL
>> produces a PDF file with map axes, grid lines, decoration (continental
>> outlines, etc.) but no contour plot data; whereas previously, in
>> ncl_ncarg-5.2.1.Linux_RedHat_i686_gcc412, NCL produced no output file.
>>
>> Thanks again,
>>
>> -Stewart
>>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 12 23:33:08 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 19 2011 - 18:32:03 MDT