[ncl-talk] sub: Contour plot

dale zuri dalezuri at gmail.com
Wed Mar 25 19:42:15 MDT 2020


Hi Rick,
Thanks for getting back to me. Printed here the information.


Variable: VAR

Type: float

Total Size: 491520 bytes

            122880 values

Number of Dimensions: 3

Dimensions and sizes: [time | 1] x [nj | 384] x [ni | 320]

Coordinates:

            time: [396..396]

Number Of Attributes: 9

  units : m

  long_name : sea ice volume thickness chnage

  coordinates : TLON TLAT time

  cell_measures : area: tarea

  missing_value : 1e+30

  _FillValue : 1e+30

  comment : none

  cell_methods : time: mean

  time_rep : averaged


Variable: icearea

Type: float

Total Size: 491520 bytes

            122880 values

Number of Dimensions: 3

Dimensions and sizes: [time | 1] x [nj | 384] x [ni | 320]

Coordinates:

            time: [396..396]

Number Of Attributes: 9

  units : %

  long_name : ice area  (aggregate)

  coordinates : TLON TLAT time

  cell_measures : area: tarea

  missing_value : 1e+30

  _FillValue : 1e+30

  comment : none

  cell_methods : time: mean

  time_rep : averaged

On Wed, Mar 25, 2020 at 5:13 PM Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi,
>
> Kind of hard to say offhand. Can you post an image of the plot, and do
> your data variables have coordinate variables associated with them (output
> of print(f) would be helpful)
>
> Rick
>
>
> On Wed, Mar 25, 2020 at 6:55 PM dale zuri via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Hi NCL user,
>> I have been trying to overlay the contour lines of the sea ice area
>> fraction. Ended up getting the contour lines across the continental region
>> instead of the Arctic region. Also there is a straight white line showing
>> up on the map. I couldn't adjust the min/max of Lon/Lat.
>> I would appreciate any help to fix this.
>> Thanks
>>
>>
>>
>>   f      = addfile ("blackbox.cice.h.0001-01.nc", "r")
>>
>>
>>   TIME   = f->time
>>
>> ;  VAR    = short2flt(f->$vname$(:,{latS:latN},:))
>>
>>   VAR    = f->$vname$
>>
>>   icearea    = f->aice
>>
>>   printVarSummary(VAR)                              ; variable overview
>>
>>   printVarSummary(icearea)                              ; variable
>> overview
>>
>> lat2d = f->TLAT
>>
>>  lon2d = f->TLON
>>
>> ;============================================================
>>
>> ; PLOTS
>>
>> ;============================================================
>>
>>
>>   wks = gsn_open_wks("x11","eof")         ; send graphics to PNG file
>>
>> ;  plot = new(neof,graphic)                ; create graphic array
>>
>>                                           ; only needed if paneling
>>
>> ; EOF patterns
>>
>>
>>   res                      = True
>>
>>   res at gsnDraw              = False        ; don't draw yet
>>
>>   res at gsnFrame             = False        ; don't advance frame yet
>>
>>   res at gsnPolar             = "NH"
>>
>>
>>   res at mpFillOn             = False        ; turn off map fill
>>
>>   res at gsnAddCyclic = False
>>
>>   res at sfYArray = lat2d
>>
>>   res at sfXArray = lon2d
>>
>>   res at cnFillOn             = True         ; turn on color fill
>>
>>   res at cnFillPalette        = "grads_rainbow"     ; choose colormap
>>
>> ;  res at cnFillPalette        = "NCV_banded"     ; choose colormap
>>
>>   res at cnLinesOn            = False        ; True is default
>>
>>   res at cnLineLabelsOn       = False        ; True is default
>>
>>   res at lbLabelBarOn         = False        ; turn off individual lb's
>>
>> res at trGridType = "TriangularMesh"
>>
>>                                           ; set symmetric plot min/max
>>
>>
>> ; panel plot only resources
>>
>>   resP                     = True         ; modify the panel plot
>>
>>   resP at gsnMaximize         = True         ; large format
>>
>>   resP at gsnPanelLabelBar    = True         ; add common colorbar
>>
>> ;
>>
>>      plot=gsn_csm_contour_map_polar(wks,VAR(0,:,:),res)
>>
>> ;*****************************
>>
>> ; create second plot
>>
>> ;*****************************
>>
>>   res1 = True
>>
>>   res1 at gsnTickMarksOn   = False ; no tickmarks
>>
>>   res1 at gsnDraw          = False ; don't draw
>>
>>   res1 at gsnFrame         = False ; don't advance frame
>>
>> res1 at gsnAddCyclic = False
>>
>>   res1 at gsnLeftString    = "" ; no titles
>>
>>   res1 at gsnRightString   = ""
>>
>>   res1 at tiXAxisString    = ""
>>
>>   res1 at tiYAxisString    = ""
>>
>>   res1 at cnLineThicknessF = 1.0 ; thicker contours
>>
>>   res1 at cnLineLabelsOn   = False ; no line labels
>>
>>   res1 at cnFillMode = "RasterFill"
>>
>>   res1 at cnRasterSmoothingOn = True
>>
>>   res1 at sfYArray = lat2d
>>
>>   res1 at sfXArray = lon2d
>>
>> res1 at trGridType = "TriangularMesh"
>>
>>  plot2 = gsn_csm_contour(wks,icearea(0,:,:),res1)
>>
>> ;******************************
>>
>> ; overlay the plots
>>
>> ;******************************
>>
>>   overlay(plot,plot2)
>>
>>   draw(plot)
>>
>>   frame(wks)
>>
>> end
>> _______________________________________________
>> 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/20200325/1ef29c6b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eof.pdf
Type: application/pdf
Size: 229464 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200325/1ef29c6b/attachment-0001.pdf>


More information about the ncl-talk mailing list