[ncl-talk] overlaying multiple datasets on a map

M P mzp3769 at gmail.com
Tue May 22 20:35:24 MDT 2018


Thanks Rick,
it works almost perfectly except for the labelbar that is plotted twice. Can
you help with that?
Thanks,
Mark






On Mon, May 21, 2018 at 4:19 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> Mi Mark,
>
> You might take a  look at the many examples at:
>
> http://ncl.ucar.edu/Applications/overlay.shtml
>
> The key ideas are to set these resources before drawing any plots:
>
> res at gsnDraw = False
> res at gsnFrame = False
>
> ...then draw your plots...
>
> ...then use the overlay() function to combine them
>
> ...then  call
>
> draw(plot)
> frame(wks)
>
> to actually draw them (where "plot" is the variable-name of the base plot
> and :wks" is the variable name of the workstation
>
>
>
>
> On Mon, May 21, 2018 at 4:03 PM, M P <mzp3769 at gmail.com> wrote:
>
>> Hello,
>> I am using command below to overlay plots with
>> data from aqual and terral
>> map = gsn_csm_contour_map_overlay(wks,aqual,terral,res,res)
>>
>> I'd like to overlay other datasets on the map but
>> gsn_csm_contour_map_overlay won't take more arguments.
>> All data have the same lats and lons (=aqual and =terral)
>>
>> How can I do it?
>> Thanks,
>> Mark
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180522/aa6e05a9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nnr_aqua_terra_550.png
Type: image/png
Size: 126877 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180522/aa6e05a9/attachment.png>
-------------- next part --------------
  res                     = True
  res at gsnMaximize         = True         ; Maximize size of plot in frame
  res at gsnSpreadColors     = True         ; Use full colormap, but startblw
;  res at gsnSpreadColorStart = 24           ; at color index 24.

  res at sfXArray            = grid_lont        ; Required to tell NCL where to
  res at sfYArray            = grid_latt        ; overlay data on globe.

  res at cnFillOn            = True         ; Turn on contour fill
  res at cnFillMode          = "AreaFill"   ; Style of fill. You can also
                                         ; use "CellFill" and "RasterFill"
  res at cnLinesOn           = False        ; Turn off contour lines
  res at cnLineLabelsOn      = False        ; Turn off contour line labels

  res at cnInfoLabelOn = False

  res at cnLevelSelectionMode = "ManualLevels"       ; manually set the contour levels with the following 3 resources
  res at cnMinLevelValF  = 0.1                     ; set the minimum contour level
  res at cnMaxLevelValF  = 1.2                     ; set the maximum contour level
  res at cnLevelSpacingF = .1


  res at lbLabelAutoStride   = True         ; Clean up labelbar labels.
  res at lbBoxLinesOn        = False        ; Turn of labelbar box lines.

;  res at gsnSColors  = True

;  res at tiMainString        = "FV3 AOD 550nm"    ; Title

;  contour = gsn_csm_contour(wks,temp,res)     ; Draw a contour plot.

  res at mpProjection          = "Orthographic"
;  res at mpProjection = "LambertEqualArea"
  res at mpDataBaseVersion     = "MediumRes"      ; Improve the resolution
                                               ; of the map outlines 
                                               ; Default is "LowRes".

  res at mpPerimOn             = False       ; Turn off map perimeter
  res at mpCenterLatF          =  45.         ; Rotate map.
  res at mpCenterLonF          =  -100.

  res at pmTickMarkDisplayMode = "Always"    ; Turn on map tickmarks

  res at gsnDraw = False
  res at gsnFrame = False

  plot = gsn_csm_contour_map(wks,aqual,res)

  plot_ov1 = gsn_csm_contour(wks,aquao,res)
  overlay(plot,plot_ov1)
  plot_ov2 = gsn_csm_contour(wks,aquad,res)
  overlay(plot,plot_ov2)

  plot_ov3 = gsn_csm_contour(wks,terral,res)
  overlay(plot,plot_ov3)
  plot_ov4 = gsn_csm_contour(wks,terrao,res)
  overlay(plot,plot_ov4)
  plot_ov5 = gsn_csm_contour(wks,terrad,res)
  overlay(plot,plot_ov5)

  draw(plot)
  frame(wks)



More information about the ncl-talk mailing list