Dear all,
Has anyone used NCL for RSM plots?
I have tryied different options, but I always obtain the field in a
different "projection" than the "map" borders: there is no coincidence
between the physical field and the continent drawn by gsn_csm_contour_map.
This is my script:
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
f = addfile("r_pgb.ft00.nc","r") ; I have transformed the file to nc
T = f->TMP_GDS1_SFC_10-273.15
lat = f->g1_lat_0
lon = f->g1_lon_1
T@long_name = "Temperatura"
T!0="lat"
T!1="lon"
T&lat=lat
T&lon=lon
T&lat@units="degrees_north"
T&lon@units="degrees_east"
;***************************************
; create individual plots
;***************************************
wks = gsn_open_wks("ps","RSM") ; open ps file
gsn_define_colormap(wks,"gui_default") ; choose colormap
res = True ; plot mods desired
res@gsnMaximize = True ; uncomment to maximize size
res@cnLineThicknessF = 2.0 ; make twice as thick as default
res@cnLineLabelBackgroundColor = "background" ; no lines through labels
res@cnFillOn = True ; color contours
res@cnLinesOn = False ; default is True
res@cnLineLabelsOn = False ; default is True
res@gsnSpreadColors = True ; use full range of colormap
res@gsnAddCyclic = False
res@sfXArray=lon
res@sfYArray=lat
res@mpProjection = "mercator" ; projection
res@mpLimitMode = "Corners" ; method to zoom
res@mpLeftCornerLatF = min(lat)
res@mpLeftCornerLonF = min(lon)
res@mpRightCornerLatF = max(lat)
res@mpRightCornerLonF = max(lon)
res@tfDoNDCOverlay = True ; do not transform data
res@mpOutlineDrawOrder = "PostDraw" ; draw continental outline last
res@mpFillDrawOrder = "PreDraw"
res@mpOutlineBoundarySets = "National" ; state boundaries
plot = gsn_csm_contour_map(wks,T(:,:),res)
end
The output can be seen here:
http://cmc.org.ve/descargas/OA/RSM1.png
Thanks
_______________________________________________
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