Re: Error trying to plot a MODIS data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 01 2011 - 16:10:58 MDT

It is best to use the following to unpack your data
 
http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt_hdf.shtml
================================================
Your variable "wv1s" is 3D as speculated by BrianM

Variable: wv1s
Type: short
Total Size: 164430 bytes
             82215 values
Number of Dimensions: 3
Dimensions and sizes: [Num_DeepBlue_Wavelengths_mod04 | 3] x
[Cell_Along_Swath_mod04 | 203] x [Cell_Across_Swath_mod04 | 135]
Coordinates:
Number Of Attributes: 11
   valid_range : ( 0, 10000 )
   _FillValue : -9999
   long_name : Standard Deviation of AOT at 0.412, 0.47, and 0.66
micron for land with all quality data (Quality flag=1,2,3)
   units : None
   scale_factor : 0.001000000047497451
   add_offset : 0
   Parameter_Type : Output
   Cell_Along_Swath_Sampling : ( 5, 2025, 10 )
   Cell_Across_Swath_Sampling : ( 5, 2025, 10 )
   Geolocation_Pointer : Internal geolocation arrays
   hdf_name : Deep_Blue_Aerosol_Optical_Depth_Land_STD
(0)
(0) Standard Deviation of AOT at 0.412, 0.47, and 0.66 micron for
land with all quality data (Quality flag=1,2,3): min=-32767 max=-32767

============================================================
  wv1s = f->Deep_Blue_Aerosol_Optical_Depth_Land_STD
   printVarSummary(wv1s)
   printMinMax(wv1s, True)

   print(wv1s(0,:,:)+" "+wv1s(1,:,:)+" "+wv1s(2,:,:))

Every variable is -9999 which is _FillValue

============================================================

After unpacking (short2flt_hdf)

ariable: wv1
Type: float
Total Size: 328860 bytes
             82215 values
Number of Dimensions: 3
Dimensions and sizes: [Num_DeepBlue_Wavelengths_mod04 | 3] x
[Cell_Along_Swath_mod04 | 203] x [Cell_Across_Swath_mod04 | 135]
Coordinates:
Number Of Attributes: 10
   _FillValue_original : -9999
   _FillValue : -9999
   long_name : Standard Deviation of AOT at 0.412, 0.47, and 0.66
micron for land with all quality data (Quality flag=1,2,3)
   units : None
   Parameter_Type : Output
   Cell_Along_Swath_Sampling : ( 5, 2025, 10 )
   Cell_Across_Swath_Sampling : ( 5, 2025, 10 )
   Geolocation_Pointer : Internal geolocation arrays
   hdf_name : Deep_Blue_Aerosol_Optical_Depth_Land_STD
   valid_range : ( 0, 10 )

There is nothing to plot ... all missing

On 09/01/2011 02:52 PM, Mary Haley wrote:
> Oluseun,
>
> Brian indicated below what the problem likely is: you are probably
> trying to plot a 3D variable, and gsn_csm_contour_xxxx only accepts 1D
> or 2D arrays. He also indicated how to fix this. Did you give this a try?
>
> As a side: the reason the error message mentions "gsn_csm_map_other" is
> because the map projection was set to "Orthographic". Under the hood,
> this function is called by gsn_csm_contour_map to generate the plot.
> When you do a cylindrical equidistant plot, it uses
> "gsn_csm_contour_map_ce" under the hood. "gsn_csm_contour_map_polar" is
> used for polar stereographic plots.
>
> --Mary
>
>
> On Sep 1, 2011, at 2:42 PM, Idowu, Oluseun S. (UMKC-Student) wrote:
>
>> My NCL version = 6.0.0
>> My type of system = Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36
>> PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
>>
>> Thanks
>> --------------------------------------
>> Oluseun S. IDOWU
>> Department of Geosciences
>> 420 Robert H. Flarsheim Hall
>> 5110 Rockhill Road University of Missouri-Kansas City
>> Kansas City, MO 64110-2499, USA
>> Tel: +1 816 235 5995; Fax: +1 816 235 5535
>> Mobile: +1 816 359 7030; E-mail: oluseun.idowu@mail.umkc.edu
>> <mailto:oluseun.idowu_at_mail.umkc.edu>; Web:http://oluseunidowu.webs.com/--
>>
>>
>> From: Brian Medeiros <brianpm@ucar.edu <mailto:brianpm@ucar.edu>>
>> Date: Thu, 1 Sep 2011 11:40:47 -0600
>> To: "Idowu, Oluseun S. (UMKC-Student)" <oluseun.idowu@mail.umkc.edu
>> <mailto:oluseun.idowu@mail.umkc.edu>>, <ncl-talk@ucar.edu
>> <mailto:ncl-talk@ucar.edu>>
>> Subject: Re: Error trying to plot a MODIS data
>>
>> I don't know why it would say gsn_csm_contour_map_other, but it looks
>> like your variable wv1 in the line
>> plot = gsn_csm_contour_map(wks,wv1,res)
>>
>> has more than 2 dimensions. Try printVarSummary(wv1) to see, probably
>> you'll need something like plot = gsn_csm_contour_map(wks,wv1(0,:,:),res)
>>
>> .brian
>>
>> On Sep 1, 2011, at 11:23 AM, Idowu, Oluseun S. (UMKC-Student) wrote:
>>
>>> Hi All,
>>>
>>> I'm trying to read and display a sample MODIS data I've downloaded to
>>> begin to understand how to manipulate this data with NCL for my
>>> dissertation and I keep getting error. Pls see below.
>>>
>>> I attach my script. Thanks
>>>
>>> KC-dept-serialnumber:PhD oluseunidowu$ ncl readMODIS2.ncl
>>> Copyright (C) 1995-2011 - All Rights Reserved
>>> University Corporation for Atmospheric Research
>>> NCAR Command Language Version 6.0.0
>>> The use of this software is governed by a License Agreement.
>>> See http://www.ncl.ucar.edu/ for more details.
>>> (0)gsn_csm_contour_map_other: Fatal: the input data array must be 1D
>>> or 2D
>>> fatal:Illegal right-hand side type for assignment
>>> fatal:Execute: Error occurred at or near line 143 in file readMODIS2.ncl
>>>
>>>
>>> --------------------------------------
>>> Oluseun S. IDOWU
>>> Department of Geosciences
>>> 420 Robert H. Flarsheim Hall
>>> 5110 Rockhill Road University of Missouri-Kansas City
>>> Kansas City, MO 64110-2499, USA
>>> Tel: +1 816 235 5995; Fax: +1 816 235 5535
>>> Mobile: +1 816 359 7030; E-mail: oluseun.idowu@mail.umkc.edu
>>> <mailto:oluseun.idowu@mail.umkc.edu>;
>>> Web:http://oluseunidowu.webs.com/--
>>>
>>> <readMODIS2.ncl><ATT00001..txt>
>>
>> _______________________________________________
>> 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

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Thu Sep 1 16:11:05 2011

This archive was generated by hypermail 2.1.8 : Wed Sep 07 2011 - 10:58:58 MDT