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 g = addfile ("data.81.nc","r")
12 ;g = addfile ("data.933.nc","r")
13 a = g->SITE_ID ; get ob data
14 xo = g->LONG_DD ; get ob data
15 yo = g->LAT_DD ; get ob data
20 if (xo(i) .lt. 0.) then
26 a@long_name = "SITE_ID"
28 ;f = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r")
29 f = addfile ("i01.04casa_1605-1629_ANN_climo.nc","r")
30 b = f->NPP ; get model data
31 xi = f->lon ; get model data
32 yi = f->lat ; get model data
34 sec_to_year = 86400.*365.
36 bo = linint2_points(xi,yi,b,True,xo,yo,0) * sec_to_year
39 bo@long_name = "NPP (gC/m2/year)"
41 ;************************************************
43 ;************************************************
44 ;wks = gsn_open_wks ("ps","xy") ; open workstation
45 wks = gsn_open_wks ("png","xy")
47 res = True ; plot mods desired
48 ;res@tiMainString = "Model i01.03cn 81 sites" ; add title
49 ;res@tiMainString = "Model i01.03cn 933 sites" ; add title
50 res@tiMainString = "Model i01.04casa 81 sites" ; add title
51 ;res@tiMainString = "Model i01.04casa 933 sites" ; add title
52 res@xyMarkLineModes = "Markers" ; choose which have markers
53 res@xyMarkers = 16 ; choose type of marker
54 res@xyMarkerColor = "red" ; Marker color
55 res@xyMarkerSizeF = 0.01 ; Marker size (default 0.01)
57 res@tmLabelAutoStride = True ; nice tick mark labels
59 ;plot = gsn_csm_xy (wks,t&nvalues,t(:),res) ; create plot
60 plot = gsn_csm_xy (wks,a,bo,res) ; create plot
62 ;************************************************
63 ; now create our own markers using NhlNewMarker
64 ; available since ncl version 4.2.0.a030
65 ;************************************************
66 ; this example will create filled squares. You will have to play with
67 ; the numbers a but to get the size and shape you desire. On the
68 ; documentation page for NhlNewMarker, there is a table of values for
69 ; the current marker set, to give you an idea of where to start.
71 ; res@xyMarkerColor = "blue"
72 ; res@tiMainString = "Make your own marker"
73 ; res@xyMarkers = NhlNewMarker(wks, "^", 19, 0.0, 0.0, 1.3125, 1.5, 0.0)
74 ; plot = gsn_csm_xy (wks,a,bo,res)