Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
1 ; ***********************************************
3 ; ***********************************************
4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
6 ;************************************************
8 ;************************************************
10 ;************************************************
11 ;f = addfile ("data.81.nc","r")
12 f = addfile ("data.933.nc","r")
13 x = f->SITE_ID ; get t data
14 ;y = f->PREC_ANN ; get t data
15 y = f->TNPP_C ; get t data
17 x@long_name = "SITE_ID"
18 ;y@long_name = "PREC_ANN"
19 y@long_name = "TNPP_C"
21 ;************************************************
23 ;************************************************
24 wks = gsn_open_wks ("png","xy") ; open workstation
26 res = True ; plot mods desired
27 ;res@tiMainString = "Observed 81 sites" ; add title
28 res@tiMainString = "Observed 933 sites" ; add title
29 res@xyMarkLineModes = "Markers" ; choose which have markers
30 res@xyMarkers = 16 ; choose type of marker
31 res@xyMarkerColor = "red" ; Marker color
32 res@xyMarkerSizeF = 0.01 ; Marker size (default 0.01)
34 res@tmLabelAutoStride = True ; nice tick mark labels
36 ;plot = gsn_csm_xy (wks,t&nvalues,t(:),res) ; create plot
37 plot = gsn_csm_xy (wks,x,y,res) ; create plot
39 ;************************************************
40 ; now create our own markers using NhlNewMarker
41 ; available since ncl version 4.2.0.a030
42 ;************************************************
43 ; this example will create filled squares. You will have to play with
44 ; the numbers a but to get the size and shape you desire. On the
45 ; documentation page for NhlNewMarker, there is a table of values for
46 ; the current marker set, to give you an idea of where to start.
48 ; res@xyMarkerColor = "blue"
49 ; res@tiMainString = "Make your own marker"
50 ; res@xyMarkers = NhlNewMarker(wks, "^", 19, 0.0, 0.0, 1.3125, 1.5, 0.0)
51 ; plot = gsn_csm_xy (wks,x,y,res)