Hi Angel,
Since you have lat/lon coordinate arrays, you don't want to set this:
> res@tfDoNDCOverlay = True ; do not transform data
This causes NCL to assume your data has already been transformed to some map projection, and hence it ignores your coordinate arrays.
Also, since you've gone through the trouble of setting up coordinate arrays, you don't need these two lines either:
> res@sfXArray=lon
> res@sfYArray=lat
These lines are redundant.
--Mary
On Jul 28, 2010, at 7:43 AM, 聲gel G. Mu隳z wrote:
> 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@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
> <agmunoz.vcf>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 28 10:48:56 2010
This archive was generated by hypermail 2.1.8 : Fri Jul 30 2010 - 13:45:56 MDT