;************************************************* ; ;************************************************* ;---------------------------------------------------------------------- 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/wrf/WRFUserARW.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" load "./print_binned_info.ncl" begin ; ----Defining for Once ----- wks = gsn_open_wks("png","test1") Plot = new(2,graphic) ; Reading File----------------- ; dir = "/home/aditya/geeta/ncl/h5/" dir = "./" fname = "3DIMG_23JUN2018_0300_L1C_ASIA_MER.h5" f = addfile(dir + fname,"r") ; printVarSummary(f) print(f) var = getfilevarnames(f) ; print(var) TIME = f->time ; ; Note that we are reversing the Y (latitude) using the "::-1" syntax. ; This is being done because the plot looks more "correct" this way. ; HOWEVER, you must know your data and determine if this is correct. ; MIR = f->IMG_MIR(:,::-1,:) ; Reverse the Y dimension MIR@_FillValue = integertoshort(1023) printVarSummary(MIR) print("MIRi ") printMinMax(MIR,True) MIRF = MIR*MIR@lab_radiance_scale_factor+MIR@lab_radiance_add_offset ; Check Dennis mail 01.08.2018 copy_VarMeta(MIR,MIRF) ; Mary's email dated 17.08.2018 printVarSummary(MIRF) printMinMax(MIRF,True) proj = f->Projection_Information ; printVarSummary(proj) ; printMinMax(proj,True) res = True ; Set -----------MAP ---- res@mpProjection = "Mercator" res@tfDoNDCOverlay = True ; tells NCL we are going to use the native map projection ; These resources are an attempt to define the native map projection. ; You will need to read the documentation associated with this H5 file ; to see if there's any additional information needed to get the projection ; correct. res@mpLimitMode = "Corners" res@mpLeftCornerLatF = proj@$"lower_left_lat_lon(degrees)"$(0) res@mpLeftCornerLonF = proj@$"lower_left_lat_lon(degrees)"$(1) res@mpRightCornerLatF = proj@$"upper_right_lat_lon(degrees)"$(0) res@mpRightCornerLonF = proj@$"upper_right_lat_lon(degrees)"$(1) res@mpCenterLonF = proj@longitude_of_projection_origin res@mpFillOn = False res@pmTickMarkDisplayMode = "Always" res@mpDataBaseVersion = "MediumRes" res@mpOutlineBoundarySets = "AllBoundaries" res@cnFillOn = True res@cnLinesOn = False res@cnFillPalette = "prcp_2" res@cnFillMode = "RasterFill" ;:::::: GSN resources:::::::::::::: res@gsnMaximize = True res@gsnAddCyclic= False levels_mir = (/500,600,650,700,800,825,850,875,900,950,975/) levels_mirf = (/0,0.16,0.18,0.20,0.21,0.22,0.23,0.24,0.25,0.26,0.27/) print_binned_info(MIR(0,:,:),levels_mir) print_binned_info(MIRF(0,:,:),levels_mirf) res@cnLevelSelectionMode = "ExplicitLevels" res@cnLevels = levels_mir Plot(0) = gsn_csm_contour_map(wks,MIR(0,:,:),res) res@cnLevels := levels_mirf Plot(1) = gsn_csm_contour_map(wks,MIRF(0,:,:),res) ; print(MIR&lat+"-----------+"+lati) ; print(lati) end