Re: HDF file processing

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

Sorry for the repeat:) Here is the header for the variable in HDF file:
-------------------------------------------------------
short Optical_Depth_Land_And_Ocean_Mean ( YDim_mod08, XDim_mod08 )
         valid_range : <ARRAY>
         _FillValue : -9999
         long_name : Aerosol Optical Thickness at 0.55 microns for both Ocean (best) and Land (corrected): Mean
         units : none
         scale_factor : 0.001
         add_offset : 0
         Level_2_Pixel_Values_Read_As : Real
         Derived_From_Level_2_Data_Set : Optical_Depth_Land_And_Ocean
         Included_Level_2_Nighttime_Data : False
         Quality_Assurance_Data_Set : None
         Statistic_Type : Simple
         Aggregation_Data_Set : None
         hdf_name : Optical_Depth_Land_And_Ocean_Mean
-------------------------------------------------------------
Thanks again,
Lin

---- Original message ----
>Date: Tue, 12 Jun 2007 08:41:08 -0600 (MDT)
>From: Lin Su <sul_at_Colorado.EDU>
>Subject: HDF file processing
>To: ncl-talk_at_ucar.edu
>
>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:49:13 MDT

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