Re: swath contour plot

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 11 2010 - 09:33:42 MST

>> Fang, Fan (GSFC-610.2)[ADNET SYSTEMS INC] wrote:
> I am plotting to view the Air Mass Factor variable of a OMI swath data
> (OMBRO.003) using NCL. Attached is the plot. It almost seems like that
> NCL is over-plotting the contours - most of the larger triangle-like
> area shall not be part of the swath of any orbiting satellite view. I
> wonder if there are any resources that I need to set to avoid this.
> Help is very much appreciated.
================
The response was inadvertently not sent to ncl-talk.

NCL is plotting the data correctly. There were many points at
high southern latitudes.

The file is a HDF5-EOS file [.he5] which is supported by the yet to be
released 5.2.0

OMI-Aura_L2-OMBRO_2006m0105t1414-o07854_v003-2008m0622t111235.he5

A simple script follows:

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
   pltName = "he5eos" ; any name
   pltType = "ps" ; x11, ps, pdf
;******************************************************************
; open file; read desired variable and coordinate information
;******************************************************************
   diri = "./"
   fili =
"OMI-Aura_L2-OMBRO_2006m0105t1414-o07854_v003-2008m0622t111235.he5"
   f = addfile (diri+fili, "r")

   x = f->AirMassFactor_OMI_Total_Column_Amount_BrO
   latx = f->Latitude_OMI_Total_Column_Amount_BrO
   lonx = f->Longitude_OMI_Total_Column_Amount_BrO

;******************************************************************
; print variable overview and min/max
;******************************************************************
   printVarSummary( x )
   printMinMax( x, True )

   printVarSummary( latx )
   printMinMax( latx, True )

   printVarSummary( lonx )
   printMinMax( lonx, True )

;******************************************************************
; create plot
;******************************************************************

   wks = gsn_open_wks(pltType, pltName)
   gsn_define_colormap(wks, "amwg")

   res = True ; plot mods desired
   res@gsnMaximize = True ; maximize plot
   res@gsnAddCyclic = False ; data not cyclic

   res@cnFillOn = True ; turn on color fill
   res@cnLinesOn = False ; turn on contour lines
   res@cnFillMode = "RasterFill" ; turn on raster mode
   res@lbLabelAutoStride = True ; NCL will choose spacing

  ;res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
  ;res@cnMinLevelValF = ; set min contour level
  ;res@cnMaxLevelValF = ; one less than max
  ;res@cnLevelSpacingF = ; set contour spacing

   res@trGridType = "TriangularMesh" ; data are 'random'
   res@sfXArray = lonx
   res@sfYArray = latx

   res@mpFillOn = False ; turn off map fill

   res@tiMainString = fili

   map = gsn_csm_contour_map_ce(wks, x, res) ; map

   res@mpMinLatF = -60 ; range to zoom in on
   res@mpMaxLatF = 70.
   res@mpMinLonF = -80.
   res@mpMaxLonF = 30.

   plot = gsn_csm_contour_map_ce(wks, x, res)

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 11 09:33:47 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 11 2010 - 09:50:35 MST