HDF file processing

From: Lin Su <Lin.Su_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 Jun 2007 08:41:08 -0600 (MDT)

Dear NCL users,

I am trying to read in the existing HDF file (MODIS data), and then plot the contour map. However, it always showed that there is error in these two sentences, and I know this is the key issue for that I couldn't get the plot:
----------------------------------
 aod33&lat = Optical_Depth_Land_And_Ocean_Mean&YDim_mod08
 aod33&lon = Optical_Depth_Land_And_Ocean_Mean&XDim_mod08
---------------------------------------------------------

Also, attached please find the whole scripts for read-in HDF data:
-------------------------------------------------
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/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin

;=================================================
; open history files and read in data
;=================================================
 
 path = "/Volumes/Data/Models/cam/AOD/modis/col5/"
 FileHandle = path + "*D3*94*.hdf"
 files = systemfunc("ls " + FileHandle)
 hists = addfiles(files, "r")
 aod3=addfiles_GetVar(hists, files, "Optical_Depth_Land_And_Ocean_Mean")
 printVarSummary(aod3)
 dims = dimsizes(aod3)
; get the dimension of the history files
  nlat = dims(0)
  nlon = dims(1)

 aod33 = new((/nlat,nlon/),"float")
 aod33!0 = "lat"
 aod33!1 = "lon"
 aod33_at_units = ""
 aod33_at_name = "Dust Optical Depth"

 aod33&lat = Optical_Depth_Land_And_Ocean_Mean&YDim_mod08
 aod33&lon = Optical_Depth_Land_And_Ocean_Mean&XDim_mod08
  ;aod33&lat = Optical_Depth_Land_And_Ocean_Mean&YDim
  ;aod33&lon = Optical_Depth_Land_And_Ocean_Mean&XDim

 lat = aod33&lat
 lon = aod33&lon

 aod33_at_long_name = "MODIS"
 aod33_at_units = ""

 aod33 = 0.001*aod3
;=================================================
; create plots
;=================================================
....
---------------------------------------------------------

Could anybody kindly take a look at the scripts and tell me the incorrect coding?

Thanks a bunch,
-Lin
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 12 2007 - 08:41:08 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 14 2007 - 09:39:54 MDT