[ncl-talk] empty plots in panel-plot

Noelia otero noeli1680 at gmail.com
Mon Apr 10 11:37:13 MDT 2017


Hi!

I am plotting in a panel plots seasonal means from different models, and I
got some "empty" plots for some specific models and seasons. My guess is
that it is due to the large spread of values (or some outliers). Maybe,
it's a simple question..but I don't know how to set the resources to get a
good label bar. I attach the final plot that I got with my code (see a part
of the code below):

; i= model ,s =season

     model = addfile(fils(i), "r")
     c=str_split(fils(i), "/")
     nmod=str_split(c(6), "#")
     mmod=nmod(0)
     print(nmod)
     sfile=systemfunc("ls " + dir2 + mmod +"*"+ season(s)+".nc")
     smodel=addfile(sfile, "r")

      svar  = smodel ->$var$
      svar!1="lat"
      svar!2="lon"

;------Getting statistics for each grid point-------

    stats_seas_var = new((/nlat,mlon/), typeof(svar),-9e+33)

;-------get 95th possition 25 of statistics---------


    opt=False
    do nl=0,nlat-1
      do ml=0,mlon-1

         seas_st_var = stat_dispersion( svar(:,nl,ml), opt)
         stats_seas_var(nl,ml) = seas_st_var(0)

         ;stat_dispersion: (0) mean, (1) std, (2), min, (14),max
      end do
   end do


   stats_seas_var at long_name = "mean"
   stats_seas_var!0="lat"
   stats_seas_var!1="lon"
   stats_seas_var&lat = lat
   stats_seas_var&lon = lon

    res = True
    res at gsnMaximize = True
    res at cnFillOn = True
    res at cnLinesOn = False
    res at gsnAddCyclic = False
    res at gsnDraw = False
    res at gsnFrame = False
    res at mpMinLonF = min(lon)
    res at mpMinLatF = min(lat)
    res at mpMaxLonF = max(lon)
    res at mpMaxLatF = max(lat)
    res at lbLabelAutoStride=True
    res at cnLevelSelectionMode = "ManualLevels"
    res at cnMinLevelValF       = 0.
    res at cnMaxLevelValF       = 10.
    res at cnLevelSpacingF      =   5.
    res at lbLabelBarOn = False
    res at gsnCenterString =nmod(0)
    res at gsnRightString =season(s)
    plotseas = gsn_csm_contour_map(wks,stats_seas_var,res)

I really appreciate any suggestion to improve it,

Many thanks in advance,

Noelia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170410/429c8dcd/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ValidPM10_mean_seas.pdf
Type: application/pdf
Size: 546907 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170410/429c8dcd/attachment-0001.pdf 


More information about the ncl-talk mailing list