[ncl-talk] Zoom plot

Dennis Shea shea at ucar.edu
Tue Nov 10 20:04:01 MST 2015


[1] There are numerous examples that illustrate how to plot a
sub-region over a map.
     Please see:  http://www.ncl.ucar.edu/Applications/cylineq.shtml
     Example 3


; res at pmTickMarkDisplayMode = "Always"     ; use NCL default lat/lon labels

  res at gsnAddCyclic          = False    ; your data is regional

; ozone = a->o3tropcol(1,10:30,20:35)

   res at mpMinLatF            = latS    ; latitude corresponding to 10
  res at mpMaxLatF            =  latN   ;     "             "
        25
  res at mpMinLonF            = lonL   ; longitude corresponding to 20
  res at mpMaxLonF           = lonR  ;
        35



[2] Please read about   coordinate subscripting

    latS = ...
    latN = ...
    lonL = ...
    lonR = ...


  ozone = a->o3tropcol(1,10,latS:latN},{lonL:lonR})

On Tue, Nov 10, 2015 at 2:53 PM, Tabish Ansari
<tabishumaransari at gmail.com> wrote:
> Hi
>
> I have a 3d global data for ozone (time, lat, lon) and I want to plot only
> over south asia. I am able to get a nice plot when plotting the full data
> (with the world map in the background), but couldn't achieve the same for
> south asia.
>
> I am currently using the gsn_csm_contour_map function.
>
> My script is below:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> begin
> a=addfile("/data2/ACCMIP/processed/acchist/o3tropcol_2000Trop/UM-CAM/r1i1p1/v2/o3tropcol_ACCMIP-monthly_UM-CAM_acchist_r1i1p1_200101-200112.nc","r")
> wks   = gsn_open_wks("x11","ozone-jan")
> ozone = a->o3tropcol(1,10:30,20:35)
> res=True
> res at cnFillOn= True          ; turn on color
> gsn_define_colormap(wks,"gui_default")  ; choose a colormap
> res at cnLineLabelsOn      = False        ; Turn off contour line labels
> res at cnLinesOn      = False        ; Turn off contour line labels
> res at cnLevelSelectionMode = "ManualLevels"       ; manually set the contour
> levels with the following 3 resources
> res at cnMinLevelValF  = 0                 ; set the minimum contour level
> res at cnMaxLevelValF  = 52                        ; set the maximum contour
> level
> res at cnLevelSpacingF = 2                 ; set the interval between contours
> plot= gsn_csm_contour_
> map
> (wks,ozone,res)
> end
>
>
>
> Thanks in advance.
>
>
> Tabish
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list