Re: MODIS data plot: vertical cross section

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 29 2010 - 05:53:05 MST

The data are 2d lat/lon swath.
Please see if rcm2rgrid [rcm2rgrid_Wrap] or rcm2points
can be used to interpolate to the desired latitude.

You can the plot the crosssection using the triangular
mesh graphical option or interpolating to specified
pressure levels. [ef int2p_n]

http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_n_Wrap.shtml

Good luck

On 12/29/10 5:25 AM, Sahidul wrote:
> 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
> ;*********************************
> ; Read in four MODIS HDF files
> ;*********************************
> f = addfile("MOD07_L2.A2010277.0535.005.2010277185110.hdf","r")
>
> ;*************************************************************
> ; Read in cloud temperature
> ;*************************************************************
> wv1s = f->Retrieved_Temperature_Profile(0,:,:)
>
> ; Apply scale and offset and convert to double
> wv1 = wv1s@scale_factor*1.d * (wv1s - wv1s@add_offset)
>
> time = doubletoint(f->Scan_Start_Time(0,0))
> gdate = ut_inv_calendar(1993,1,1,0,0,time(0),"years since 1993-01-01",0)
> date2d = ut_calendar(gdate,0)
> date = date2d(0,:)
> lev = (/300,400,500,600,700,800,900,1000/)
>
> lat2d1 = f->Latitude
> lon2d1 = f->Longitude
>
> ;*************************************************************
> ; Start the graphics
> ;*************************************************************
> wks = gsn_open_wks("ps", "hdf4sds")
> gsn_define_colormap(wks,"rainbow+gray") ; choose colormap
>
> ;*************************************************************
> ; Set some resources that will apply to the base
> ; contour/map plot that we are going to use to
> ; overlay the other contour plots on.
> ;*************************************************************
> res = True
>
> res@gsnMaximize = True ; maximize pot in frame
> res@gsnFrame = False ; don't advance frame
> res@gsnDraw = False ; don't draw plot
>
>
> res@cnFillOn = True ; color Fill
> res@cnFillMode = "CellFill" ; Raster Mode
> res@cnRasterSmoothingOn = True
> res@cnRasterMinCellSizeF = 0.0005
> res@cnLinesOn = False ; Turn off contour lines
> res@cnLineLabelsOn = False ; Turn off contour lines
> res@cnMaxLevelCount = 100
>
> res@gsnSpreadColors = True ; use full colormap
> res@gsnSpreadColorStart = 5
> res@gsnSpreadColorEnd = -2
>
> res@trGridType = "TriangularMesh"
>
> res@gsnAddCyclic = False ; Data is not cyclic
>
> ;******************************************************************
> ; Make a copy of the resources at this point, because these are
> ; the resources we want to apply to the rest of the contour plots
> ; we're going to create later.
> ;******************************************************************
> res1 = res
>
> ;
> ;******************************************************************
> ; Set the rest of the resources that we only want to apply to
> ; the base map/contour plot.
> ;
> ;******************************************************************
> res@lbTitleString = wv1s@long_name
> res@lbTitleFontHeightF = 0.01 ; Make font smaller
> res@lbLabelAutoStride = True ; Nice stride for labels
> res@lbLabelFontHeightF = 0.012 ; Make labels bigger
> res@lbBoxLinesOn = False
>
> res@mpDataBaseVersion = "MediumRes" ; Higher res coastline
> res@mpProjection = "Orthographic"
>
> ; Set limits of map, based on the min/max of all four datasets.
> res@mpLimitMode = "LatLon"
> res@mpMinLatF = min((/lat2d1/))
> res@mpMaxLatF = max((/lat2d1/))
> res@mpMinLonF = min((/lon2d1/))
> res@mpMaxLonF = max((/lon2d1/))
> res@mpGridAndLimbOn = True
> res@mpCenterLonF = 80 ; change map center
> res@mpCenterLatF = 20
>
> res@pmTickMarkDisplayMode = "Always"
>
> res@tiMainString = "Four MODIS swaths : " + date(0) +
> "/" + \
> date(1) + "/" + date(2) + " " + \
> date(3) + ":" + date(4) + " - 18:45"
>
> res@sfXArray = lon2d1
> res@sfYArray = lat2d1
>
> res = True
> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
> res@cnMinLevelValF = 200
> res@cnMaxLevelValF = 300
> res@cnLevelSpacingF = 5
> plot = gsn_csm_contour_map(wks,wv1, res)
> draw(plot)
> frame(wks)
> end
> =================================
>
> Kindly help me to sort the problems.
>
> Thanking you,
>
>
>
> _______________________________________________
> 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
Received on Wed Dec 29 05:53:19 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 04 2011 - 09:16:52 MST