;:::::::::::::::::::::::::::::::::: diri = "./" diri = "/project/cas/shea/HDF/" ; CGD fils=systemfunc("cd "+diri+"; ls xMOD06_L2*.hdf") print(fils) print("---") nfils = dimsizes(fils) ;varName = "Cloud_Top_Pressure" ; hdf varName = "Cloud_Top_Pressure_mod06" ; he2 pltType = "png" pltName = "1_modis_ctp_349" pltDir = "./" ;::::::::::::::::::::::::::::::::::::::::::: wks=gsn_open_wks(pltType, pltDir+pltName) res=True ; plot mods desired ;res@gsnMaximize = True ; make plot large res@gsnFrame = False ; don't advance frame res@gsnDraw = False res@mpGeophysicalLineThicknessF= 2. ; double the thickness of geophysical boundaries ;::::::ZOOM:::::::::::; res@mpMinLatF = 20 res@mpMaxLatF = 48 res@mpMinLonF = 30 res@mpMaxLonF = 95 ;:::::::::::::Title&Plotting:::::::::::::::: res@tiMainString=varName ; create title plot=gsn_csm_map_ce(wks,res) ; map background ; delete map resources delete([/ res@tiMainString, res@mpGeophysicalLineThicknessF \ , res@mpMinLatF, res@mpMaxLatF \ , res@mpMinLonF, res@mpMaxLonF /] ) res@cnLinesOn =False ; turn off contour lines ;res@cnLineLabelsOn =True ; default; turn off contour line labels ;res@gsnSpreadColors =True ; default; use the entire color spectrum res@cnFillOn =True ; enable contour fill res@cnMissingValFillPattern = 0 res@cnFillMode ="RasterFill" res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = 1000 ; min level res@cnMaxLevelValF = 10000 ; max level res@cnLevelSpacingF = 1000 ; contour interval res@pmLabelBarOrthogonalPosF = 0.075 res@tiMainOn = False res@gsnLeftString = "" res@gsnRightString = "" res@lbLabelFontHeightF = 0.012 plot2 = new(nfils,graphic) do nf=0,nfils-1 print("") print("***********************") print("===> "+ fils(nf) + "<===") print("***********************") print("") ;f = addfile(diri+fils(nf),"r") f = addfile(diri+fils(nf)+".he2","r") cl = f->$varName$ printVarSummary(cl) ; Look at variable printMinMax(cl,0) print("-----") ; each swath has different lat/lon ;lat2d = f->Latitude ; hdf ;lon2d = f->Longitude lat2d = f->Latitude_mod06 ; he2 lon2d = f->Longitude_mod06 printVarSummary(lat2d) ; Look at variable printMinMax(lat2d,0) print("-----") printVarSummary(lon2d) ; Look at variable printMinMax(lon2d,0) print("-----") cl@lat2d = lat2d ; attach for plot cl@lon2d = lon2d plot2(nf)=gsn_csm_contour(wks,cl,res) ; contour overlay(plot,plot2(nf)) end do ; end file loop draw(plot) frame(wks) ; advance frame