Re: MISR data processing

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 06 Aug 2007 13:32:15 -0600

Hi Lin

The XDim and YDim below are dimension sizes .... not coordinate variables.
There are not even variables.
          
A coordinate variable would look like XDim(XDim).

Also ... I speculate your file is a hdf-eos file.
That UpperLeft... etc is telling you the grid orientation.

Something like the following

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin
  a = addfile("LinSU.hdf" ,"r")
 ;a = addfile("LinSU.hdfeos","r")

  x = a->optical_depth ; use the name of the variable
 
  YDim = 360
  lat = *latGlobeFo*(YDim, "lat", "latitude", "degrees_north")
  lat = lat(::-1)

  XDim = 720
  lon = *lonGlobeFo*(XDim, "lon", "longitude", "degrees_east")
  lon = (/ lon - 180. /) ; subtract 180 from all values
  lon&lon = lon ; update coordinates
  
  x!0 = "lat"
  x!1 = "lon"
  x&lat = lat
  x&lon = lon
  wks = gsn_open_wks("ps","MISR")
  res = True
 ;res@..... = .... ;add desired resources
  plot = gsn_csm_contour_map_ce(wks,x,res)
end

Lin Su wrote:
> Hi Dennis,
>
> By ncl_filedump, I found the following information:
> ------------------------
> ..............
> GridName="AerosolParameterAverage"
> XDim=720
> YDim=360
> UpperLeftPointMtrs=(-180000000.000000,90000000.000000)
> LowerRightMtrs=(180000000.000000,-90000000.000000)
> .............
> OBJECT=DataField_3
> DataFieldName="Optical depth average"
> DataType=DFNT_FLOAT32
> DimList=("YDim","XDim")
> ---------------------------------
>
> The "Optical depth average" is what I need. Sounds YDim and XDim are the variables in MISR:)
>
> Any other suggestions?
>
> Thanks again,
> -Lin
>
>
>
>
> ---- Original message ----
>
>> Date: Sat, 4 Aug 2007 17:39:46 -0600 (MDT)
>> From: Dennis Shea <shea_at_ucar.edu>
>> Subject: Re: MISR data processing
>> To: Lin Su <Lin.Su_at_Colorado.EDU>
>> Cc: ncl-talk_at_ucar.edu
>>
>> XDIM is likely not a variable on the MISR file.
>>
>>
>> Do an ncl_filedump on the file to see the contents.
>>
>> Good luck,
>> On Sat, 4 Aug 2007, Lin Su wrote:
>>
>>
>>> Dear all,
>>>
>>> As Dennis Shea kindly mentioned to me that I should define a netCDF "coordinate variable" when I use NCL's gsn_CSM* interfaces to plot correctly. I did this when I processed MODIS data, and I got the plot looks perfect! However, when I tried the same methods on MISR data, it always showed error like this:
>>> ---------------------------
>>> fatal:Either file (tmp_list_var_769) isn't defined or variable (XDim) is not a variable in the file
>>> fatal:Execute: Error occurred at or near line 39 in file misr_aod_mon_mean.ncl
>>> -----------------------------------------------------
>>>
>>> BTW, here is the definition at the new coordinate variable:
>>> ------------------------------------
>>> lon3=hists3[:]->XDim
>>> lat3=hists3[:]->YDim
>>> lat3!0="lat3"
>>> lat3_at_units="degree_north"
>>> lon3!0="lon3"
>>> lon3_at_units="degree_east"
>>> ------------------------------------------
>>>
>>> Any suggestions?
>>>
>>> Thanks everyone so much,
>>> -Lin
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk_at_ucar.edu
>>> 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
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 06 2007 - 13:32:15 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 07 2007 - 18:08:19 MDT