Re: contour plot from ASCII data

From: juki juki <juky_emc2_at_nyahnyahspammersnyahnyah>
Date: Sun Dec 18 2011 - 23:25:46 MST

Hi all, Thanks very much for the response. At least, it provides me a great starting of using NCL. Again, thank you !! Cheers Juki ________________________________ From: Dennis Shea <shea_at_ucar.edu> To: juki juki <juky_emc2_at_yahoo.com> Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu> Sent: Monday, December 19, 2011 2:38 PM Subject: Re: [ncl-talk] contour plot from ASCII data Also, gsn_csm_contour_map_ce requires (lat,lon) order. plot = gsn_csm_contour_map_ce(wks,data(lat|:,lon|:), res) Please read the mini-language manual. See "Coordinate Variables", "Dimension Reordering" then see the mini-Graphics Manual http://www.ncl.ucar.edu/Document/Manuals/ On 12/18/11 10:29 PM, debasish_at_sca.uqam.ca wrote: > Hi, > > You need to define latitude and longitude before the plot > > lat = fspan(-10,10,9) > lon = fspan(80,160,33) > > data!0="lon" > data!1="lat" > data&lat=lat > data&lon=lon > > data&lat_at_units="degrees_north" > data&lon_at_units="degrees_east" > > Good luck > > Debasish > > >> Hi All, >> >> This is my first time to use NCL for plotting my research data. Thus, I >>  have not yet had any experience to do it. Hope your sharing for that. >> >> I want to make a contour plot from the attached file (ASCII file). I use >> the following code: >> >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" >> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" >> >> begin >> ; read in data >>    ncols    = 9  ; -10:2.5:10 Latitude >> >>    nrows  = 33 ; 80:2.5:160E Longitude >> >>    data      = asciiread ("djfOLR.txt", (/nrows,ncols/), "float") >> >> >> >>    wks = gsn_open_wks("ps" ,"ce")                ; open a ps file >>    gsn_define_colormap(wks,"BlAqGrYeOrRe")        ; choose colormap >> >>    res                      = True    ; plot mods desired >> >>    res_at_cnFillOn              = True    ; turn on color fill >>    res_at_cnLinesOn            = False    ; turn of contour lines >>    res_at_cnLevelSpacingF      = 0.5      ; contour spacing >>    res_at_gsnSpreadColors      = True    ; use full range of color map >>    res_at_lbLabelStride        = 4 >> >>    res_at_pmTickMarkDisplayMode = "Always"; use NCL default lat/lon labels >> >>    res_at_gsnAddCyclic          = False    ; data already has cyclic point >>        ; this must also be set for any zoom >> >> ; note that the gsn_csm_*map_ce templates automatically set >> ; res_at_mpLimitMode="LatLon" for you. If you are plotting a different >> projection, >> ; you may have to set this resource. >> >>    res_at_mpMinLatF            = -10      ; range to zoom in on >>    res_at_mpMaxLatF            =  10. >>    res_at_mpMinLonF            =  80. >>    res_at_mpMaxLonF            = 160. >> >>    plot = gsn_csm_contour_map_ce(wks,data, res) >> ;************************************************ >> end >> >> I have the result, but only the plot of Indonesian map without my data. >> Hope your sharing for this problem.. >> >> >> Regards, >> JuKY_______________________________________________ >> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Dec 18 23:25:56 2011

This archive was generated by hypermail 2.1.8 : Wed Dec 21 2011 - 10:44:06 MST