Hi there,
I regridded some ims data from 1024x1024 to EASE grid format, 721x721. The
NSIDC tool I used for the transform output the data in hexadecimal form so I
used ncl's stringtointeger tool to read it. I then used Dennis Shea's
EaseLatLon.nc coordinate file together with the ncl example ease_1.ncl to
try and plot the data, however my georeferencing seems to be off (please see
attached pdf).
I am trying to figure out if it is only a plotting/georeferencing problem or
does the error go deeper to the way I performed the grid transform.
Attached are the ncl script that reads and plots the data together with the
ouptput. Any suggestions you might have would be great.
Thanks, Gina.
-------------------------------------------------------------
begin
nlat=721
nlon=721
ims = fbindirread ("ims2008349.ease1",0,(/nlat,nlon/), "byte")
printVarSummary(ims)
;print(ims)
ims_int = stringtointeger(ims)
printVarSummary(ims_int)
;print(ims_int)
a = addfile("EaseLatLon.nc","r")
lat = a->latitude
lon = a->longitude
printVarSummary(lat)
printVarSummary(lon)
;*******************************************
; Create plots
;*******************************************
wks = gsn_open_wks("ps","ims_ease1")
gsn_define_colormap(wks,"amwg") ; Change color map
res = True ; Plot modes desired.
res@gsnMaximize = True ; Maximize plot
res@gsnSpreadColors = True ; use full range of colormap
res@cnFillOn = True ; color plot desired
res@cnLinesOn = False ; turn off contour lines
res@cnFillMode = "RasterFill" ; turn raster on
; res@pmLabelBarWidthF = 0.9 ; make wider
; res@pmLabelBarHeightF = 0.1 ; default is taller
; res@lbLabelFontHeightF = .018 ; default is HUGE
res@cnLevelSelectionMode= "ExplicitLevels" ; set explicit contour levels
res@cnLevels = (/48,49,50,51,52/) ;\
; ,5,253,254,255/)
;************************************************
;No georeferencing: simple contour. Draws faster
;************************************************
res@tiMainString = "Ims 1024x1024 to EASE grid 721x721"
plot = gsn_csm_contour(wks,ims_int,res) ; contour, no map
;*******************************************
; georeferencing: plot on polar projection
;*******************************************
; georeference
ims_int@lat2d = lat
ims_int@lon2d = lon
res@trGridType = "TriangularMesh" ; allow missing coordinates
res@gsnPolar = "NH" ; specify the hemisphere
res@mpMinLatF = 35
res@tiMainString = "gsn_csm_contour_map_polar"
plot = gsn_csm_contour_map_polar(wks,ims_int,res)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Fri Jul 30 2010 - 13:45:56 MDT