;; ----------------------------------------------------- ;; AUTHOR: ZIQIANG JIANG, NANJING UNIVERSITY, 06/01/2013 ;; ----------------------------------------------------- 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" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" begin ;; hdf = addfile("hdf.nc","r") cntrl = addfile("swall.nc","r") ;; landuse = getvar2d(hdf,"LU_INDEX") hdf = addfile("/users9/archive/modis/MYD08_M3/2011.032/MYD08_M3.A2011032.051.2011062092814.hdf","r") AOD1 = hdf->Optical_Depth_Land_And_Ocean_Mean_Mean AOD = AOD1@scale_factor*(AOD1-AOD1@add_offset) < 1. ;; AODF = hdf->Optical_Depth_Ratio_Small_Land_And_Ocean_Mean_Mean ;; xx = hdf->Corrected_Optical_Depth_Land_Mean_Mean ;; yy = hdf->Optical_Depth_Ratio_Small_Land_Mean_Mean ;; Mass_Concentration_Land_Mean_Mean ;; Angstrom_Exponent_Land_Mean_Mean ;; Deep_Blue_Aerosol_Optical_Depth_Land_Mean_Mean lon = hdf->XDim lat = hdf->YDim ;; AOD!0 ="lat" ;; AOD!1="lon" ;; AOD&lat = lat(::-1) ;; AOD&lon = lon printVarSummary(AOD) ;; print(lon) ;; print(lat) ;; open graphics file wks = gsn_open_wks("pdf","test") gsn_define_colormap(wks,"rainbow") res = True res@gsnFrame = False res@gsnDraw = False mpres = res mpres@tfDoNDCOverlay = True mpres@mpDataBaseVersion = "MediumRes" mpres@mpDataSetName = "Earth..4" mpres@mpDataResolution = "Coarsest" mpres@mpProjection = "LambertConformal" minlat=-90 maxlat=90 minlon=-180 maxlon=180 mpres@mpMaxLonF=maxlon mpres@mpMinLonF=minlon mpres@mpMaxLatF=maxlat mpres@mpMinLatF=minlat mpres@mpProjection = "CylindricalEquidistant" ; default is CylindricalEquidistant, recommend mpres@mpLimitMode="LatLon" ;; mpres@mpProjection = "LambertConformal" ;; mpres@mpLambertParallel1F = 30. ;; mpres@mpLambertParallel2F = 60. ;; mpres@mpLambertMeridianF = 118. ;; mpres@mpLimitMode = "Corners" ;; mpres@mpLeftCornerLatF = 28.866 ;; mpres@mpLeftCornerLonF = 116.528 ;; mpres@mpRightCornerLatF = 33.5417 ;; mpres@mpRightCornerLonF = 123.124 mpres@mpFillOn = False mpres@mpOutlineBoundarySets = "Geophysical" mpres@mpGeophysicalLineThicknessF = .1 mpres@pmTickMarkDisplayMode = "Always" mpres@tmXTOn = False mpres@tmYROn = False mpres@tmXBLabelFontHeightF = .02 mpres@cnFillOn = True mpres@cnLinesOn = False mpres@cnFillMode = "RasterFill" mpres@sfXArray = lon mpres@sfYArray = lat plres = True plot = gsn_csm_contour_map(wks,AOD, mpres) gsn_panel(wks,(/plot/),(/1,1/),plres) end